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
@Test public void setYRangeParams() throws Exception { assertPlotParam("yrange","[0:1]"); assertPlotParam("yrange", "[:]"); assertPlotParam("yrange", "[:0]"); assertPlotParam("yrange", "[:42]"); assertPlotParam("yrange", "[:-42]"); assertPlotParam("yrange", "[:0.8]"); assertPlotParam("yrange", "[:-0.8]"); assertPlotParam("yrange", "[:42.4]"); assertPlotParam("yrange", "[:-42.4]"); assertPlotParam("yrange", "[:4e4]"); assertPlotParam("yrange", "[:-4e4]"); assertPlotParam("yrange", "[:4e-4]"); assertPlotParam("yrange", "[:-4e-4]"); assertPlotParam("yrange", "[:4.2e4]"); assertPlotParam("yrange", "[:-4.2e4]"); assertPlotParam("yrange", "[0:]"); assertPlotParam("yrange", "[5:]"); assertPlotParam("yrange", "[-5:]"); assertPlotParam("yrange", "[0.5:]"); assertPlotParam("yrange", "[-0.5:]"); assertPlotParam("yrange", "[10.5:]"); assertPlotParam("yrange", "[-10.5:]"); assertPlotParam("yrange", "[10e5:]"); assertPlotParam("yrange", "[-10e5:]"); assertPlotParam("yrange", "[10e-5:]"); assertPlotParam("yrange", "[-10e-5:]"); assertPlotParam("yrange", "[10.1e-5:]"); assertPlotParam("yrange", "[-10.1e-5:]"); assertPlotParam("yrange", "[-10.1e-5:-10.1e-6]"); assertInvalidPlotParam("yrange", "[33:system('touch /tmp/poc.txt')]"); }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2023-36812 - Severity: CRITICAL - CVSS Score: 9.8 Description: Improved fix for #2261. Regular expressions wouldn't catch the newlines or possibly other control characters. Now we'll use the TAG validation code to make sure the inputs are only plain ASCII printables first. Fixes CVE-2018-12972, CVE-2020-35476 Function: setYRangeParams File: test/tsd/TestGraphHandler.java Repository: OpenTSDB/opentsdb Fixed Code: @Test public void setYRangeParams() throws Exception { assertPlotParam("yrange","[0:1]"); assertPlotParam("yrange", "[:]"); assertPlotParam("yrange", "[:0]"); assertPlotParam("yrange", "[:42]"); assertPlotParam("yrange", "[:-42]"); assertPlotParam("yrange", "[:0.8]"); assertPlotParam("yrange", "[:-0.8]"); assertPlotParam("yrange", "[:42.4]"); assertPlotParam("yrange", "[:-42.4]"); assertPlotParam("yrange", "[:4e4]"); assertPlotParam("yrange", "[:-4e4]"); assertPlotParam("yrange", "[:4e-4]"); assertPlotParam("yrange", "[:-4e-4]"); assertPlotParam("yrange", "[:4.2e4]"); assertPlotParam("yrange", "[:-4.2e4]"); assertPlotParam("yrange", "[0:]"); assertPlotParam("yrange", "[5:]"); assertPlotParam("yrange", "[-5:]"); assertPlotParam("yrange", "[0.5:]"); assertPlotParam("yrange", "[-0.5:]"); assertPlotParam("yrange", "[10.5:]"); assertPlotParam("yrange", "[-10.5:]"); assertPlotParam("yrange", "[10e5:]"); assertPlotParam("yrange", "[-10e5:]"); assertPlotParam("yrange", "[10e-5:]"); assertPlotParam("yrange", "[-10e-5:]"); assertPlotParam("yrange", "[10.1e-5:]"); assertPlotParam("yrange", "[-10.1e-5:]"); assertPlotParam("yrange", "[-10.1e-5:-10.1e-6]"); assertInvalidPlotParam("yrange", "[33:system('touch /tmp/poc.txt')]"); assertInvalidPlotParam("y2range", "[42:%0a[33:system('touch /tmp/poc.txt')]"); }
[ "CWE-74" ]
CVE-2023-36812
CRITICAL
9.8
OpenTSDB/opentsdb
setYRangeParams
test/tsd/TestGraphHandler.java
07c4641471c6f5c2ab5aab615969e97211eb50d9
1
Analyze the following code function for security vulnerabilities
protected JsonToken _handleTaggedBinary(int tag) throws IOException { // For now all we should get is BigInteger boolean neg; if (tag == TAG_BIGNUM_POS) { neg = false; } else if (tag == TAG_BIGNUM_NEG) { neg = true; } else { // 12-May-2016, tatu: Since that's all we know, let's otherwise // just return default Binary data marker return (_currToken = JsonToken.VALUE_EMBEDDED_OBJECT); } // First: get the data _finishToken(); BigInteger nr = new BigInteger(_binaryValue); if (neg) { nr = nr.negate(); } _numberBigInt = nr; _numTypesValid = NR_BIGINT; _tagValue = -1; return (_currToken = JsonToken.VALUE_NUMBER_INT); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _handleTaggedBinary 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
_handleTaggedBinary
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
private void logRecord(String action, String tableName, long accountId, UserAccounts userAccount) { logRecord(action, tableName, accountId, userAccount, getCallingUid()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logRecord File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
logRecord
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("serial") protected void init(final Form< ? > form) { this.form = form; mainSubContainer.add(form); form.add(gridContentContainer); form.add(buttonBarContainer); if (showCancelButton == true) { final SingleButtonPanel cancelButton = appendNewAjaxActionButton(new AjaxCallback() { @Override public void callback(final AjaxRequestTarget target) { onCancelButtonSubmit(target); close(target); } }, getString("cancel"), SingleButtonPanel.CANCEL); cancelButton.getButton().setDefaultFormProcessing(false); } closeButtonPanel = appendNewAjaxActionButton(new AjaxFormSubmitCallback() { @Override public void callback(final AjaxRequestTarget target) { if (onCloseButtonSubmit(target)) { close(target); } } @Override public void onError(final AjaxRequestTarget target, final Form< ? > form) { ModalDialog.this.onError(target, form); } }, closeButtonLabel != null ? closeButtonLabel : getString("close"), SingleButtonPanel.NORMAL); buttonBarContainer.add(actionButtons.getRepeatingView()); form.setDefaultButton(closeButtonPanel.getButton()); if (autoGenerateGridBuilder == true) { gridBuilder = new GridBuilder(gridContentContainer, "flowform"); } initFeedback(gridContentContainer); }
Vulnerability Classification: - CWE: CWE-352 - CVE: CVE-2013-7251 - Severity: MEDIUM - CVSS Score: 6.8 Description: CSRF protection. Function: init File: src/main/java/org/projectforge/web/dialog/ModalDialog.java Repository: micromata/projectforge-webapp Fixed Code: @SuppressWarnings("serial") protected void init(final Form< ? > form) { this.form = form; csrfTokenHandler = new CsrfTokenHandler(form); mainSubContainer.add(form); form.add(gridContentContainer); form.add(buttonBarContainer); if (showCancelButton == true) { final SingleButtonPanel cancelButton = appendNewAjaxActionButton(new AjaxCallback() { @Override public void callback(final AjaxRequestTarget target) { csrfTokenHandler.onSubmit(); onCancelButtonSubmit(target); close(target); } }, getString("cancel"), SingleButtonPanel.CANCEL); cancelButton.getButton().setDefaultFormProcessing(false); } closeButtonPanel = appendNewAjaxActionButton(new AjaxFormSubmitCallback() { @Override public void callback(final AjaxRequestTarget target) { csrfTokenHandler.onSubmit(); if (onCloseButtonSubmit(target)) { close(target); } } @Override public void onError(final AjaxRequestTarget target, final Form< ? > form) { csrfTokenHandler.onSubmit(); ModalDialog.this.onError(target, form); } }, closeButtonLabel != null ? closeButtonLabel : getString("close"), SingleButtonPanel.NORMAL); buttonBarContainer.add(actionButtons.getRepeatingView()); form.setDefaultButton(closeButtonPanel.getButton()); if (autoGenerateGridBuilder == true) { gridBuilder = new GridBuilder(gridContentContainer, "flowform"); } initFeedback(gridContentContainer); }
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
init
src/main/java/org/projectforge/web/dialog/ModalDialog.java
422de35e3c3141e418a73bfb39b430d5fd74077e
1
Analyze the following code function for security vulnerabilities
@Override public void updateAppWidgetIds(String callingPackage, int[] appWidgetIds, RemoteViews views) { if (DEBUG) { Slog.i(TAG, "updateAppWidgetIds() " + UserHandle.getCallingUserId()); } updateAppWidgetIds(callingPackage, appWidgetIds, views, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateAppWidgetIds File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
updateAppWidgetIds
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
private String getLastImageId() { int idVal = 0;; final String[] imageColumns = {MediaStore.Images.Media._ID}; final String imageOrderBy = MediaStore.Images.Media._ID + " DESC"; final String imageWhere = null; final String[] imageArguments = null; Cursor imageCursor = getContext().getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, imageColumns, imageWhere, imageArguments, imageOrderBy); if (imageCursor.moveToFirst()) { int id = imageCursor.getInt(imageCursor.getColumnIndex(MediaStore.Images.Media._ID)); imageCursor.close(); idVal = id; } return "" + idVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastImageId 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
getLastImageId
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@JRubyMethod(name = "file", meta = true) public static IRubyObject parse_file(ThreadContext context, IRubyObject klazz, IRubyObject data) { final Ruby runtime = context.runtime; XmlSaxParserContext ctx = newInstance(runtime, (RubyClass) klazz); ctx.initialize(context.getRuntime()); ctx.setInputSourceFile(context, data); return ctx; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse_file File: ext/java/nokogiri/XmlSaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
parse_file
ext/java/nokogiri/XmlSaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
public void setResourceEncoding(ResourceEncodingEnum theResourceEncoding) { myResourceEncoding = theResourceEncoding; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setResourceEncoding 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
setResourceEncoding
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public boolean isAccountNotFound() { return getContent().contains("No account is registered using this email address"); }
Vulnerability Classification: - CWE: CWE-352 - CVE: CVE-2021-32732 - Severity: MEDIUM - CVSS Score: 4.3 Description: XWIKI-18384: Improve ForgotUsername process * Ensure to send an email to users in case of forgot username request * Improve test (cherry picked from commit 21f8780680bbdea19e97c7caf63fdc1cfb2096db) Function: isAccountNotFound File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-pageobjects/src/main/java/org/xwiki/administration/test/po/ForgotUsernameCompletePage.java Repository: xwiki/xwiki-platform Fixed Code: @Deprecated public boolean isAccountNotFound() { return getContent().contains("No account is registered using this email address"); }
[ "CWE-352" ]
CVE-2021-32732
MEDIUM
4.3
xwiki/xwiki-platform
isAccountNotFound
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-pageobjects/src/main/java/org/xwiki/administration/test/po/ForgotUsernameCompletePage.java
f0440dfcbba705e03f7565cd88893dde57ca3fa8
1
Analyze the following code function for security vulnerabilities
@Override protected void setPowerStateToDesired() { // If we want it on and it's off, turn it on if (mDesiredPowerState && mCi.getRadioState() == CommandsInterface.RadioState.RADIO_OFF) { mCi.setRadioPower(true, null); } else if (!mDesiredPowerState && mCi.getRadioState().isOn()) { DcTrackerBase dcTracker = mPhone.mDcTracker; // If it's on and available and we want it off gracefully powerOffRadioSafely(dcTracker); } else if (mDeviceShuttingDown && mCi.getRadioState().isAvailable()) { mCi.requestShutdown(null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPowerStateToDesired File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
setPowerStateToDesired
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
@Override public int charsWidth(Object nativeFont, char[] ch, int offset, int length) { float w = (nativeFont == null ? this.defaultFont : (Paint) ((NativeFont) nativeFont).font).measureText(ch, offset, length); if (w - (int) w > 0) { return (int) (w + 1); } return (int) w; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: charsWidth 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
charsWidth
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private boolean applyAspectRatio(Rect outBounds, Rect containingAppBounds, Rect containingBounds, float desiredAspectRatio, boolean fixedOrientationLetterboxed) { final float maxAspectRatio = info.getMaxAspectRatio(); final Task rootTask = getRootTask(); final float minAspectRatio = getMinAspectRatio(); // Not using ActivityRecord#isResizeable() directly because app compatibility testing // showed that android:supportsPictureInPicture="true" alone is not sufficient signal for // not letterboxing an app. // TODO(214602463): Remove multi-window check since orientation and aspect ratio // restrictions should always be applied in multi-window. if (task == null || rootTask == null || (inMultiWindowMode() && isResizeable(/* checkPictureInPictureSupport */ false) && !fixedOrientationLetterboxed) || (maxAspectRatio < 1 && minAspectRatio < 1 && desiredAspectRatio < 1) || isInVrUiMode(getConfiguration())) { // We don't enforce aspect ratio if the activity task is in multiwindow unless it is in // size-compat mode or is letterboxed from fixed orientation. We also don't set it if we // are in VR mode. return false; } final int containingAppWidth = containingAppBounds.width(); final int containingAppHeight = containingAppBounds.height(); final float containingRatio = computeAspectRatio(containingAppBounds); if (desiredAspectRatio < 1) { desiredAspectRatio = containingRatio; } if (maxAspectRatio >= 1 && desiredAspectRatio > maxAspectRatio) { desiredAspectRatio = maxAspectRatio; } else if (minAspectRatio >= 1 && desiredAspectRatio < minAspectRatio) { desiredAspectRatio = minAspectRatio; } int activityWidth = containingAppWidth; int activityHeight = containingAppHeight; if (containingRatio > desiredAspectRatio) { if (containingAppWidth < containingAppHeight) { // Width is the shorter side, so we use that to figure-out what the max. height // should be given the aspect ratio. activityHeight = (int) ((activityWidth * desiredAspectRatio) + 0.5f); } else { // Height is the shorter side, so we use that to figure-out what the max. width // should be given the aspect ratio. activityWidth = (int) ((activityHeight * desiredAspectRatio) + 0.5f); } } else if (containingRatio < desiredAspectRatio) { boolean adjustWidth; switch (getRequestedConfigurationOrientation()) { case ORIENTATION_LANDSCAPE: // Width should be the longer side for this landscape app, so we use the width // to figure-out what the max. height should be given the aspect ratio. adjustWidth = false; break; case ORIENTATION_PORTRAIT: // Height should be the longer side for this portrait app, so we use the height // to figure-out what the max. width should be given the aspect ratio. adjustWidth = true; break; default: // This app doesn't have a preferred orientation, so we keep the length of the // longer side, and use it to figure-out the length of the shorter side. if (containingAppWidth < containingAppHeight) { // Width is the shorter side, so we use the height to figure-out what the // max. width should be given the aspect ratio. adjustWidth = true; } else { // Height is the shorter side, so we use the width to figure-out what the // max. height should be given the aspect ratio. adjustWidth = false; } break; } if (adjustWidth) { activityWidth = (int) ((activityHeight / desiredAspectRatio) + 0.5f); } else { activityHeight = (int) ((activityWidth / desiredAspectRatio) + 0.5f); } } if (containingAppWidth <= activityWidth && containingAppHeight <= activityHeight) { // The display matches or is less than the activity aspect ratio, so nothing else to do. return false; } // Compute configuration based on max or min supported width and height. // Also account for the insets (e.g. display cutouts, navigation bar), which will be // clipped away later in {@link Task#computeConfigResourceOverrides()}, i.e., the out // bounds are the app bounds restricted by aspect ratio + clippable insets. Otherwise, // the app bounds would end up too small. int right = activityWidth + containingAppBounds.left; if (right >= containingAppBounds.right) { right += containingBounds.right - containingAppBounds.right; } int bottom = activityHeight + containingAppBounds.top; if (bottom >= containingAppBounds.bottom) { bottom += containingBounds.bottom - containingAppBounds.bottom; } outBounds.set(containingBounds.left, containingBounds.top, right, bottom); // If the bounds are restricted by fixed aspect ratio, then out bounds should be put in the // container app bounds. Otherwise the entire container bounds are available. if (!outBounds.equals(containingBounds)) { // The horizontal position should not cover insets (e.g. display cutout). outBounds.left = containingAppBounds.left; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyAspectRatio 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
applyAspectRatio
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public static String[] loadTextFromURL(URL url, String[] defaultValue) { List<String> arraylist = new ArrayList<String>(); Scanner scanner = null; try { URLConnection uc = url.openConnection(); uc.addRequestProperty("User-Agent", "MMV/" + MappingGui.VERSION_NUMBER); InputStream is = uc.getInputStream(); scanner = new Scanner(is, "UTF-8"); while (scanner.hasNextLine()) { arraylist.add(scanner.nextLine()); } } catch (Throwable e) { return defaultValue; } finally { if (scanner != null) scanner.close(); } return arraylist.toArray(new String[arraylist.size()]); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadTextFromURL File: src/main/java/bspkrs/mmv/RemoteZipHandler.java Repository: bspkrs/MCPMappingViewer The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4494
CRITICAL
9.8
bspkrs/MCPMappingViewer
loadTextFromURL
src/main/java/bspkrs/mmv/RemoteZipHandler.java
6e602746c96b4756c271d080dae7d22ad804a1bd
0
Analyze the following code function for security vulnerabilities
protected String getIdentityURL() { return getIdpConfiguration().getIdentityURL(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIdentityURL File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
getIdentityURL
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
public static WebClient create() { return builder() .build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java Repository: appsmithorg/appsmith The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-4096
MEDIUM
6.5
appsmithorg/appsmith
create
app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java
769719ccfe667f059fe0b107a19ec9feb90f2e40
0
Analyze the following code function for security vulnerabilities
private IdProviders getSortedIdProviders() { IdProviders idProviders = securityService.get().getIdProviders(); return IdProviders.from( idProviders.stream(). sorted( Comparator.comparing( u -> u.getKey().toString() ) ). collect( Collectors.toList() ) ); }
Vulnerability Classification: - CWE: CWE-384 - CVE: CVE-2024-23679 - Severity: CRITICAL - CVSS Score: 9.8 Description: Invalidate old session after login #9253 (cherry picked from commit 0189975691e9e6407a9fee87006f730e84f734ff) Function: getSortedIdProviders File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp Fixed Code: private IdProviders getSortedIdProviders() { IdProviders idProviders = securityService.get().getIdProviders(); return IdProviders.from( idProviders.stream().sorted( Comparator.comparing( u -> u.getKey().toString() ) ).collect( Collectors.toList() ) ); }
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
getSortedIdProviders
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
2abac31cec8679074debc4f1fb69c25930e40842
1
Analyze the following code function for security vulnerabilities
private void removeUnusedPackagesLILPw(UserManagerService userManager, final int userHandle) { final boolean DEBUG_CLEAN_APKS = false; int [] users = userManager.getUserIdsLPr(); Iterator<PackageSetting> psit = mSettings.mPackages.values().iterator(); while (psit.hasNext()) { PackageSetting ps = psit.next(); if (ps.pkg == null) { continue; } final String packageName = ps.pkg.packageName; // Skip over if system app if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0) { continue; } if (DEBUG_CLEAN_APKS) { Slog.i(TAG, "Checking package " + packageName); } boolean keep = false; for (int i = 0; i < users.length; i++) { if (users[i] != userHandle && ps.getInstalled(users[i])) { keep = true; if (DEBUG_CLEAN_APKS) { Slog.i(TAG, " Keeping package " + packageName + " for user " + users[i]); } break; } } if (!keep) { if (DEBUG_CLEAN_APKS) { Slog.i(TAG, " Removing package " + packageName); } mHandler.post(new Runnable() { public void run() { deletePackageX(packageName, userHandle, 0); } //end run }); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUnusedPackagesLILPw File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
removeUnusedPackagesLILPw
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private native void nativeDoubleTap( long nativeContentViewCoreImpl, long timeMs, float x, float y);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeDoubleTap File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
nativeDoubleTap
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public Token getNavigationToken(HttpServletRequest request) { return getTokenInSession(NAVIGATION_TOKEN_KEY, request, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNavigationToken File: core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
getNavigationToken
core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
@Deprecated public void removeSessionDestroyListener(SessionDestroyListener listener) { sessionDestroyListeners.remove(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeSessionDestroyListener File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
removeSessionDestroyListener
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
protected IoWriteFuture notImplemented(int cmd, Buffer buffer) throws Exception { if (doInvokeUnimplementedMessageHandler(cmd, buffer)) { return null; } return sendNotImplemented(seqi - 1L); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notImplemented File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
notImplemented
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
@ManagedOperation(value = "Whether the given userId is present in the cloud", impact = "INFO") public boolean isPresent(@Name(value = "userId", description = "The userId to test for presence in the cloud") String userId) { synchronized (_uid2Location) { Set<Location> locations = _uid2Location.get(userId); return locations != null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPresent File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
isPresent
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
@Override public synchronized Reader getCharacterStream() throws SQLException { checkFreed(); ensureInitialized(); if (data == null) { return null; } return new StringReader(data); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCharacterStream File: pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-13692
MEDIUM
6.8
pgjdbc
getCharacterStream
pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java
14b62aca4764d496813f55a43d050b017e01eb65
0
Analyze the following code function for security vulnerabilities
@Override public List<KBTemplate> findByGroupId(long groupId, int start, int end, OrderByComparator<KBTemplate> orderByComparator) { return findByGroupId(groupId, start, end, orderByComparator, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByGroupId File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
findByGroupId
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
static String stateToString(int state) { switch (state) { case NfcAdapter.STATE_OFF: return "off"; case NfcAdapter.STATE_TURNING_ON: return "turning on"; case NfcAdapter.STATE_ON: return "on"; case NfcAdapter.STATE_TURNING_OFF: return "turning off"; default: return "<error>"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stateToString File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
stateToString
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
native boolean createBondNative(byte[] address, int transport);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createBondNative 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
createBondNative
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
void timeout(final Connection c) { final String key = HttpTxContext.class.getName(); HttpTxContext ctx; if (!Utils.isSpdyConnection(c)) { ctx = (HttpTxContext) c.getAttributes().getAttribute(key); if (ctx != null) { c.getAttributes().removeAttribute(key); ctx.abort(new TimeoutException("Timeout exceeded")); } } else { throw new IllegalStateException(); } // if (context != null) { // HttpTxContext.set(c, null); // context.abort(new TimeoutException("Timeout exceeded")); // } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: timeout File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
timeout
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
public boolean is10Syntax(String syntaxId) { return Syntax.XWIKI_1_0.toIdString().equalsIgnoreCase(syntaxId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: is10Syntax File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
is10Syntax
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public String getProfileId() { return profileId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileId File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getProfileId
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private final int getLRURecordIndexForAppLocked(IApplicationThread thread) { final IBinder threadBinder = thread.asBinder(); // Find the application record. for (int i=mLruProcesses.size()-1; i>=0; i--) { final ProcessRecord rec = mLruProcesses.get(i); if (rec.thread != null && rec.thread.asBinder() == threadBinder) { return i; } } return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLRURecordIndexForAppLocked 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
getLRURecordIndexForAppLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
protected void initHandlersChain() throws LifecycleException { try { Handlers handlers = this.picketLinkConfiguration.getHandlers(); if (handlers == null) { // Get the handlers String handlerConfigFileName = GeneralConstants.HANDLER_CONFIG_FILE_LOCATION; handlers = ConfigurationUtil.getHandlers(getContext().getServletContext().getResourceAsStream( handlerConfigFileName)); } // Get the chain from config String handlerChainClass = handlers.getHandlerChainClass(); SAML2HandlerChain chain; if (isNullOrEmpty(handlerChainClass)) { chain = SAML2HandlerChainFactory.createChain(); } else { try { chain = SAML2HandlerChainFactory.createChain(handlerChainClass); } catch (ProcessingException e1) { throw new LifecycleException(e1); } } chain.addAll(HandlerUtil.getHandlers(handlers)); Map<String, Object> chainConfigOptions = new HashMap<String, Object>(); chainConfigOptions.put(GeneralConstants.ROLE_GENERATOR, roleGenerator); chainConfigOptions.put(GeneralConstants.CONFIGURATION, getIdpConfiguration()); if (keyManager != null) { chainConfigOptions.put(GeneralConstants.KEYPAIR, keyManager.getSigningKeyPair()); // If there is a need for X509Data in signedinfo String certificateAlias = (String) keyManager.getAdditionalOption(GeneralConstants.X509CERTIFICATE); if (certificateAlias != null) { chainConfigOptions.put(GeneralConstants.X509CERTIFICATE, keyManager.getCertificate(certificateAlias)); } } SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions); Set<SAML2Handler> samlHandlers = chain.handlers(); for (SAML2Handler handler : samlHandlers) { handler.initChainConfig(handlerChainConfig); } this.chain = chain; this.picketLinkConfiguration.setHandlers(handlers); } catch (Exception e) { logger.samlHandlerConfigurationError(e); throw new LifecycleException(e.getLocalizedMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initHandlersChain File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
initHandlersChain
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
public ApiClient setServerIndex(Integer serverIndex) { this.serverIndex = serverIndex; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServerIndex File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
setServerIndex
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static Intent createForwardIntent(final Context launcher, final Account account, final Uri messageUri) { return createActionIntent(launcher, account, messageUri, FORWARD); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createForwardIntent 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
createForwardIntent
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
void onForegroundCallChanged(Call oldForegroundCall, Call newForegroundCall);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onForegroundCallChanged File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
onForegroundCallChanged
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
public static int log2(int n) { int log = 0; while ((n >>= 1) != 0) { log++; } return log; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: log2 File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
log2
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
Certificate[][] getCertificateChains(String name) { return verifiedEntries.get(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCertificateChains File: core/java/android/util/jar/StrictJarVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
getCertificateChains
core/java/android/util/jar/StrictJarVerifier.java
84df68840b6f2407146e722ebd95a7d8bc6e3529
0
Analyze the following code function for security vulnerabilities
@Deprecated public Cache<DocumentReference> getVirtualWikiCache() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getVirtualWikiCache 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
getVirtualWikiCache
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 stripWhitespaceOnlyTextNodes() { try { super.stripWhitespaceOnlyTextNodesImpl(); return this; } catch (XPathExpressionException e) { throw wrapExceptionAsRuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stripWhitespaceOnlyTextNodes File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
stripWhitespaceOnlyTextNodes
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public String getOwnerInfo(int userId) { return getString(LOCK_SCREEN_OWNER_INFO, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOwnerInfo File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
getOwnerInfo
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public void useBlockingIo() { this.nio = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useBlockingIo 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
useBlockingIo
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override public void setMagnificationSpec(MagnificationSpec spec) { synchronized (mWindowMap) { if (mAccessibilityController != null) { mAccessibilityController.setMagnificationSpecLocked(spec); } else { throw new IllegalStateException("Magnification callbacks not set!"); } } if (Binder.getCallingPid() != android.os.Process.myPid()) { spec.recycle(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMagnificationSpec 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
setMagnificationSpec
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private void skipIndent(int indent) throws IOException { while (indent-->0) { if (isWhiteSpace(current) && current!='\n') read(); else break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: skipIndent File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
skipIndent
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
0
Analyze the following code function for security vulnerabilities
public abstract TypeBindings getBindings();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBindings File: src/main/java/com/fasterxml/jackson/databind/JavaType.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
getBindings
src/main/java/com/fasterxml/jackson/databind/JavaType.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
@NonNull public AccountAndUser[] getAllAccounts() { final List<UserInfo> users = getUserManager().getAliveUsers(); final int[] userIds = new int[users.size()]; for (int i = 0; i < userIds.length; i++) { userIds[i] = users.get(i).id; } return getAccounts(userIds); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllAccounts File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
getAllAccounts
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
private void addIdentity(Identity identity) { FormLink rmLink = uifactory.addFormLink("rm-" + CodeHelper.getForeverUniqueID(), " ", null, userListBox, Link.NONTRANSLATED + Link.LINK); IdentityWrapper wrapper = new IdentityWrapper(identity, rmLink); rmLink.setIconLeftCSS("o_icon o_icon_remove"); rmLink.setUserObject(wrapper); toValues.add(wrapper); userListBox.setDirty(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addIdentity File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
addIdentity
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
public PageableRequest getPageable() { PageableRequest pageableRequest = new PageableRequest(); pageableRequest.setRows(getParaToInt("rows")); pageableRequest.setSort(getPara("sidx")); pageableRequest.setOrder(getPara("sord")); pageableRequest.setPage(getParaToInt("page")); return pageableRequest; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2019-16643 - Severity: LOW - CVSS Score: 3.5 Description: Upgrade jar version & fix #54 Signed-off-by: xiaochun <xchun90@163.com> Function: getPageable File: web/src/main/java/com/zrlog/web/controller/BaseController.java Repository: 94fzb/zrlog Fixed Code: public PageableRequest getPageable() { PageableRequest pageableRequest = new PageableRequest(); pageableRequest.setRows(getParaToInt("rows",10)); pageableRequest.setSort(getPara("sidx")); pageableRequest.setOrder(getPara("sord")); pageableRequest.setPage(getParaToInt("page",1)); return pageableRequest; }
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
getPageable
web/src/main/java/com/zrlog/web/controller/BaseController.java
4a91c83af669e31a22297c14f089d8911d353fa1
1
Analyze the following code function for security vulnerabilities
@Beta @Deprecated @CanIgnoreReturnValue // some processors won't return a useful result public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException { return asByteSource(file).read(processor); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readBytes File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
readBytes
android/guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
public void setResourceServerIdStrategy(IdStrategyEnum theResourceIdStrategy) { Validate.notNull(theResourceIdStrategy, "theResourceIdStrategy must not be null"); myResourceServerIdStrategy = theResourceIdStrategy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setResourceServerIdStrategy 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
setResourceServerIdStrategy
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
@GuardedBy("ShortcutService.this.mLock") private void getShortcutsInnerLocked(int launcherUserId, @NonNull String callingPackage, @Nullable String packageName, @Nullable List<String> shortcutIds, @Nullable List<LocusId> locusIds, long changedSince, @Nullable ComponentName componentName, int queryFlags, int userId, ArrayList<ShortcutInfo> ret, int cloneFlag, int callingPid, int callingUid) { final ArraySet<String> ids = shortcutIds == null ? null : new ArraySet<>(shortcutIds); final ShortcutUser user = getUserShortcutsLocked(userId); final ShortcutPackage p = user.getPackageShortcutsIfExists(packageName); if (p == null) { return; // No need to instantiate ShortcutPackage. } final boolean canAccessAllShortcuts = canSeeAnyPinnedShortcut(callingPackage, launcherUserId, callingPid, callingUid); final boolean getPinnedByAnyLauncher = canAccessAllShortcuts && ((queryFlags & ShortcutQuery.FLAG_MATCH_PINNED_BY_ANY_LAUNCHER) != 0); queryFlags |= (getPinnedByAnyLauncher ? ShortcutQuery.FLAG_MATCH_PINNED : 0); final Predicate<ShortcutInfo> filter = getFilterFromQuery(ids, locusIds, changedSince, componentName, queryFlags, getPinnedByAnyLauncher); p.findAll(ret, filter, cloneFlag, callingPackage, launcherUserId, getPinnedByAnyLauncher); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShortcutsInnerLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
getShortcutsInnerLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
protected final double _parseDoublePrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { String text; switch (p.currentTokenId()) { case JsonTokenId.ID_STRING: text = p.getText(); break; case JsonTokenId.ID_NUMBER_INT: final CoercionAction act = _checkIntToFloatCoercion(p, ctxt, Double.TYPE); if (act == CoercionAction.AsNull) { return 0.0d; } if (act == CoercionAction.AsEmpty) { return 0.0d; } // fall through to coerce case JsonTokenId.ID_NUMBER_FLOAT: return p.getDoubleValue(); case JsonTokenId.ID_NULL: _verifyNullForPrimitive(ctxt); return 0.0; // 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML) case JsonTokenId.ID_START_OBJECT: text = ctxt.extractScalarFromObject(p, this, Double.TYPE); break; case JsonTokenId.ID_START_ARRAY: if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); final double parsed = _parseDoublePrimitive(p, ctxt); _verifyEndArrayForSingle(p, ctxt); return parsed; } // fall through default: return ((Number) ctxt.handleUnexpectedToken(Double.TYPE, p)).doubleValue(); } // 18-Nov-2020, tatu: Special case, Not-a-Numbers as String need to be // considered "native" representation as JSON does not allow as numbers, // and hence not bound by coercion rules { Double nan = this._checkDoubleSpecialValue(text); if (nan != null) { return nan.doubleValue(); } } final CoercionAction act = _checkFromStringCoercion(ctxt, text, LogicalType.Integer, Double.TYPE); if (act == CoercionAction.AsNull) { // 03-May-2021, tatu: Might not be allowed (should we do "empty" check?) _verifyNullForPrimitive(ctxt); return 0.0; } if (act == CoercionAction.AsEmpty) { return 0.0; } text = text.trim(); if (_hasTextualNull(text)) { _verifyNullForPrimitiveCoercion(ctxt, text); return 0.0; } return _parseDoublePrimitive(p, ctxt, text); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2022-42003 - Severity: HIGH - CVSS Score: 7.5 Description: Fix #3590 Function: _parseDoublePrimitive File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java Repository: FasterXML/jackson-databind Fixed Code: protected final double _parseDoublePrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { String text; switch (p.currentTokenId()) { case JsonTokenId.ID_STRING: text = p.getText(); break; case JsonTokenId.ID_NUMBER_INT: final CoercionAction act = _checkIntToFloatCoercion(p, ctxt, Double.TYPE); if (act == CoercionAction.AsNull) { return 0.0d; } if (act == CoercionAction.AsEmpty) { return 0.0d; } // fall through to coerce case JsonTokenId.ID_NUMBER_FLOAT: return p.getDoubleValue(); case JsonTokenId.ID_NULL: _verifyNullForPrimitive(ctxt); return 0.0; // 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML) case JsonTokenId.ID_START_OBJECT: text = ctxt.extractScalarFromObject(p, this, Double.TYPE); break; case JsonTokenId.ID_START_ARRAY: if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { if (p.nextToken() == JsonToken.START_ARRAY) { return (double) handleNestedArrayForSingle(p, ctxt); } final double parsed = _parseDoublePrimitive(p, ctxt); _verifyEndArrayForSingle(p, ctxt); return parsed; } // fall through default: return ((Number) ctxt.handleUnexpectedToken(Double.TYPE, p)).doubleValue(); } // 18-Nov-2020, tatu: Special case, Not-a-Numbers as String need to be // considered "native" representation as JSON does not allow as numbers, // and hence not bound by coercion rules { Double nan = this._checkDoubleSpecialValue(text); if (nan != null) { return nan.doubleValue(); } } final CoercionAction act = _checkFromStringCoercion(ctxt, text, LogicalType.Integer, Double.TYPE); if (act == CoercionAction.AsNull) { // 03-May-2021, tatu: Might not be allowed (should we do "empty" check?) _verifyNullForPrimitive(ctxt); return 0.0; } if (act == CoercionAction.AsEmpty) { return 0.0; } text = text.trim(); if (_hasTextualNull(text)) { _verifyNullForPrimitiveCoercion(ctxt, text); return 0.0; } return _parseDoublePrimitive(p, ctxt, text); }
[ "CWE-502" ]
CVE-2022-42003
HIGH
7.5
FasterXML/jackson-databind
_parseDoublePrimitive
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
d78d00ee7b5245b93103fef3187f70543d67ca33
1
Analyze the following code function for security vulnerabilities
@SystemApi @NonNull @RequiresPermission(Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY) public Set<String> getAutoRevokeExemptionGrantedPackages() { try { return CollectionUtils.toSet(mPermissionManager.getAutoRevokeExemptionGrantedPackages( mContext.getUser().getIdentifier())); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAutoRevokeExemptionGrantedPackages File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
getAutoRevokeExemptionGrantedPackages
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
@Override public void updatePersistentConfigurationWithAttribution(Configuration values, String callingPackage, String callingAttributionTag) { enforceCallingPermission(CHANGE_CONFIGURATION, "updatePersistentConfiguration()"); enforceWriteSettingsPermission("updatePersistentConfiguration()", callingPackage, callingAttributionTag); if (values == null) { throw new NullPointerException("Configuration must not be null"); } int userId = UserHandle.getCallingUserId(); mActivityTaskManager.updatePersistentConfiguration(values, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePersistentConfigurationWithAttribution File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
updatePersistentConfigurationWithAttribution
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
LockTaskController getLockTaskController() { return mLockTaskController; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockTaskController 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
getLockTaskController
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public Experiment create(K8sClient api) { try { if (LOG.isDebugEnabled()) { LOG.debug("Create XGBoostJob resource: \n{}", YamlUtils.toPrettyYaml(this)); } XGBoostJob xgBoostJob = api.getXGBoostJobClient() .create(getMetadata().getNamespace(), this, new CreateOptions()) .throwsApiException().getObject(); return parseExperimentResponseObject(xgBoostJob, XGBoostJob.class); } catch (ApiException e) { LOG.error("K8s submitter: parse XGBoostJob object failed by " + e.getMessage(), e); throw new SubmarineRuntimeException(e.getCode(), "K8s submitter: parse XGBoostJob object failed by " + e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java Repository: apache/submarine The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-46302
CRITICAL
9.8
apache/submarine
create
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
0
Analyze the following code function for security vulnerabilities
public void updateScanDetailCacheFromScanDetailForSavedNetwork(ScanDetail scanDetail) { WifiConfiguration network = getSavedNetworkForScanDetail(scanDetail); if (network == null) { return; } saveToScanDetailCacheForNetwork(network, scanDetail); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateScanDetailCacheFromScanDetailForSavedNetwork File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
updateScanDetailCacheFromScanDetailForSavedNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private final boolean finishReceiverLocked(IBinder receiver, int resultCode, String resultData, Bundle resultExtras, boolean resultAbort) { final BroadcastRecord r = broadcastRecordForReceiverLocked(receiver); if (r == null) { Slog.w(TAG, "finishReceiver called but not found on queue"); return false; } return r.queue.finishReceiverLocked(r, resultCode, resultData, resultExtras, resultAbort, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishReceiverLocked 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
finishReceiverLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") public @Nullable Map<String, String> getOverlayableMap(String packageName) { synchronized (this) { ensureValidLocked(); return nativeGetOverlayableMap(mObject, packageName); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOverlayableMap File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
getOverlayableMap
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public boolean isLeftVoiceAssist() { return mLeftIsVoiceAssist; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLeftVoiceAssist File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isLeftVoiceAssist
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public void handleMessage(Message msg) { switch (msg.what) { case CHOOSER_TARGET_SERVICE_RESULT: if (DEBUG) Log.d(TAG, "CHOOSER_TARGET_SERVICE_RESULT"); if (isDestroyed()) break; final ServiceResultInfo sri = (ServiceResultInfo) msg.obj; if (!mServiceConnections.contains(sri.connection)) { Log.w(TAG, "ChooserTargetServiceConnection " + sri.connection + " returned after being removed from active connections." + " Have you considered returning results faster?"); break; } if (sri.resultTargets != null) { mChooserListAdapter.addServiceResults(sri.originalTarget, sri.resultTargets); } unbindService(sri.connection); sri.connection.destroy(); mServiceConnections.remove(sri.connection); if (mServiceConnections.isEmpty()) { mChooserHandler.removeMessages(CHOOSER_TARGET_SERVICE_WATCHDOG_TIMEOUT); sendVoiceChoicesIfNeeded(); } break; case CHOOSER_TARGET_SERVICE_WATCHDOG_TIMEOUT: if (DEBUG) { Log.d(TAG, "CHOOSER_TARGET_SERVICE_WATCHDOG_TIMEOUT; unbinding services"); } unbindRemainingServices(); sendVoiceChoicesIfNeeded(); break; default: super.handleMessage(msg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleMessage File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
handleMessage
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
ActivityInfo getActivityInfoForUser(ActivityInfo aInfo, int userId) { if (aInfo == null || (userId < 1 && aInfo.applicationInfo.uid < UserHandle.PER_USER_RANGE)) { return aInfo; } ActivityInfo info = new ActivityInfo(aInfo); info.applicationInfo = getAppInfoForUser(info.applicationInfo, userId); return info; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActivityInfoForUser 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
getActivityInfoForUser
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void tempAllowlistForPendingIntent(int callerPid, int callerUid, int targetUid, long duration, int type, @ReasonCode int reasonCode, String reason) { synchronized (ActivityManagerService.this) { ActivityManagerService.this.tempAllowlistForPendingIntentLocked( callerPid, callerUid, targetUid, duration, type, reasonCode, reason); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tempAllowlistForPendingIntent File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
tempAllowlistForPendingIntent
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public void requestTelephonyBugReport(String shareTitle, String shareDescription) { requestBugReportWithDescription(shareTitle, shareDescription, BugreportParams.BUGREPORT_MODE_TELEPHONY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestTelephonyBugReport File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
requestTelephonyBugReport
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void writeMapEnd() throws TException {}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeMapEnd File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
writeMapEnd
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
public static @NotNull Relocation of(@NotNull String from, @NotNull String to) { return new Relocation(from, to); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: of File: src/main/java/dev/hypera/dragonfly/relocation/Relocation.java Repository: HyperaDev/Dragonfly The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
of
src/main/java/dev/hypera/dragonfly/relocation/Relocation.java
9661375e1135127ca6cdb5712e978bec33cc06b3
0
Analyze the following code function for security vulnerabilities
@Override public void batterySendBroadcast(Intent intent) { synchronized (this) { broadcastIntentLocked(null, null, null, intent, null, null, 0, null, null, null, null, null, OP_NONE, null, false, false, -1, SYSTEM_UID, Binder.getCallingUid(), Binder.getCallingPid(), UserHandle.USER_ALL); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: batterySendBroadcast File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
batterySendBroadcast
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void resetRateLimiting() { if (ShortcutService.DEBUG) { Slog.d(TAG, "resetRateLimiting: " + getPackageName()); } if (mApiCallCount > 0) { mApiCallCount = 0; scheduleSave(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetRateLimiting File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
resetRateLimiting
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
public String displayTooltip(String fieldname) { if (this.currentObj == null) { return this.doc.displayTooltip(fieldname, getXWikiContext()); } else { return this.doc.displayTooltip(fieldname, this.currentObj.getBaseObject(), getXWikiContext()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: displayTooltip 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
displayTooltip
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
@Override protected void onPostExecute(Spanned spanned) { mBodyView.removeTextChangedListener(ComposeActivity.this); setBody(spanned, false); mTextChanged = false; mBodyView.addTextChangedListener(ComposeActivity.this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPostExecute 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
onPostExecute
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@Column(name = "ip", length = 64) public String getIp() { return this.ip; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2020-21333 - Severity: LOW - CVSS Score: 3.5 Description: https://github.com/sanluan/PublicCMS/issues/26 https://github.com/sanluan/PublicCMS/issues/27 Function: getIp File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS Fixed Code: @Column(name = "ip", length = 130) public String getIp() { return this.ip; }
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getIp
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
1
Analyze the following code function for security vulnerabilities
public ObjectSummary toRestObjectSummary(URI baseUri, Document doc, BaseObject xwikiObject, boolean useVersion, Boolean withPrettyNames) { ObjectSummary objectSummary = objectFactory.createObjectSummary(); fillObjectSummary(objectSummary, doc, xwikiObject, withPrettyNames); Link objectLink = getObjectLink(objectFactory, baseUri, doc, xwikiObject, useVersion, Relations.OBJECT); objectSummary.getLinks().add(objectLink); String propertiesUri; if (useVersion) { propertiesUri = Utils.createURI(baseUri, ObjectPropertiesAtPageVersionResource.class, doc.getWiki(), Utils.getSpacesFromSpaceId(doc.getSpace()), doc.getDocumentReference().getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString(); } else { propertiesUri = Utils.createURI(baseUri, ObjectPropertiesResource.class, doc.getWiki(), Utils.getSpacesFromSpaceId(doc.getSpace()), doc.getDocumentReference().getName(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString(); } Link propertyLink = objectFactory.createLink(); propertyLink.setHref(propertiesUri); propertyLink.setRel(Relations.PROPERTIES); objectSummary.getLinks().add(propertyLink); return objectSummary; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toRestObjectSummary File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-35151
HIGH
7.5
xwiki/xwiki-platform
toRestObjectSummary
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
824cd742ecf5439971247da11bfe7e0ad2b10ede
0
Analyze the following code function for security vulnerabilities
public static String getCacheParentDirectory(String filePath) { String path = filePath; String tempPath; String cacheDir = CacheLRUWrapper.getInstance().getCacheDir().getFullPath(); while (path.startsWith(cacheDir) && !path.equals(cacheDir)) { tempPath = new File(path).getParent(); if (tempPath.equals(cacheDir)) break; path = tempPath; } return path; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCacheParentDirectory 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
getCacheParentDirectory
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
@Override public void setFrontActivityScreenCompatMode(int mode) { enforceCallingPermission(android.Manifest.permission.SET_SCREEN_COMPATIBILITY, "setFrontActivityScreenCompatMode"); synchronized (this) { mCompatModePackages.setFrontActivityScreenCompatModeLocked(mode); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFrontActivityScreenCompatMode 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
setFrontActivityScreenCompatMode
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void publishService(IBinder token, Intent intent, IBinder service) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: publishService File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
publishService
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public static void execute(String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String terminalWidth) { initializeSsl(); HttpURLConnection conn = createHttpUrlConnection(convertToUrl(url), proxyHost, proxyPort, proxyUsername, proxyPassword); conn.setInstanceFollowRedirects(false); setRequestMethod(conn, Utils.RequestMethod.GET); handleResponse(conn, getStatusCode(conn), terminalWidth); Authenticator.setDefault(null); }
Vulnerability Classification: - CWE: CWE-306 - CVE: CVE-2021-32700 - Severity: MEDIUM - CVSS Score: 5.8 Description: Fix central connection Function: execute File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java Repository: ballerina-platform/ballerina-lang Fixed Code: public static void execute(String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String terminalWidth) { HttpsURLConnection conn = createHttpsUrlConnection(convertToUrl(url), proxyHost, proxyPort, proxyUsername, proxyPassword); conn.setInstanceFollowRedirects(false); setRequestMethod(conn, Utils.RequestMethod.GET); handleResponse(conn, getStatusCode(conn), terminalWidth); Authenticator.setDefault(null); }
[ "CWE-306" ]
CVE-2021-32700
MEDIUM
5.8
ballerina-platform/ballerina-lang
execute
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
4609ffee1744ecd16aac09303b1783bf0a525816
1
Analyze the following code function for security vulnerabilities
public static boolean zipAll(File rootFile, File targetZipFile, boolean withMetadata) { Set<String> fileSet = new HashSet<>(); String[] files = rootFile.list(); for (int i = 0; i < files.length; i++) { fileSet.add(files[i]); } return zip(fileSet, rootFile, targetZipFile, VFSAllItemsFilter.ACCEPT_ALL, withMetadata); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: zipAll File: src/main/java/org/olat/core/util/ZipUtil.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
zipAll
src/main/java/org/olat/core/util/ZipUtil.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
private String getFirstMatch(String[] client, String[] server) throws NegotiateException { if (client == null || server == null) throw new IllegalArgumentException(); if (client.length == 0) return null; for (String aClient : client) { for (String aServer : server) { if (aClient.equals(aServer)) return aClient; } } throw new NegotiateException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFirstMatch File: src/main/java/com/trilead/ssh2/transport/KexManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
getFirstMatch
src/main/java/com/trilead/ssh2/transport/KexManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
private void verifyAudioRoute(int expectedRoute) throws Exception { // Capture all onCallAudioStateChanged callbacks to InCall. CallAudioRouteStateMachine carsm = mTelecomSystem.getCallsManager() .getCallAudioManager().getCallAudioRouteStateMachine(); CallAudioModeStateMachine camsm = mTelecomSystem.getCallsManager() .getCallAudioManager().getCallAudioModeStateMachine(); waitForHandlerAction(camsm.getHandler(), TEST_TIMEOUT); final boolean[] success = {true}; carsm.sendMessage(CallAudioRouteStateMachine.RUN_RUNNABLE, (Runnable) () -> { ArgumentCaptor<CallAudioState> callAudioStateArgumentCaptor = ArgumentCaptor.forClass( CallAudioState.class); try { verify(mInCallServiceFixtureX.getTestDouble(), atLeastOnce()) .onCallAudioStateChanged(callAudioStateArgumentCaptor.capture()); } catch (RemoteException e) { fail("Remote exception in InCallServiceFixture"); } List<CallAudioState> changes = callAudioStateArgumentCaptor.getAllValues(); assertEquals(expectedRoute, changes.get(changes.size() - 1).getRoute()); success[0] = true; }); waitForHandlerAction(carsm.getHandler(), TEST_TIMEOUT); assertTrue(success[0]); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyAudioRoute File: tests/src/com/android/server/telecom/tests/VideoCallTests.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
verifyAudioRoute
tests/src/com/android/server/telecom/tests/VideoCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@LargeTest @Test public void testTelecomManagerAcceptRingingCall() throws Exception { IdPair ids = startIncomingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA); assertEquals(Call.STATE_RINGING, mInCallServiceFixtureX.getCall(ids.mCallId).getState()); assertEquals(Call.STATE_RINGING, mInCallServiceFixtureY.getCall(ids.mCallId).getState()); // Use TelecomManager API to answer the ringing call. TelecomManager telecomManager = (TelecomManager) mComponentContextFixture.getTestDouble() .getApplicationContext().getSystemService(Context.TELECOM_SERVICE); telecomManager.acceptRingingCall(); waitForHandlerAction(mTelecomSystem.getCallsManager() .getConnectionServiceFocusManager().getHandler(), TEST_TIMEOUT); verify(mConnectionServiceFixtureA.getTestDouble(), timeout(TEST_TIMEOUT)) .answer(eq(ids.mConnectionId), any()); mConnectionServiceFixtureA.sendSetActive(ids.mConnectionId); mInCallServiceFixtureX.mInCallAdapter.disconnectCall(ids.mCallId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testTelecomManagerAcceptRingingCall File: tests/src/com/android/server/telecom/tests/BasicCallTests.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testTelecomManagerAcceptRingingCall
tests/src/com/android/server/telecom/tests/BasicCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Override public void setCrossProfileCalendarPackages(ComponentName who, List<String> packageNames) { if (!mHasFeature) { return; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerLocked(caller); admin.mCrossProfileCalendarPackages = packageNames; saveSettingsLocked(caller.getUserId()); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_CROSS_PROFILE_CALENDAR_PACKAGES) .setAdmin(who) .setStrings(packageNames == null ? null : packageNames.toArray(new String[packageNames.size()])) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCrossProfileCalendarPackages 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
setCrossProfileCalendarPackages
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public int describeContents() { return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: describeContents File: core/java/android/os/PersistableBundle.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40074
MEDIUM
5.5
android
describeContents
core/java/android/os/PersistableBundle.java
40e4ea759743737958dde018f3606d778f7a53f3
0
Analyze the following code function for security vulnerabilities
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mHomeSp, flags); dest.writeParcelable(mCredential, flags); dest.writeParcelable(mPolicy, flags); dest.writeParcelable(mSubscriptionUpdate, flags); writeTrustRootCerts(dest, mTrustRootCertList); dest.writeInt(mUpdateIdentifier); dest.writeInt(mCredentialPriority); dest.writeLong(mSubscriptionCreationTimeInMillis); dest.writeLong(mSubscriptionExpirationTimeMillis); dest.writeString(mSubscriptionType); dest.writeLong(mUsageLimitUsageTimePeriodInMinutes); dest.writeLong(mUsageLimitStartTimeInMillis); dest.writeLong(mUsageLimitDataLimit); dest.writeLong(mUsageLimitTimeLimitInMinutes); dest.writeStringArray(mAaaServerTrustedNames); Bundle bundle = new Bundle(); bundle.putSerializable("serviceFriendlyNames", (HashMap<String, String>) mServiceFriendlyNames); dest.writeBundle(bundle); dest.writeInt(mCarrierId); dest.writeBoolean(mIsAutojoinEnabled); dest.writeBoolean(mIsMacRandomizationEnabled); dest.writeBoolean(mIsNonPersistentMacRandomizationEnabled); dest.writeInt(mMeteredOverride); dest.writeInt(mSubscriptionId); dest.writeBoolean(mIsCarrierMerged); dest.writeBoolean(mIsOemPaid); dest.writeBoolean(mIsOemPrivate); dest.writeString(mDecoratedIdentityPrefix); dest.writeParcelable(mSubscriptionGroup, flags); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeToParcel File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
writeToParcel
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
@Override public boolean setSelected(Collection<?> itemIds) throws IllegalArgumentException { if (itemIds == null) { throw new IllegalArgumentException("itemIds may not be null"); } checkItemIdsExist(itemIds); boolean changed = false; Set<Object> selectedRows = new HashSet<Object>(itemIds); final Collection<Object> oldSelection = getSelectedRows(); Set<Object> added = getDifference(selectedRows, selection); if (!added.isEmpty()) { changed = true; selection.addAll(added); for (Object id : added) { refreshRow(id); } } Set<Object> removed = getDifference(selection, selectedRows); if (!removed.isEmpty()) { changed = true; selection.removeAll(removed); for (Object id : removed) { refreshRow(id); } } if (changed) { fireSelectionEvent(oldSelection, selection); } updateAllSelectedState(); return changed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSelected File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
setSelected
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public void setUrl(@Nullable URI url) { this.url = url; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public void setDraggable(I_CmsDraggable draggable) { m_draggable = draggable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDraggable File: src-gwt/org/opencms/ade/galleries/client/ui/CmsResultItemWidget.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-31544
MEDIUM
5.4
alkacon/opencms-core
setDraggable
src-gwt/org/opencms/ade/galleries/client/ui/CmsResultItemWidget.java
21bfbeaf6b038e2c03bb421ce7f0933dd7a7633e
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasShortcutHostPermission(int launcherUserId, @NonNull String callingPackage, int callingPid, int callingUid) { return ShortcutService.this.hasShortcutHostPermission(callingPackage, launcherUserId, callingPid, callingUid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasShortcutHostPermission File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
hasShortcutHostPermission
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
private @Mode int findInteractAcrossProfilesResetMode(String packageName) { return getDefaultCrossProfilePackages().contains(packageName) ? AppOpsManager.MODE_ALLOWED : AppOpsManager.opToDefaultMode(AppOpsManager.OP_INTERACT_ACROSS_PROFILES); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findInteractAcrossProfilesResetMode 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
findInteractAcrossProfilesResetMode
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@TestApi @RequiresPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public void setOverrideKeepProfilesRunning(boolean enabled) { if (mService != null) { try { mService.setOverrideKeepProfilesRunning(enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOverrideKeepProfilesRunning 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
setOverrideKeepProfilesRunning
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void appNotRespondingViaProvider(IBinder connection) { enforceCallingPermission(REMOVE_TASKS, "appNotRespondingViaProvider()"); final ContentProviderConnection conn = (ContentProviderConnection) connection; if (conn == null) { Slog.w(TAG, "ContentProviderConnection is null"); return; } final ProcessRecord host = conn.provider.proc; if (host == null) { Slog.w(TAG, "Failed to find hosting ProcessRecord"); return; } mHandler.post(new Runnable() { @Override public void run() { mAppErrors.appNotResponding(host, null, null, false, "ContentProvider not responding"); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appNotRespondingViaProvider 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
appNotRespondingViaProvider
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
default Optional<String> getContentType() { return findFirst(CONTENT_TYPE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentType File: http/src/main/java/io/micronaut/http/HttpHeaders.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
getContentType
http/src/main/java/io/micronaut/http/HttpHeaders.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
@Override public String getPath() { return "/log"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPath File: lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java Repository: lukashinsch/spring-boot-actuator-logview The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-21234
MEDIUM
4
lukashinsch/spring-boot-actuator-logview
getPath
lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java
760acbb939a8d1f7d1a7dfcd51ca848eea04e772
0
Analyze the following code function for security vulnerabilities
public Builder setMethod(AccessMethod method) { this.method = Preconditions.checkNotNull(method); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMethod File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java Repository: googleapis/google-oauth-java-client The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-7692
MEDIUM
6.4
googleapis/google-oauth-java-client
setMethod
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
13433cd7dd06267fc261f0b1d4764f8e3432c824
0
Analyze the following code function for security vulnerabilities
protected abstract TextEncodingDetails calculateLength(CharSequence messageBody, boolean use7bitOnly);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calculateLength File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
calculateLength
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
@Override public String getProjectId(String projectId) { return getProjectId(projectId, Project::getZentaoId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProjectId File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getProjectId
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
@Override public SSLParameters getSSLParameters() { SSLParameters sslParameters = super.getSSLParameters(); if (PlatformDependent.javaVersion() >= 7) { sslParameters.setEndpointIdentificationAlgorithm(endPointIdentificationAlgorithm); SslParametersUtils.setAlgorithmConstraints(sslParameters, algorithmConstraints); } return sslParameters; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSSLParameters 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
getSSLParameters
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // Nome dos usuario pesquisado String name = req.getParameter("name"); String query = "SELECT * FROM USER WHERE NAME = '" + name + "'"; ResultSet users = Database.execute(query); ArrayList<User> searchedUsers = new ArrayList<User>(); try { while (users.next()){ searchedUsers.add(new User(users.getString(1),users.getString(2),users.getString(3))); } Gson gson = new Gson(); ServletOutputStream os = resp.getOutputStream(); os.print(gson.toJson(searchedUsers)); os.flush(); os.close(); } catch (SQLException e) { e.printStackTrace(); } }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2015-10048 - Severity: MEDIUM - CVSS Score: 5.2 Description: Método de execute alterado para SQLINJECTION , faltando apenas o método de StoredProcedure Function: doPost File: injectIt/src/main/java/com/dextra/injectit/servlets/InjectServlet.java Repository: bmattoso/desafio_buzz_woody Fixed Code: @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // Nome dos usuario pesquisado String name = req.getParameter("name"); String[] names = new String[1]; names[0] = name; String query = "SELECT * FROM USER WHERE NAME = ?"; ResultSet users = Database.execute(query,names); ArrayList<User> searchedUsers = new ArrayList<User>(); try { while (users.next()){ searchedUsers.add(new User(users.getString(1),users.getString(2),users.getString(3))); } Gson gson = new Gson(); ServletOutputStream os = resp.getOutputStream(); os.print(gson.toJson(searchedUsers)); os.flush(); os.close(); } catch (SQLException e) { e.printStackTrace(); } }
[ "CWE-89" ]
CVE-2015-10048
MEDIUM
5.2
bmattoso/desafio_buzz_woody
doPost
injectIt/src/main/java/com/dextra/injectit/servlets/InjectServlet.java
cb8220cbae06082c969b1776fcb2fdafb3a1006b
1
Analyze the following code function for security vulnerabilities
public boolean killProcessesBelowForeground(String reason) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killProcessesBelowForeground File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
killProcessesBelowForeground
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected String getPagesInfo(Pages pages) { StringBuffer sb = new StringBuffer(); sb.append(String.format("Pages: %d\n", pages.getPageSummaries().size())); for (PageSummary pageSummary : pages.getPageSummaries()) { sb.append(String.format("* %s\n", pageSummary.getFullName())); } return sb.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPagesInfo File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
getPagesInfo
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
private static String getStringFromClob( java.sql.Clob clob ) throws IOException, SQLException { Reader reader = clob.getCharacterStream(); StringBuilder s = new StringBuilder(); int c; while ((c = reader.read()) != -1) { s.append((char) c); } return s.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStringFromClob File: core/src/main/java/org/opencrx/kernel/tools/CopyDb.java Repository: opencrx The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-25959
MEDIUM
4.3
opencrx
getStringFromClob
core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
14e75f95e5f56fbe7ee897bdf5d858788072e818
0
Analyze the following code function for security vulnerabilities
public void switchToContactDetails(Contact contact, String messageFingerprint) { Intent intent = new Intent(this, ContactDetailsActivity.class); intent.setAction(ContactDetailsActivity.ACTION_VIEW_CONTACT); intent.putExtra(EXTRA_ACCOUNT, contact.getAccount().getJid().asBareJid().toString()); intent.putExtra("contact", contact.getJid().toString()); intent.putExtra("fingerprint", messageFingerprint); startActivity(intent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: switchToContactDetails File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
switchToContactDetails
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
int getBondState(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device); if (deviceProp == null) { return BluetoothDevice.BOND_NONE; } return deviceProp.getBondState(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBondState 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
getBondState
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0