instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public boolean isNetworkRestrictedForUid(int uid) { if (ensureHasNetworkManagementInternal()) { return mNmi.isNetworkRestrictedForUid(uid); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isNetworkRestrictedForUid 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
isNetworkRestrictedForUid
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private boolean showsTimeOrChronometer() { return mN.showsTime() || mN.showsChronometer(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showsTimeOrChronometer File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
showsTimeOrChronometer
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public static String getCookie(HttpServletRequest req,String name, String defaultValue) { Cookie c = getCookie(req, name); if(c==null || c.getValue()==null) return defaultValue; return c.getValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCookie File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
getCookie
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Test public void deleteByCqlWrapperThatThrowsException(TestContext context) { CQLWrapper cqlWrapper = new CQLWrapper() { public String toString() { throw new RuntimeException("ping pong"); } }; createFoo(context).delete(FOO, cqlWrapper, context.asyncAssertFailure(fail -> { context.assertTrue(fail.getMessage().contains("ping pong")); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteByCqlWrapperThatThrowsException File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
deleteByCqlWrapperThatThrowsException
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
void logDurationStat(int statId, long start) { mStatLogger.logDurationStat(statId, start); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logDurationStat 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
logDurationStat
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void setUserSetupComplete(boolean userSetupComplete) { mUserSetupComplete = userSetupComplete; updateCameraVisibility(); updateLeftAffordanceIcon(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserSetupComplete 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
setUserSetupComplete
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private boolean applyHighlightToMatchRegions( Spannable str, List<MatchClassification> classifications) { boolean hasMatch = false; for (int i = 0; i < classifications.size(); i++) { MatchClassification classification = classifications.get(i); if ((classification.style & MatchClassificationStyle.MATCH) == MatchClassificationStyle.MATCH) { int matchStartIndex = classification.offset; int matchEndIndex; if (i == classifications.size() - 1) { matchEndIndex = str.length(); } else { matchEndIndex = classifications.get(i + 1).offset; } matchStartIndex = Math.min(matchStartIndex, str.length()); matchEndIndex = Math.min(matchEndIndex, str.length()); hasMatch = true; // Bold the part of the URL that matches the user query. str.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), matchStartIndex, matchEndIndex, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } } return hasMatch; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyHighlightToMatchRegions File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
applyHighlightToMatchRegions
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
@Override public String htmlStart(String helpUrl) { return pageHtml(HTML_START, helpUrl); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: htmlStart File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
htmlStart
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public static void validateSelection(String selection, Set<String> allowedColumns) { try { if (selection == null || selection.isEmpty()) { return; } Lexer lexer = new Lexer(selection, allowedColumns); parseExpression(lexer); if (lexer.currentToken() != Lexer.TOKEN_END) { throw new IllegalArgumentException("syntax error"); } } catch (RuntimeException ex) { if (Constants.LOGV) { Log.d(Constants.TAG, "invalid selection [" + selection + "] triggered " + ex); } else if (false) { Log.d(Constants.TAG, "invalid selection triggered " + ex); } throw ex; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateSelection File: src/com/android/providers/downloads/Helpers.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
validateSelection
src/com/android/providers/downloads/Helpers.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public int getIndentAdjust(int line, Alignment alignment) { return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIndentAdjust File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getIndentAdjust
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
@Override public boolean containsShort(K name, short value) { return contains(name, fromShort(name, value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsShort File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
containsShort
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public void setTokenExpirationAdvance(int tokenExpirationAdvance) { this.tokenExpirationAdvance = tokenExpirationAdvance; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTokenExpirationAdvance File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setTokenExpirationAdvance
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
@Override public void onStrongAuthStateChanged(int userId) { mLockIcon.update(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onStrongAuthStateChanged 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
onStrongAuthStateChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static String printLogRecord(LogRecord r) { return formatter.format(r); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: printLogRecord File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
printLogRecord
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
private boolean isStackFrameNotWhitelisted(StackFrame sf) { return isCallNotWhitelisted(sf.getClassName()); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2024-23683 - Severity: HIGH - CVSS Score: 8.2 Description: Merge pull request from GHSA-883x-6fch-6wjx * Blacklist ReflectionUtils.getUnderlyingCause as it is in the invocation This means that trusted classes are no longer have a fully whitelisted stack when the cause is fetched and exception methods are invoked. * Allow security manager to work with method names when checking the stack * Add security test for a malicious InvocationTargetException A variant of the exploit found by Daniel, related to GHSA-883x-6fch-6wjx Co-authored-by: Daniel Kirschten <melodicahaspa@gmail.com> Co-authored-by: Christian Femers <c.femers@tum.de> Co-authored-by: Daniel Kirschten <melodicahaspa@gmail.com> Function: isStackFrameNotWhitelisted File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares Fixed Code: private boolean isStackFrameNotWhitelisted(StackFrame sf) { return isCallNotWhitelisted(sf.getClassName(), sf.getMethodName()); }
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
isStackFrameNotWhitelisted
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
1
Analyze the following code function for security vulnerabilities
static Html4SaxParserContext parse_stream(final Ruby runtime, RubyClass klass, InputStream stream) { Html4SaxParserContext ctx = Html4SaxParserContext.newInstance(runtime, klass); ctx.setInputSource(stream); return ctx; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse_stream File: ext/java/nokogiri/Html4SaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
parse_stream
ext/java/nokogiri/Html4SaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
void onRemovedFromDisplay() { if (mRemovingFromDisplay) { return; } mRemovingFromDisplay = true; ProtoLog.v(WM_DEBUG_APP_TRANSITIONS, "Removing app token: %s", this); getDisplayContent().mOpeningApps.remove(this); getDisplayContent().mUnknownAppVisibilityController.appRemovedOrHidden(this); mWmService.mTaskSnapshotController.onAppRemoved(this); mTaskSupervisor.getActivityMetricsLogger().notifyActivityRemoved(this); mTaskSupervisor.mStoppingActivities.remove(this); waitingToShow = false; // Defer removal of this activity when either a child is animating, or app transition is on // going. App transition animation might be applied on the parent task not on the activity, // but the actual frame buffer is associated with the activity, so we have to keep the // activity while a parent is animating. boolean delayed = isAnimating(TRANSITION | PARENTS | CHILDREN, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION); if (getDisplayContent().mClosingApps.contains(this)) { delayed = true; } else if (getDisplayContent().mAppTransition.isTransitionSet()) { getDisplayContent().mClosingApps.add(this); delayed = true; } else if (mTransitionController.inTransition()) { delayed = true; } // Don't commit visibility if it is waiting to animate. It will be set post animation. if (!delayed) { commitVisibility(false /* visible */, true /* performLayout */); } else { setVisibleRequested(false /* visible */); } // TODO(b/169035022): move to a more-appropriate place. mTransitionController.collect(this); ProtoLog.v(WM_DEBUG_APP_TRANSITIONS, "Removing app %s delayed=%b animation=%s animating=%b", this, delayed, getAnimation(), isAnimating(TRANSITION | PARENTS, ANIMATION_TYPE_APP_TRANSITION)); ProtoLog.v(WM_DEBUG_ADD_REMOVE, "removeAppToken: %s" + " delayed=%b Callers=%s", this, delayed, Debug.getCallers(4)); if (mStartingData != null) { removeStartingWindow(); } // If app transition animation was running for this activity, then we need to ensure that // the app transition notifies that animations have completed in // DisplayContent.handleAnimatingStoppedAndTransition(), so add to that list now if (isAnimating(TRANSITION | PARENTS, ANIMATION_TYPE_APP_TRANSITION)) { getDisplayContent().mNoAnimationNotifyOnTransitionFinished.add(token); } if (delayed && !isEmpty()) { // set the token aside because it has an active animation to be finished ProtoLog.v(WM_DEBUG_ADD_REMOVE, "removeAppToken make exiting: %s", this); mIsExiting = true; } else { // Make sure there is no animation running on this token, so any windows associated // with it will be removed as soon as their animations are complete cancelAnimation(); removeIfPossible(); } stopFreezingScreen(true, true); final DisplayContent dc = getDisplayContent(); if (dc.mFocusedApp == this) { ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "Removing focused app token:%s displayId=%d", this, dc.getDisplayId()); dc.setFocusedApp(null); mWmService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /*updateInputWindows*/); } mLetterboxUiController.destroy(); if (!delayed) { updateReportedVisibilityLocked(); } // Reset the last saved PiP snap fraction on removal. mDisplayContent.mPinnedTaskController.onActivityHidden(mActivityComponent); mDisplayContent.onRunningActivityChanged(); mWmService.mEmbeddedWindowController.onActivityRemoved(this); mRemovingFromDisplay = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRemovedFromDisplay 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
onRemovedFromDisplay
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public void onProgressChanged(WebView view, int newProgress) { parent.fireWebEvent("Progress", new ActionEvent(parent, ActionEvent.Type.Progress, newProgress)); if(!hideProgress && isNativeTitle() && getCurrentForm() != null && getCurrentForm().getTitle() != null && getCurrentForm().getTitle().length() > 0 ){ if(getActivity() != null){ try{ getActivity().setProgressBarVisibility(true); getActivity().setProgress(newProgress * 100); if(newProgress == 100){ getActivity().setProgressBarVisibility(false); } }catch(Throwable t){ } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onProgressChanged 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
onProgressChanged
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public T add(K name, V... values) { validateName(nameValidator, true, name); int h = hashingStrategy.hashCode(name); int i = index(h); for (V v: values) { validateValue(valueValidator, name, v); add0(h, i, name, v); } return thisT(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: add File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
add
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
MissedCallNotifier getMissedCallNotifier() { return mMissedCallNotifier; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMissedCallNotifier 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
getMissedCallNotifier
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
@Test public void testExtractNanosecondDecimal01() { BigDecimal value = new BigDecimal("0"); long seconds = value.longValue(); assertEquals("The second part is not correct.", 0L, seconds); int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); assertEquals("The nanosecond part is not correct.", 0, nanoseconds); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2018-1000873 - Severity: MEDIUM - CVSS Score: 4.3 Description: Refactor TestDecimalUtils to reduce repetition. Function: testExtractNanosecondDecimal01 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDecimalUtils.java Repository: FasterXML/jackson-modules-java8 Fixed Code: @Test public void testExtractNanosecondDecimal01() { BigDecimal value = new BigDecimal("0"); checkExtractNanos(0L, 0, value); }
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testExtractNanosecondDecimal01
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDecimalUtils.java
103f5678fe104cd6934f07f1158fe92a1e2393a7
1
Analyze the following code function for security vulnerabilities
public HardwareBuffer getThumbnail() { return mThumbnail != null ? mThumbnail.getHardwareBuffer() : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getThumbnail File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
getThumbnail
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
public String getExternalURL(DocumentReference documentReference, String action, String querystring, String anchor, XWikiContext context) { URL url = context.getURLFactory().createExternalURL( this.getLocalStringEntityReferenceSerializer().serialize(documentReference.getLastSpaceReference()), documentReference.getName(), action, querystring, anchor, documentReference.getWikiReference().getName(), context); return url.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalURL 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
getExternalURL
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 void updateLockTaskPackages(int userId, String[] packages) { final int callingUid = Binder.getCallingUid(); if (callingUid != 0 && callingUid != Process.SYSTEM_UID) { throw new SecurityException("updateLockTaskPackage called from non-system process"); } synchronized (this) { if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "Whitelisting " + userId + ":" + Arrays.toString(packages)); mLockTaskPackages.put(userId, packages); mStackSupervisor.onLockTaskPackagesUpdatedLocked(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateLockTaskPackages File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
updateLockTaskPackages
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
public void setOnHardKeyboardStatusChangeListener( OnHardKeyboardStatusChangeListener listener) { synchronized (mWindowMap) { mHardKeyboardStatusChangeListener = listener; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOnHardKeyboardStatusChangeListener 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
setOnHardKeyboardStatusChangeListener
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
protected void deleteCookie(String name, HttpServletResponse response) { response.addHeader("Set-Cookie", name + "= ;path=" + cookiePath + "; expires=Thu, 01 Jan 1970 00:00:00 UTC; Secure; HttpOnly; SameSite=none"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteCookie File: src/main/java/com/mxgraph/online/AbsAuthServlet.java Repository: jgraph/drawio The code follows secure coding practices.
[ "CWE-601", "CWE-918" ]
CVE-2022-1767
MEDIUM
5
jgraph/drawio
deleteCookie
src/main/java/com/mxgraph/online/AbsAuthServlet.java
c63f3a04450f30798df47f9badbc74eb8a69fbdf
0
Analyze the following code function for security vulnerabilities
@Override public boolean getAllowOthers() { return allowOthers; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllowOthers File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getAllowOthers
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
private String uploadFile(FileSystemResource resource) { String id = ""; String session = zentaoClient.login(); HttpHeaders httpHeaders = new HttpHeaders(); MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<>(); paramMap.add("files", resource); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(paramMap, httpHeaders); RestTemplate restTemplate = new RestTemplate(); try { String fileUpload = zentaoClient.requestUrl.getFileUpload(); ResponseEntity<String> responseEntity = restTemplate.exchange(fileUpload, HttpMethod.POST, requestEntity, String.class, null, session); String body = responseEntity.getBody(); Map obj = JSON.parseMap(body); Map data = (Map) JSON.parseObject(obj.get("data").toString()); Set<String> set = data.keySet(); if (!set.isEmpty()) { id = (String) set.toArray()[0]; } } catch (Exception e) { LogUtil.error(e, e.getMessage()); } LogUtil.info("upload file id: " + id); return id; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: uploadFile 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
uploadFile
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 int getIntHeader(String name) { return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIntHeader File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getIntHeader
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
private void migrate43(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Settings.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { if (element.elementTextTrim("key").equals("ISSUE")) { Element valueElement = element.element("value"); if (valueElement != null) valueElement.addElement("issueTemplates"); } } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate43 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrate43
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
public String getHttpUserAgent(XWikiContext context) { return getConfiguration().getProperty("xwiki.http.useragent", "XWikiBot/1.0"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHttpUserAgent 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
getHttpUserAgent
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private void notifyCrossProfileProvidersChanged(int userId, List<String> packages) { final List<OnCrossProfileWidgetProvidersChangeListener> listeners; synchronized (getLockObject()) { listeners = new ArrayList<>(mWidgetProviderListeners); } final int listenerCount = listeners.size(); for (int i = 0; i < listenerCount; i++) { OnCrossProfileWidgetProvidersChangeListener listener = listeners.get(i); listener.onCrossProfileWidgetProvidersChanged(userId, packages); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyCrossProfileProvidersChanged 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
notifyCrossProfileProvidersChanged
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public void endListItem(Map<String, String> parameters) { endListItem(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endListItem File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java Repository: xwiki/xwiki-rendering The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
endListItem
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
0
Analyze the following code function for security vulnerabilities
@Override public void clearWifiConnectedNetworkScorer() { mWifiScoreReport.clearWifiConnectedNetworkScorer(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearWifiConnectedNetworkScorer File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
clearWifiConnectedNetworkScorer
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
protected abstract byte[] process(CiphertextHeader header, boolean mode, byte[] input);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: process File: src/main/java/org/cryptacular/bean/AbstractCipherBean.java Repository: vt-middleware/cryptacular The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-7226
MEDIUM
5
vt-middleware/cryptacular
process
src/main/java/org/cryptacular/bean/AbstractCipherBean.java
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
0
Analyze the following code function for security vulnerabilities
private String getFailureDescription(ModelNode result) { if (result.hasDefined(FAILURE_DESCRIPTION)) { return result.get(FAILURE_DESCRIPTION).toString(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFailureDescription File: metrics/src/main/java/org/wildfly/extension/metrics/WildFlyMetric.java Repository: wildfly The code follows secure coding practices.
[ "CWE-200" ]
CVE-2021-3503
MEDIUM
4
wildfly
getFailureDescription
metrics/src/main/java/org/wildfly/extension/metrics/WildFlyMetric.java
a48db605577d941b5ae3e899a1187303e138ca74
0
Analyze the following code function for security vulnerabilities
public String canReceiveKeysReason(boolean fromUserTouch) { return "fromTouch= " + fromUserTouch + " isVisibleRequestedOrAdding=" + isVisibleRequestedOrAdding() + " mViewVisibility=" + mViewVisibility + " mRemoveOnExit=" + mRemoveOnExit + " flags=" + mAttrs.flags + " appWindowsAreFocusable=" + (mActivityRecord == null || mActivityRecord.windowsAreFocusable(fromUserTouch)) + " canReceiveTouchInput=" + canReceiveTouchInput() + " displayIsOnTop=" + getDisplayContent().isOnTop() + " displayIsTrusted=" + getDisplayContent().isTrusted(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canReceiveKeysReason File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
canReceiveKeysReason
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public ISVNAuthenticationProvider createAuthenticationProvider(AbstractProject<?,?> inContextOf) { return new SVNAuthenticationProviderImpl( inContextOf==null ? null : new PerJobCredentialStore(inContextOf),remotableProvider); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createAuthenticationProvider File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
createAuthenticationProvider
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
protected void parseAndProcessStanza(XmlPullParser parser) throws Exception { ParserUtils.assertAtStartTag(parser); int parserDepth = parser.getDepth(); Stanza stanza = null; try { stanza = PacketParserUtils.parseStanza(parser); } catch (Exception e) { CharSequence content = PacketParserUtils.parseContentDepth(parser, parserDepth); UnparseableStanza message = new UnparseableStanza(content, e); ParsingExceptionCallback callback = getParsingExceptionCallback(); if (callback != null) { callback.handleUnparsableStanza(message); } } ParserUtils.assertAtEndTag(parser); if (stanza != null) { processStanza(stanza); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseAndProcessStanza File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
parseAndProcessStanza
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public void setPrimary(final Entry<P> primary) { if (primary == null) { throw new IllegalArgumentException("the primary entry must be non-null"); } if (primary.getStatus() != KeyStatusType.ENABLED) { throw new IllegalArgumentException("the primary entry has to be ENABLED"); } List<Entry<P>> entries = getPrimitive(primary.getIdentifier()); if (entries.isEmpty()) { throw new IllegalArgumentException( "the primary entry cannot be set to an entry which is not held by this primitive set"); } this.primary = primary; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPrimary File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java Repository: tink-crypto/tink The code follows secure coding practices.
[ "CWE-176" ]
CVE-2020-8929
MEDIUM
5
tink-crypto/tink
setPrimary
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
93d839a5865b9d950dffdc9d0bc99b71280a8899
0
Analyze the following code function for security vulnerabilities
public JSONArray optJSONArray(int index) { Object o = opt(index); return o instanceof JSONArray ? (JSONArray)o : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optJSONArray File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
optJSONArray
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
private void notifyDefaultDisplayCallbacks(boolean showing) { // TODO(b/140053364) whitelistIpcs(() -> { int size = mKeyguardStateCallbacks.size(); for (int i = size - 1; i >= 0; i--) { IKeyguardStateCallback callback = mKeyguardStateCallbacks.get(i); try { callback.onShowingStateChanged(showing, KeyguardUpdateMonitor.getCurrentUser()); } catch (RemoteException e) { Slog.w(TAG, "Failed to call onShowingStateChanged", e); if (e instanceof DeadObjectException) { mKeyguardStateCallbacks.remove(callback); } } } }); updateInputRestrictedLocked(); mUiBgExecutor.execute(() -> { mTrustManager.reportKeyguardShowingChanged(); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyDefaultDisplayCallbacks File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
notifyDefaultDisplayCallbacks
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
@Test public void testPUTGETAttachments() throws Exception { /* Test normal random UUID method */ String randomStr = String.format("%s.txt", UUID.randomUUID()); /* Test filenames requiring url encoding */ putAttachmentFilename(randomStr, "random"); putAttachmentFilename("my attach.txt", "space"); putAttachmentFilename("^caret.txt", "caret"); putAttachmentFilename("#pound.txt", "pound"); putAttachmentFilename("%percent.txt", "percent"); putAttachmentFilename("{brace}.txt", "braces"); putAttachmentFilename("[bracket].txt", "brackets"); /** Causes XWIKI-7874 **/ putAttachmentFilename("plus+plus.txt", "plus"); // Now get all the attachments. String attachmentsUri = buildURIForThisPage(AttachmentsResource.class); GetMethod getMethod = executeGet(attachmentsUri); Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode()); Attachments attachments = (Attachments) this.unmarshaller.unmarshal(getMethod.getResponseBodyAsStream()); Assert.assertEquals(8, attachments.getAttachments().size()); // Clean the wiki for further tests: WikisResourceTest use a list of attachments and might fail // if we don't clean here. DocumentReference documentReference = new DocumentReference(this.wikiName, this.spaces, this.pageName); this.testUtils.deleteAttachement(documentReference, "my attach.txt"); this.testUtils.deleteAttachement(documentReference, "^caret.txt"); this.testUtils.deleteAttachement(documentReference, "#pound.txt"); this.testUtils.deleteAttachement(documentReference, "%percent.txt"); this.testUtils.deleteAttachement(documentReference, "{brace}.txt"); this.testUtils.deleteAttachement(documentReference, "[bracket].txt"); this.testUtils.deleteAttachement(documentReference, "plus+plus.txt"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testPUTGETAttachments File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
testPUTGETAttachments
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
void updateUsageStats(ActivityRecord component, boolean resumed) { if (DEBUG_SWITCH) Slog.d(TAG, "updateUsageStats: comp=" + component + "res=" + resumed); final BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); if (resumed) { if (mUsageStatsService != null) { mUsageStatsService.reportEvent(component.realActivity, component.userId, UsageEvents.Event.MOVE_TO_FOREGROUND); } synchronized (stats) { stats.noteActivityResumedLocked(component.app.uid); } } else { if (mUsageStatsService != null) { mUsageStatsService.reportEvent(component.realActivity, component.userId, UsageEvents.Event.MOVE_TO_BACKGROUND); } synchronized (stats) { stats.noteActivityPausedLocked(component.app.uid); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUsageStats 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
updateUsageStats
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public SVNURL getRepositoryRoot(AbstractProject context) throws SVNException { getUUID(context); return repositoryRoot; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRepositoryRoot File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
getRepositoryRoot
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
protected DataRequestRpc createRpc() { return new SimpleDataRequestRpc(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createRpc File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-20" ]
CVE-2021-33609
MEDIUM
4
vaadin/framework
createRpc
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
0
Analyze the following code function for security vulnerabilities
private void updateUnlockIcon() { if (mStatusBar.getBarState() == StatusBarState.KEYGUARD || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED) { boolean active = getMaxPanelHeight() - getExpandedHeight() > mUnlockMoveDistance; KeyguardAffordanceView lockIcon = mKeyguardBottomArea.getLockIcon(); if (active && !mUnlockIconActive && mTracking) { lockIcon.setImageAlpha(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN, null); lockIcon.setImageScale(LOCK_ICON_ACTIVE_SCALE, true, 150, Interpolators.FAST_OUT_LINEAR_IN); } else if (!active && mUnlockIconActive && mTracking) { lockIcon.setImageAlpha(lockIcon.getRestingAlpha(), true /* animate */, 150, Interpolators.FAST_OUT_LINEAR_IN, null); lockIcon.setImageScale(1.0f, true, 150, Interpolators.FAST_OUT_LINEAR_IN); } mUnlockIconActive = active; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUnlockIcon File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
updateUnlockIcon
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public void onAuthenticationAcquired(int acquireInfo) { handleFingerprintAcquired(acquireInfo); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAuthenticationAcquired File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
onAuthenticationAcquired
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public void setPreferentialNetworkServiceConfigs( @NonNull List<PreferentialNetworkServiceConfig> preferentialNetworkServiceConfigs) { throwIfParentInstance("setPreferentialNetworkServiceConfigs"); if (mService == null) { return; } try { mService.setPreferentialNetworkServiceConfigs(preferentialNetworkServiceConfigs); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPreferentialNetworkServiceConfigs 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
setPreferentialNetworkServiceConfigs
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public int getAnimationType() { return mAnimationType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAnimationType File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
getAnimationType
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Test @Order(1) void createApplicationWhenDefaultWikiSyntaxIsPlain(TestReference testReference, TestUtils testUtils, XWikiWebDriver driver) throws Exception { testUtils.loginAsSuperAdmin(); String defaultDocSyntax = testUtils.setWikiPreference("core.defaultDocumentSyntax", "plain/1.0"); String appName = testReference.getLastSpaceReference().getName(); AppWithinMinutesHomePage.gotoPage().deleteApplication(appName); testUtils.login(USER_NAME, PASSWORD); try { ApplicationCreatePage appCreatePage = AppWithinMinutesHomePage.gotoPage().clickCreateApplication(); appCreatePage.setApplicationName(appName); ApplicationClassEditPage classEditPage = appCreatePage.clickNextStep(); classEditPage.addField("Short Text"); ApplicationHomeEditPage appHomeEditPage = classEditPage.clickNextStep().clickNextStep(); appHomeEditPage.setDescription("one **two** three"); ApplicationHomePage appHomePage = appHomeEditPage.clickFinish(); // Verify that the application home page was created with the right syntax. assertTrue(driver.getPageSource().contains("one <strong>two</strong> three"), "The application description is not rendered properly on the application home page."); EntryNamePane entryNamePage = appHomePage.clickAddNewEntry(); entryNamePage.setName("Test"); EntryEditPage entryEditPage = entryNamePage.clickAdd(); String value = "0123456789"; entryEditPage.setValue("shortText1", value); ViewPage entryViewPage = entryEditPage.clickSaveAndView(); // Verify that the application sheet was created with the right syntax. assertTrue(entryViewPage.getContent().contains(value), "The entry view page doesn't display the property value."); } finally { // Restore the default document syntax. testUtils.loginAsSuperAdmin(); testUtils.setWikiPreference("core.defaultDocumentSyntax", defaultDocSyntax); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createApplicationWhenDefaultWikiSyntaxIsPlain File: xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/WizardIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29515
MEDIUM
5.4
xwiki/xwiki-platform
createApplicationWhenDefaultWikiSyntaxIsPlain
xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/WizardIT.java
e73b890623efa604adc484ad82f37e31596fe1a6
0
Analyze the following code function for security vulnerabilities
public void attachFile(String space, String page, String name, File file, boolean failIfExists) throws Exception { InputStream is = new FileInputStream(file); try { attachFile(space, page, name, is, failIfExists); } finally { is.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachFile File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
attachFile
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private String generateSalt() { StringBuilder buf = new StringBuilder(); SecureRandom sr = new SecureRandom(); for( int i=0; i<6; i++ ) {// log2(52^6)=34.20... so, this is about 32bit strong. boolean upper = sr.nextBoolean(); char ch = (char)(sr.nextInt(26) + 'a'); if(upper) ch=Character.toUpperCase(ch); buf.append(ch); } return buf.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateSalt File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-200" ]
CVE-2014-2064
MEDIUM
5
jenkinsci/jenkins
generateSalt
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
fbf96734470caba9364f04e0b77b0bae7293a1ec
0
Analyze the following code function for security vulnerabilities
@Override protected Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw new AssertionError(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clone File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
clone
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
@Override public Route.Definition options(final String path, final Route.Filter filter) { return appendDefinition(OPTIONS, path, filter); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: options File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
options
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
protected final float _parseFloatPrimitive(DeserializationContext ctxt, String text) throws IOException { try { return NumberInput.parseFloat(text); } catch (IllegalArgumentException iae) { } Number v = (Number) ctxt.handleWeirdStringValue(Float.TYPE, text, "not a valid `float` value"); return _nonNullNumber(v).floatValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _parseFloatPrimitive File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42003
HIGH
7.5
FasterXML/jackson-databind
_parseFloatPrimitive
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
d78d00ee7b5245b93103fef3187f70543d67ca33
0
Analyze the following code function for security vulnerabilities
@Override public boolean setPermittedCrossProfileNotificationListeners( ComponentName who, List<String> packageList) { if (!mHasFeature) { return false; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); if (!isManagedProfile(caller.getUserId())) { return false; } Preconditions.checkCallAuthorization(isProfileOwner(caller)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); admin.permittedNotificationListeners = packageList; saveSettingsLocked(caller.getUserId()); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPermittedCrossProfileNotificationListeners File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setPermittedCrossProfileNotificationListeners
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void pause() { if(nativeVideo != null && nativeVideo.canPause()){ nativeVideo.pause(); fireMediaStateChange(State.Paused); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pause 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
pause
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting public void enforceCallerCanRequestDeviceIdAttestation(CallerIdentity caller) throws SecurityException { /** * First check if there's a profile owner because the device could be in COMP mode (where * there's a device owner and profile owner on the same device). * If the caller is from the work profile, then it must be the PO or the delegate, and * it must have the right permission to access device identifiers. */ int callerUserId = caller.getUserId(); if (hasProfileOwner(callerUserId)) { // Make sure that the caller is the profile owner or delegate. Preconditions.checkCallAuthorization(canInstallCertificates(caller)); // Verify that the managed profile is on an organization-owned device (or is affiliated // with the device owner user) and as such the profile owner can access Device IDs. if (isProfileOwnerOfOrganizationOwnedDevice(callerUserId) || isUserAffiliatedWithDevice(callerUserId)) { return; } throw new SecurityException( "Profile Owner is not allowed to access Device IDs."); } // If not, fall back to the device owner check. Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isCallerDelegate(caller, DELEGATION_CERT_INSTALL)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceCallerCanRequestDeviceIdAttestation 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
enforceCallerCanRequestDeviceIdAttestation
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private static void putValueOrJsonNull(JsonObject json, String key, String value) { if (value == null) { json.put(key, Json.createNull()); } else { json.put(key, value); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putValueOrJsonNull File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
putValueOrJsonNull
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public @Nullable String getFixedString(int col) throws SQLException { String stringValue = castNonNull(getString(col)); return trimMoney(stringValue); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFixedString File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getFixedString
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private void forEachFeature(Consumer<NodeFeature> action) { getInitializedFeatures().forEach(action::accept); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forEachFeature File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
forEachFeature
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public WireFormatInfo getRemoteWireFormatInfo() { return wireFormatInfo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemoteWireFormatInfo File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
getRemoteWireFormatInfo
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public void restart() { if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER); } Log.i(TAG, "Sending shutdown broadcast..."); BroadcastReceiver br = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // Now the broadcast is done, finish up the low-level shutdown. Log.i(TAG, "Shutting down activity manager..."); shutdown(10000); Log.i(TAG, "Shutdown complete, restarting!"); Process.killProcess(Process.myPid()); System.exit(10); } }; // First send the high-level shut down broadcast. Intent intent = new Intent(Intent.ACTION_SHUTDOWN); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); intent.putExtra(Intent.EXTRA_SHUTDOWN_USERSPACE_ONLY, true); /* For now we are not doing a clean shutdown, because things seem to get unhappy. mContext.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, null, br, mHandler, 0, null, null); */ br.onReceive(mContext, intent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restart 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
restart
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public void handle(final Request req, final Response rsp) throws Throwable { String path = req.path(); URL resource = resolve(req, path); if (resource != null) { String localpath = resource.getPath(); int jarEntry = localpath.indexOf("!/"); if (jarEntry > 0) { localpath = localpath.substring(jarEntry + 2); } URLAsset asset = new URLAsset(resource, path, MediaType.byPath(localpath).orElse(MediaType.octetstream)); if (asset.exists()) { // cdn? if (cdn != null) { String absUrl = cdn + path; rsp.redirect(absUrl); rsp.end(); } else { doHandle(req, rsp, asset); } } } else if (statusCode > 0) { throw new Err(statusCode); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handle File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
handle
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
@Override public void postQSRunnableDismissingKeyguard(final Runnable runnable) { mHandler.post(() -> { mLeaveOpenOnKeyguardHide = true; executeRunnableDismissingKeyguard(() -> mHandler.post(runnable), null, false, false, false); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postQSRunnableDismissingKeyguard File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
postQSRunnableDismissingKeyguard
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public Object opt(String key) { return key == null ? null : this.map.get(key); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: opt File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
opt
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 ns(String prefix, String namespaceURI) { return attribute(prefix, namespaceURI); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ns 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
ns
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public boolean isIntentSenderAForegroundService(IIntentSender pendingResult) { if (pendingResult instanceof PendingIntentRecord) { final PendingIntentRecord res = (PendingIntentRecord) pendingResult; return res.key.type == ActivityManager.INTENT_SENDER_FOREGROUND_SERVICE; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isIntentSenderAForegroundService 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
isIntentSenderAForegroundService
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private String getErrorString(int errMsg) { switch (errMsg) { case FINGERPRINT_ERROR_UNABLE_TO_PROCESS: return mContext.getString( com.android.internal.R.string.fingerprint_error_unable_to_process); case FINGERPRINT_ERROR_HW_UNAVAILABLE: return mContext.getString( com.android.internal.R.string.fingerprint_error_hw_not_available); case FINGERPRINT_ERROR_NO_SPACE: return mContext.getString( com.android.internal.R.string.fingerprint_error_no_space); case FINGERPRINT_ERROR_TIMEOUT: return mContext.getString(com.android.internal.R.string.fingerprint_error_timeout); case FINGERPRINT_ERROR_CANCELED: return mContext.getString(com.android.internal.R.string.fingerprint_error_canceled); case FINGERPRINT_ERROR_LOCKOUT: return mContext.getString(com.android.internal.R.string.fingerprint_error_lockout); default: if (errMsg >= FINGERPRINT_ERROR_VENDOR_BASE) { int msgNumber = errMsg - FINGERPRINT_ERROR_VENDOR_BASE; String[] msgArray = mContext.getResources().getStringArray( com.android.internal.R.array.fingerprint_error_vendor); if (msgNumber < msgArray.length) { return msgArray[msgNumber]; } } return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getErrorString File: core/java/android/hardware/fingerprint/FingerprintManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
getErrorString
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public int getMinimumRequiredWifiSecurityLevel() { synchronized (getLockObject()) { final ActiveAdmin admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked( UserHandle.USER_SYSTEM); return (admin == null) ? DevicePolicyManager.WIFI_SECURITY_OPEN : admin.mWifiMinimumSecurityLevel; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMinimumRequiredWifiSecurityLevel 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
getMinimumRequiredWifiSecurityLevel
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private void setIfAbsentSlow(Iterable<? extends Entry<? extends CharSequence, String>> headers, Set<AsciiString> existingNames) { for (Entry<? extends CharSequence, String> header : headers) { final AsciiString key = AsciiString.of(header.getKey()); if (!existingNames.contains(key)) { add(key, header.getValue()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIfAbsentSlow File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
setIfAbsentSlow
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@Override public void onFailedUnknownCall(Call call) { Log.i(this, "onFailedUnknownCall for call %s", call); setCallState(call, CallState.DISCONNECTED); call.removeListener(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onFailedUnknownCall 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
onFailedUnknownCall
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
private static void updateDigest(MessageDigest digest, File file) throws IOException { try (DigestInputStream digestStream = new DigestInputStream(new FileInputStream(file), digest)) { int length, total = 0; while ((length = digestStream.read()) != -1) { total += length; } // just plow through the file } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateDigest File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
updateDigest
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
public String getGroupPrefix() { String groupPrefix = getProperty(PROP_GROUPS_PREFIX, String.class); return groupPrefix != null && !groupPrefix.isEmpty() ? groupPrefix : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGroupPrefix File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getGroupPrefix
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
@Override public void resetDefaultCrossProfileIntentFilters(@UserIdInt int userId) { Preconditions.checkCallAuthorization( hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS)); mInjector.binderWithCleanCallingIdentity(() -> { try { final List<UserInfo> profiles = mUserManager.getProfiles(userId); final int numOfProfiles = profiles.size(); if (numOfProfiles <= 1) { return; } final String managedProvisioningPackageName = getManagedProvisioningPackage( mContext); // Removes cross profile intent filters from the parent to all the profiles. mIPackageManager.clearCrossProfileIntentFilters( userId, mContext.getOpPackageName()); // Setting and resetting default cross profile intent filters was previously handled // by Managed Provisioning. For backwards compatibility, clear any intent filters // that were set by ManagedProvisioning. mIPackageManager.clearCrossProfileIntentFilters( userId, managedProvisioningPackageName); // For each profile reset cross profile intent filters for (int i = 0; i < numOfProfiles; i++) { UserInfo profile = profiles.get(i); mIPackageManager.clearCrossProfileIntentFilters( profile.id, mContext.getOpPackageName()); // Clear any intent filters that were set by ManagedProvisioning. mIPackageManager.clearCrossProfileIntentFilters( profile.id, managedProvisioningPackageName); mUserManagerInternal.setDefaultCrossProfileIntentFilters(userId, profile.id); } } catch (RemoteException e) { // Shouldn't happen. Slogf.wtf(LOG_TAG, "Error resetting default cross profile intent filters", e); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetDefaultCrossProfileIntentFilters File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
resetDefaultCrossProfileIntentFilters
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public List<RootTaskInfo> getAllRootTaskInfos() { enforceTaskPermission("getAllRootTaskInfos()"); final long ident = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { return mRootWindowContainer.getAllRootTaskInfos(INVALID_DISPLAY); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllRootTaskInfos File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
getAllRootTaskInfos
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Nullable final Double getDoubleAndRemove(CharSequence name) { final String v = getAndRemove(name); return toDouble(v); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDoubleAndRemove File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
getDoubleAndRemove
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public static String generateRandomSessionToken() { return RandomTokenGenerator.generateRandomTokenBase64(Cookie.SESSION_COOKIE_LENGTH); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateRandomSessionToken File: src/gribbit/auth/Cookie.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
generateRandomSessionToken
src/gribbit/auth/Cookie.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
public String toSqlWhere() { String[] ps = protocolExpr.split(":"); Assert.isTrue(ps.length >= 2, "Bad arguments of protocol expr : " + protocolExpr); switch (ps[0]) { case P_VIA: { return parseVia(ps[1], ps.length > 2 ? ps[2] : null); } case P_REF: { return parseRef(ps[1], ps.length > 2 ? ps[2] : null); } case P_CATEGORY: { return parseCategory(ps[1], ps[2]); } case P_RELATED: { return parseRelated(ps[1], ID.valueOf(ps[2])); } default: { log.warn("Unknown protocol expr : {}", protocolExpr); return null; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toSqlWhere File: src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
toSqlWhere
src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
@Override public List<Block> getDashboardSourceMetadata(String source, MacroTransformationContext context) { DocumentReference sourceDoc = getSourceDocumentReference(source); String classParameterName = "class"; GroupBlock metadataContainer = new GroupBlock(); metadataContainer.setParameter(classParameterName, DashboardMacro.METADATA); // generate anchors for the urls XWikiContext xContext = getXWikiContext(); String editURL = xContext.getWiki().getURL(sourceDoc, "save", "", "", xContext); LinkBlock editURLBlock = new LinkBlock(Collections.<Block> emptyList(), new ResourceReference(editURL, ResourceType.URL), false); editURLBlock.setParameter(classParameterName, DashboardMacro.EDIT_URL); metadataContainer.addChild(editURLBlock); String removeURL = xContext.getWiki().getURL(sourceDoc, "objectremove", "", "", xContext); LinkBlock removeURLBlock = new LinkBlock(Collections.<Block> emptyList(), new ResourceReference(removeURL, ResourceType.URL), false); removeURLBlock.setParameter(classParameterName, DashboardMacro.REMOVE_URL); metadataContainer.addChild(removeURLBlock); String addURL = xContext.getWiki().getURL(sourceDoc, "objectadd", "", "", xContext); LinkBlock addURLBlock = new LinkBlock(Collections.<Block> emptyList(), new ResourceReference(addURL, ResourceType.URL), false); addURLBlock.setParameter(classParameterName, DashboardMacro.ADD_URL); metadataContainer.addChild(addURLBlock); // and create divs for the source metadata GroupBlock sourcePageBlock = new GroupBlock(); sourcePageBlock.addChild(new WordBlock(sourceDoc.getName())); sourcePageBlock.setParameter(classParameterName, DashboardMacro.SOURCE_PAGE); metadataContainer.addChild(sourcePageBlock); GroupBlock sourceSpaceBlock = new GroupBlock(); // Extract the full Space Reference (in order to support Nested Spaces) and set it in the XDOM sourceSpaceBlock.addChild(new WordBlock( this.localReferenceSerializer.serialize(sourceDoc.getLastSpaceReference()))); sourceSpaceBlock.setParameter(classParameterName, DashboardMacro.SOURCE_SPACE); metadataContainer.addChild(sourceSpaceBlock); GroupBlock sourceWikiBlock = new GroupBlock(); sourceWikiBlock.addChild(new WordBlock(sourceDoc.getWikiReference().getName())); sourceWikiBlock.setParameter(classParameterName, DashboardMacro.SOURCE_WIKI); metadataContainer.addChild(sourceWikiBlock); String sourceURL = xContext.getWiki().getURL(sourceDoc, "view", "", "", xContext); LinkBlock sourceURLBlock = new LinkBlock(Collections.<Block> emptyList(), new ResourceReference(sourceURL, ResourceType.URL), false); sourceURLBlock.setParameter(classParameterName, DashboardMacro.SOURCE_URL); metadataContainer.addChild(sourceURLBlock); return Collections.<Block> singletonList(metadataContainer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDashboardSourceMetadata File: xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-94" ]
CVE-2021-32621
MEDIUM
6.5
xwiki/xwiki-platform
getDashboardSourceMetadata
xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java
bb7068bd911f91e5511f3cfb03276c7ac81100bc
0
Analyze the following code function for security vulnerabilities
public void forceKeyExchange(CryptoWishList cwl, DHGexParameters dhgex) throws IOException { km.initiateKEX(cwl, dhgex); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forceKeyExchange File: src/main/java/com/trilead/ssh2/transport/TransportManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
forceKeyExchange
src/main/java/com/trilead/ssh2/transport/TransportManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN) public int getPasswordHistoryLength(@Nullable ComponentName admin) { return getPasswordHistoryLength(admin, myUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPasswordHistoryLength 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
getPasswordHistoryLength
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public boolean isDaemon() { return isDaemon; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDaemon File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
isDaemon
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
@PostConstruct private void postConstruct() { restTemplate = restTemplateFactory.getObject(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postConstruct File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java Repository: apolloconfig/apollo The code follows secure coding practices.
[ "CWE-20" ]
CVE-2020-15170
MEDIUM
6.8
apolloconfig/apollo
postConstruct
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
0
Analyze the following code function for security vulnerabilities
public void addObject(String space, String page, String className, Map<String, ?> properties) { gotoPage(space, page, "objectadd", toQueryParameters(className, null, properties)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObject File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
addObject
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
void onPerformGestureResult(int sequence, final boolean completedSuccessfully) { if (mGestureStatusCallbackInfos == null) { return; } GestureResultCallbackInfo callbackInfo; synchronized (mLock) { callbackInfo = mGestureStatusCallbackInfos.get(sequence); } final GestureResultCallbackInfo finalCallbackInfo = callbackInfo; if ((callbackInfo != null) && (callbackInfo.gestureDescription != null) && (callbackInfo.callback != null)) { if (callbackInfo.handler != null) { callbackInfo.handler.post(new Runnable() { @Override public void run() { if (completedSuccessfully) { finalCallbackInfo.callback .onCompleted(finalCallbackInfo.gestureDescription); } else { finalCallbackInfo.callback .onCancelled(finalCallbackInfo.gestureDescription); } } }); return; } if (completedSuccessfully) { callbackInfo.callback.onCompleted(callbackInfo.gestureDescription); } else { callbackInfo.callback.onCancelled(callbackInfo.gestureDescription); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPerformGestureResult File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
onPerformGestureResult
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
protected abstract void shiftRight(int numDigits);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shiftRight File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
shiftRight
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
public void init(OmniboxResultItem suggestionItem, OmniboxSuggestionDelegate suggestionDelegate, int position, boolean useDarkColors) { ViewCompat.setLayoutDirection(this, ViewCompat.getLayoutDirection(mUrlBar)); // Update the position unconditionally. mPosition = position; jumpDrawablesToCurrentState(); boolean colorsChanged = mUseDarkColors == null || mUseDarkColors != useDarkColors; if (suggestionItem.equals(mSuggestionItem) && !colorsChanged) return; mUseDarkColors = useDarkColors; if (colorsChanged) { mContentsView.mTextLine1.setTextColor(getStandardFontColor()); setRefineIcon(true); } mSuggestionItem = suggestionItem; mSuggestion = suggestionItem.getSuggestion(); mSuggestionDelegate = suggestionDelegate; // Reset old computations. mContentsView.resetTextWidths(); mContentsView.mAnswerImage.setVisibility(GONE); mContentsView.mAnswerImage.getLayoutParams().height = 0; mContentsView.mAnswerImage.getLayoutParams().width = 0; mContentsView.mAnswerImage.setImageDrawable(null); mContentsView.mAnswerImageMaxSize = 0; mContentsView.mTextLine1.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources() .getDimension(R.dimen.omnibox_suggestion_first_line_text_size)); mContentsView.mTextLine2.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources() .getDimension(R.dimen.omnibox_suggestion_second_line_text_size)); // Suggestions with attached answers are rendered with rich results regardless of which // suggestion type they are. if (mSuggestion.hasAnswer()) { setAnswer(mSuggestion.getAnswer()); mContentsView.setSuggestionIcon(SUGGESTION_ICON_MAGNIFIER, colorsChanged); mContentsView.mTextLine2.setVisibility(VISIBLE); setRefinable(true); return; } boolean sameAsTyped = suggestionItem.getMatchedQuery().equalsIgnoreCase(mSuggestion.getDisplayText()); int suggestionType = mSuggestion.getType(); if (mSuggestion.isUrlSuggestion()) { if (mSuggestion.isStarred()) { mContentsView.setSuggestionIcon(SUGGESTION_ICON_BOOKMARK, colorsChanged); } else if (suggestionType == OmniboxSuggestionType.HISTORY_URL) { mContentsView.setSuggestionIcon(SUGGESTION_ICON_HISTORY, colorsChanged); } else { mContentsView.setSuggestionIcon(SUGGESTION_ICON_GLOBE, colorsChanged); } boolean urlShown = !TextUtils.isEmpty(mSuggestion.getUrl()); boolean urlHighlighted = false; if (urlShown) { urlHighlighted = setUrlText(suggestionItem); } else { mContentsView.mTextLine2.setVisibility(INVISIBLE); } setSuggestedQuery(suggestionItem, true, urlShown, urlHighlighted); setRefinable(!sameAsTyped); } else { @SuggestionIcon int suggestionIcon = SUGGESTION_ICON_MAGNIFIER; if (suggestionType == OmniboxSuggestionType.VOICE_SUGGEST) { suggestionIcon = SUGGESTION_ICON_VOICE; } else if ((suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_PERSONALIZED) || (suggestionType == OmniboxSuggestionType.SEARCH_HISTORY)) { // Show history icon for suggestions based on user queries. suggestionIcon = SUGGESTION_ICON_HISTORY; } mContentsView.setSuggestionIcon(suggestionIcon, colorsChanged); setRefinable(!sameAsTyped); setSuggestedQuery(suggestionItem, false, false, false); if ((suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_ENTITY) || (suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_PROFILE)) { showDescriptionLine( SpannableString.valueOf(mSuggestion.getDescription()), getStandardFontColor()); } else { mContentsView.mTextLine2.setVisibility(INVISIBLE); } } }
Vulnerability Classification: - CWE: CWE-254 - CVE: CVE-2016-5163 - Severity: MEDIUM - CVSS Score: 4.3 Description: Android omnibox: Force paragraph direction to LTR. This means that URLs will always be displayed in a left-to-right context. Right-to-left runs are still rendered as RTL, but will not cause the whole URL to flip around. This fixes several spoofing concerns and makes Android's omnibox consistent with the Views omnibox. BUG=609680 Review-Url: https://codereview.chromium.org/1988553002 Cr-Commit-Position: refs/heads/master@{#400359} Function: init File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java Repository: chromium Fixed Code: public void init(OmniboxResultItem suggestionItem, OmniboxSuggestionDelegate suggestionDelegate, int position, boolean useDarkColors) { ViewCompat.setLayoutDirection(this, ViewCompat.getLayoutDirection(mUrlBar)); // Update the position unconditionally. mPosition = position; jumpDrawablesToCurrentState(); boolean colorsChanged = mUseDarkColors == null || mUseDarkColors != useDarkColors; if (suggestionItem.equals(mSuggestionItem) && !colorsChanged) return; mUseDarkColors = useDarkColors; if (colorsChanged) { mContentsView.mTextLine1.setTextColor(getStandardFontColor()); setRefineIcon(true); } mSuggestionItem = suggestionItem; mSuggestion = suggestionItem.getSuggestion(); mSuggestionDelegate = suggestionDelegate; // Reset old computations. mContentsView.resetTextWidths(); mContentsView.mAnswerImage.setVisibility(GONE); mContentsView.mAnswerImage.getLayoutParams().height = 0; mContentsView.mAnswerImage.getLayoutParams().width = 0; mContentsView.mAnswerImage.setImageDrawable(null); mContentsView.mAnswerImageMaxSize = 0; mContentsView.mTextLine1.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources() .getDimension(R.dimen.omnibox_suggestion_first_line_text_size)); mContentsView.mTextLine2.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources() .getDimension(R.dimen.omnibox_suggestion_second_line_text_size)); // Suggestions with attached answers are rendered with rich results regardless of which // suggestion type they are. if (mSuggestion.hasAnswer()) { setAnswer(mSuggestion.getAnswer()); mContentsView.setSuggestionIcon(SUGGESTION_ICON_MAGNIFIER, colorsChanged); mContentsView.mTextLine2.setVisibility(VISIBLE); setRefinable(true); return; } boolean sameAsTyped = suggestionItem.getMatchedQuery().equalsIgnoreCase(mSuggestion.getDisplayText()); int suggestionType = mSuggestion.getType(); if (mSuggestion.isUrlSuggestion()) { if (mSuggestion.isStarred()) { mContentsView.setSuggestionIcon(SUGGESTION_ICON_BOOKMARK, colorsChanged); } else if (suggestionType == OmniboxSuggestionType.HISTORY_URL) { mContentsView.setSuggestionIcon(SUGGESTION_ICON_HISTORY, colorsChanged); } else { mContentsView.setSuggestionIcon(SUGGESTION_ICON_GLOBE, colorsChanged); } boolean urlShown = !TextUtils.isEmpty(mSuggestion.getUrl()); boolean urlHighlighted = false; if (urlShown) { urlHighlighted = setUrlText(suggestionItem); } else { mContentsView.mTextLine2.setVisibility(INVISIBLE); } setSuggestedQuery(suggestionItem, true, urlShown, urlHighlighted); setRefinable(!sameAsTyped); } else { @SuggestionIcon int suggestionIcon = SUGGESTION_ICON_MAGNIFIER; if (suggestionType == OmniboxSuggestionType.VOICE_SUGGEST) { suggestionIcon = SUGGESTION_ICON_VOICE; } else if ((suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_PERSONALIZED) || (suggestionType == OmniboxSuggestionType.SEARCH_HISTORY)) { // Show history icon for suggestions based on user queries. suggestionIcon = SUGGESTION_ICON_HISTORY; } mContentsView.setSuggestionIcon(suggestionIcon, colorsChanged); setRefinable(!sameAsTyped); setSuggestedQuery(suggestionItem, false, false, false); if ((suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_ENTITY) || (suggestionType == OmniboxSuggestionType.SEARCH_SUGGEST_PROFILE)) { showDescriptionLine(SpannableString.valueOf(mSuggestion.getDescription()), false); } else { mContentsView.mTextLine2.setVisibility(INVISIBLE); } } }
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
init
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
3bd33fee094e863e5496ac24714c558bd58d28ef
1
Analyze the following code function for security vulnerabilities
@Override protected void onInitialize() { super.onInitialize(); BrandingSetting setting = OneDev.getInstance(SettingManager.class).getBrandingSetting(); BeanEditor editor = BeanContext.edit("editor", setting); Button saveButton = new Button("save") { @Override public void onSubmit() { super.onSubmit(); if (uploads != null && !uploads.isEmpty()) { FileUpload upload = uploads.iterator().next(); try { FileUtils.writeByteArrayToFile(getLogoFile(), upload.getBytes()); } catch (IOException e) { throw new RuntimeException(e); } } OneDev.getInstance(SettingManager.class).saveBrandingSetting(setting); getSession().success("Branding setting has been saved"); } }; Form<?> form = new Form<Void>("brandingSetting"); form.setMultiPart(true); form.add(editor); form.add(new BrandLogoPanel("logoPreview")); form.add(new FileUploadField("logoUpload", new IModel<List<FileUpload>>() { @Override public void detach() { } @Override public List<FileUpload> getObject() { return uploads; } @Override public void setObject(List<FileUpload> object) { uploads = object; } }) { @Override protected String getHint() { return "Select file..."; } @Override protected String getIcon() { return "image"; } }); form.add(saveButton); add(form); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onInitialize File: server-core/src/main/java/io/onedev/server/web/page/admin/brandingsetting/BrandingSettingPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-552" ]
CVE-2022-39208
HIGH
7.5
theonedev/onedev
onInitialize
server-core/src/main/java/io/onedev/server/web/page/admin/brandingsetting/BrandingSettingPage.java
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
0
Analyze the following code function for security vulnerabilities
@Override protected ResourceReference getImageReference(RssMacroParameters parameters, String content, MacroTransformationContext context) { if (parameters.isImage() && getFeed().getImage() != null) { return new ResourceReference(getFeed().getImage().getUrl(), ResourceType.URL); } else { return super.getImageReference(parameters, content, context); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getImageReference File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29202
CRITICAL
9
xwiki/xwiki-platform
getImageReference
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
5c7ebe47c2897e92d8f04fe2e15027e84dc3ec03
0
Analyze the following code function for security vulnerabilities
@Override public <T extends Field> T createField(Class<?> type, Class<T> fieldType) { T f = super.createField(type, fieldType); if (f != null) { f.setWidth("100%"); } return f; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createField 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
createField
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
@Test public void deleteByCqlWrapper(TestContext context) throws FieldException { deleteByCqlWrapper(context, "x"); deleteByCqlWrapper(context, "'"); // SQL injection? }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteByCqlWrapper File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
deleteByCqlWrapper
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private static String getFirstDenied(int[] grantResults, String[] permissions) { for (int i = 0; i < grantResults.length; ++i) { if (grantResults[i] == PackageManager.PERMISSION_DENIED) { return permissions[i]; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFirstDenied File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
getFirstDenied
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public static int getLoadingProgress(LauncherActivityInfo info) { if (Utilities.ATLEAST_S) { return (int) (100 * info.getLoadingProgress()); } return 100; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLoadingProgress File: src/com/android/launcher3/util/PackageManagerHelper.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-40097
HIGH
7.8
android
getLoadingProgress
src/com/android/launcher3/util/PackageManagerHelper.java
6c9a41117d5a9365cf34e770bbb00138f6bf997e
0
Analyze the following code function for security vulnerabilities
public static void initVariantList() throws Exception { String sql = "SELECT * " + "FROM variant_v2 " + "WHERE "; sql = addRegionSql(sql); if (!sql.isEmpty() && !Input.regionList.isEmpty()) { ResultSet rset = DBManager.executeQuery(sql); while (rset.next()) { variantList.add(new Variant(rset)); } rset.close(); for (Variant var : variantList) { var.initAnnotationMap(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initVariantList File: src/main/java/model/Output.java Repository: nickzren/alsdb The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15021
MEDIUM
5.2
nickzren/alsdb
initVariantList
src/main/java/model/Output.java
cbc79a68145e845f951113d184b4de207c341599
0
Analyze the following code function for security vulnerabilities
public void removeThisRule() { style.removeThisRule(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeThisRule File: org/w3c/css/css/StyleSheetParser.java Repository: w3c/css-validator The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-4070
LOW
3.5
w3c/css-validator
removeThisRule
org/w3c/css/css/StyleSheetParser.java
e5c09a9119167d3064db786d5f00d730b584a53b
0
Analyze the following code function for security vulnerabilities
boolean clearPackagePreferredActivitiesLPw(String packageName, int userId) { ArrayList<PreferredActivity> removed = null; boolean changed = false; for (int i=0; i<mSettings.mPreferredActivities.size(); i++) { final int thisUserId = mSettings.mPreferredActivities.keyAt(i); PreferredIntentResolver pir = mSettings.mPreferredActivities.valueAt(i); if (userId != UserHandle.USER_ALL && userId != thisUserId) { continue; } Iterator<PreferredActivity> it = pir.filterIterator(); while (it.hasNext()) { PreferredActivity pa = it.next(); // Mark entry for removal only if it matches the package name // and the entry is of type "always". if (packageName == null || (pa.mPref.mComponent.getPackageName().equals(packageName) && pa.mPref.mAlways)) { if (removed == null) { removed = new ArrayList<PreferredActivity>(); } removed.add(pa); } } if (removed != null) { for (int j=0; j<removed.size(); j++) { PreferredActivity pa = removed.get(j); pir.removeFilter(pa); } changed = true; } } return changed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearPackagePreferredActivitiesLPw 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
clearPackagePreferredActivitiesLPw
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void setTitle(String title) { assert title != null; JavaScriptInvocation invocation = new JavaScriptInvocation( "document.title = $0", title); pendingTitleUpdateCanceler = new PendingJavaScriptInvocation( getStateTree().getRootNode(), invocation); addJavaScriptInvocation(pendingTitleUpdateCanceler); this.title = title; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTitle File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
setTitle
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public static NSObject parse(InputStream is) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException { DocumentBuilder docBuilder = getDocBuilder(); Document doc = docBuilder.parse(is); return parse(doc); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2016-15026 - Severity: MEDIUM - CVSS Score: 4.3 Description: 1) Take steps to guard against external XXE attacks (except, note that <!DOCTYPE> cannot be disabled in XML plists). 2) Resolve the actual PLIST DTD from inside the JAR file itself, and prevent resolution of other external XML resources. 3) Make XMLPlistParser.getDocBuilder public Function: parse File: src/main/java/com/dd/plist/XMLPropertyListParser.java Repository: 3breadt/dd-plist Fixed Code: public static NSObject parse(InputStream is) throws ParserConfigurationException, IOException, SAXException, PropertyListFormatException, ParseException { return parse(getDocBuilder().parse(is)); }
[ "CWE-611" ]
CVE-2016-15026
MEDIUM
4.3
3breadt/dd-plist
parse
src/main/java/com/dd/plist/XMLPropertyListParser.java
8c954e8d9f6f6863729e50105a8abf3f87fff74c
1