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
@UnsupportedAppUsage @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN) public int getMaximumFailedPasswordsForWipe(@Nullable ComponentName admin, int userHandle) { if (mService != null) { try { return mService.getMaximumFailedPasswordsForWipe( admin, userHandle, mParentInstance); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaximumFailedPasswordsForWipe 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
getMaximumFailedPasswordsForWipe
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void call(ViolationCollector vc) { final Method method = resolvedMethod.getRawMember(); final T obj = cls.cast(getValidationObject()); try { method.invoke(obj, vc); } catch (ReflectiveOperationException e) { throw new IllegalStateException("Couldn't call " + resolvedMethod + " on " + getValidationObject(), e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: call File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java Repository: dropwizard The code follows secure coding practices.
[ "CWE-74" ]
CVE-2020-11002
HIGH
9
dropwizard
call
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java
d5a512f7abf965275f2a6b913ac4fe778e424242
0
Analyze the following code function for security vulnerabilities
private void initDiscoveryMulticast(Configuration pConfig) { String url = findAgentUrl(pConfig); if (url != null || listenForDiscoveryMcRequests(pConfig)) { if (url == null) { initAgentUrlFromRequest = true; } else { initAgentUrlFromRequest = false; backendManager.getAgentDetails().updateAgentParameters(url, null); } try { discoveryMulticastResponder = new DiscoveryMulticastResponder(backendManager,restrictor,logHandler); discoveryMulticastResponder.start(); } catch (IOException e) { logHandler.error("Cannot start discovery multicast handler: " + e,e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initDiscoveryMulticast File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0168
MEDIUM
6.8
jolokia
initDiscoveryMulticast
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
0
Analyze the following code function for security vulnerabilities
@Override protected void onFinishInflate() { super.onFinishInflate(); mLockPatternUtils = new LockPatternUtils(mContext); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); setOnClickListener(new OnClickListener() { public void onClick(View v) { takeEmergencyCallAction(); } }); updateEmergencyCallButton(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onFinishInflate File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
onFinishInflate
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
private UserHandle getUserHandleOfForegroundApplication(Context context) { UserManager manager = UserManager.get(context); int result; // This logic matches // com.android.systemui.statusbar.phone.PhoneStatusBarPolicy#updateManagedProfile try { result = ActivityTaskManager.getService().getLastResumedActivityUserId(); } catch (RemoteException e) { if (DEBUG_ACTIONS) { Log.d(TAG, "Failed to get UserHandle of foreground app: ", e); } result = context.getUserId(); } UserInfo userInfo = manager.getUserInfo(result); return userInfo.getUserHandle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserHandleOfForegroundApplication File: packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35676
HIGH
7.8
android
getUserHandleOfForegroundApplication
packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
109e58b62dc9fedcee93983678ef9d4931e72afa
0
Analyze the following code function for security vulnerabilities
private static String hex(String origName, String candidate) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-256"); byte[] sum = md.digest(candidate.getBytes(UTF_8)); //convert the byte to hex format method 2 StringBuilder hexString = new StringBuilder(); for (int i = 0; i < sum.length; i++) { hexString.append(Integer.toHexString(0xFF & sum[i])); } String extension = ""; int i = origName.lastIndexOf('.'); if (i > 0) { extension = origName.substring(i);//contains dot } if (extension.length() < 10 && extension.length() > 1) { hexString.append(extension); } return hexString.toString(); }
Vulnerability Classification: - CWE: CWE-345, CWE-94, CWE-22 - CVE: CVE-2019-10182 - Severity: MEDIUM - CVSS Score: 5.8 Description: Nested jar, if by relative path point up, is stored as hashed - CVE-2019-10185 * tests/netx/unit/net/sourceforge/jnlp/runtime/jar03_dotdotN1.jar: crafted jar with hacked zip entries to be named like ".." * tests/netx/unit/net/sourceforge/jnlp/runtime/jar_03_dotdot_jarN1.jnlp: jnlp to call jar03_dotdotN1.jar * netx/net/sourceforge/jnlp/cache/CacheUtil.jsava: (hex) made public to be reused in JNLPClassLoader * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: if nested jar contains .. in path, is extracted as hashed Function: hex File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java Repository: AdoptOpenJDK/IcedTea-Web Fixed Code: public static String hex(String origName, String candidate) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-256"); byte[] sum = md.digest(candidate.getBytes(UTF_8)); //convert the byte to hex format method 2 StringBuilder hexString = new StringBuilder(); for (int i = 0; i < sum.length; i++) { hexString.append(Integer.toHexString(0xFF & sum[i])); } String extension = ""; int i = origName.lastIndexOf('.'); if (i > 0) { extension = origName.substring(i);//contains dot } if (extension.length() < 10 && extension.length() > 1) { hexString.append(extension); } return hexString.toString(); }
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
hex
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
e0818f521a0711aeec4b913b49b5fc6a52815662
1
Analyze the following code function for security vulnerabilities
public String getQueryString() { return "&schemeId=" + UtilMethods.webifyString(schemeId) + "&assignedTo=" + UtilMethods.webifyString(assignedTo) + "&createdBy=" + UtilMethods.webifyString(createdBy) + "&stepId=" + UtilMethods.webifyString(stepId) + "&open=" + open + "&closed=" + closed + "&keywords=" + URLEncoder.encode(UtilMethods.webifyString(keywords)) + "&orderBy=" + orderBy + "&count=" + count + ((show4all) ? "&show4all=true" : "") + "&page=" + page; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getQueryString File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4040
MEDIUM
6.5
dotCMS/core
getQueryString
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
0
Analyze the following code function for security vulnerabilities
public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element profileParameterElement = toDOM(document); document.appendChild(profileParameterElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: toXML File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java Repository: dogtagpki/pki Fixed Code: public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element profileParameterElement = toDOM(document); document.appendChild(profileParameterElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toXML
base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
public JSONAware handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]> pParameterMap) throws IOException { if (backendManager.isDebug()) { logHandler.debug("URI: " + pUri); } Object jsonRequest = extractJsonRequest(pInputStream,pEncoding); if (jsonRequest instanceof JSONArray) { List<JmxRequest> jmxRequests = JmxRequestFactory.createPostRequests((List) jsonRequest,getProcessingParameter(pParameterMap)); JSONArray responseList = new JSONArray(); for (JmxRequest jmxReq : jmxRequests) { if (backendManager.isDebug()) { logHandler.debug("Request: " + jmxReq.toString()); } // Call handler and retrieve return value JSONObject resp = executeRequest(jmxReq); responseList.add(resp); } return responseList; } else if (jsonRequest instanceof JSONObject) { JmxRequest jmxReq = JmxRequestFactory.createPostRequest((Map<String, ?>) jsonRequest,getProcessingParameter(pParameterMap)); return executeRequest(jmxReq); } else { throw new IllegalArgumentException("Invalid JSON Request " + jsonRequest); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handlePostRequest File: agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java Repository: jolokia The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0168
MEDIUM
6.8
jolokia
handlePostRequest
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
0
Analyze the following code function for security vulnerabilities
private void checkTime(long startTime, String where) { long now = SystemClock.uptimeMillis(); if ((now-startTime) > 50) { // If we are taking more than 50ms, log about it. Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkTime 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
checkTime
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private void fireAddition(final DomNode domNode) { final boolean wasAlreadyAttached = domNode.isAttachedToPage(); domNode.attachedToPage_ = isAttachedToPage(); if (domNode.attachedToPage_) { // trigger events final Page page = getPage(); if (null != page && page.isHtmlPage()) { ((HtmlPage) page).notifyNodeAdded(domNode); } // a node that is already "complete" (ie not being parsed) and not yet attached if (!domNode.isBodyParsed() && !wasAlreadyAttached) { for (final DomNode child : domNode.getDescendants()) { child.attachedToPage_ = true; child.onAllChildrenAddedToPage(true); } domNode.onAllChildrenAddedToPage(true); } } if (this instanceof DomDocumentFragment) { onAddedToDocumentFragment(); } fireNodeAdded(new DomChangeEvent(this, domNode)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fireAddition File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
fireAddition
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
@Override public void onTrustChanged(boolean enabled, int userId, int flags) { mUserHasTrust.put(userId, enabled); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onTrustChanged(userId); if (enabled && flags != 0) { cb.onTrustGrantedWithFlags(flags, userId); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTrustChanged 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
onTrustChanged
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting int getIconPersistQualityForTest() { return mIconPersistQuality; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIconPersistQualityForTest 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
getIconPersistQualityForTest
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public static String encode(String s) { return Util.encode(s); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encode 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
encode
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Override public List<MediaType> consumes() { return route.consumes(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: consumes File: jooby/src/main/java/org/jooby/internal/RouteImpl.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-15477
MEDIUM
4.3
jooby-project/jooby
consumes
jooby/src/main/java/org/jooby/internal/RouteImpl.java
34856a738829d8fedca4ed27bd6ff413af87186f
0
Analyze the following code function for security vulnerabilities
public static String getOSArchitecture() throws ContentError { if (osarch == null) { String osn = System.getProperty("os.name").toLowerCase(); if (osn.startsWith("linux")) { osarch = "linux"; } else if (osn.startsWith("mac")) { osarch = "mac"; } else if (osn.startsWith("windows")) { osarch = "windows"; } else { throw new ContentError("unrecognized os " + osn); } } return osarch; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOSArchitecture File: src/main/java/org/lemsml/jlems/io/util/JUtil.java Repository: LEMS/jLEMS The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4583
HIGH
8.8
LEMS/jLEMS
getOSArchitecture
src/main/java/org/lemsml/jlems/io/util/JUtil.java
8c224637d7d561076364a9e3c2c375daeaf463dc
0
Analyze the following code function for security vulnerabilities
@Override public int getFocusedStackId() throws RemoteException { ActivityStack focusedStack = getFocusedStack(); if (focusedStack != null) { return focusedStack.getStackId(); } return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFocusedStackId 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
getFocusedStackId
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public InetSocketAddress getRemoteSocketAddress() { return connInfo == null ? null : new InetSocketAddress(getRemoteHost(), getRemotePort()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemoteSocketAddress File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
getRemoteSocketAddress
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
public static String toPropertyString(Object value) { String stringValue; if (value instanceof Iterable) { StringBuilder builder = new StringBuilder(); for (Object item : (Iterable) value) { if (builder.length() > 0) { builder.append('|'); } builder.append(item); } stringValue = builder.toString(); } else if (value != null) { stringValue = value.toString(); } else { stringValue = null; } return stringValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toPropertyString 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
toPropertyString
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
@Override public String getXmlVersion() { return doc.getXmlVersion(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXmlVersion File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java Repository: LoboEvolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000540
MEDIUM
6.8
LoboEvolution
getXmlVersion
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
public void readMapEnd() {}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readMapEnd File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
readMapEnd
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
public AutoCompletionCandidates doAutoCompleteChildProjects(@QueryParameter String value, @AncestorInPath Item self, @AncestorInPath ItemGroup container) { return AutoCompletionCandidates.ofJobNames(Job.class,value,self,container); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doAutoCompleteChildProjects File: core/src/main/java/hudson/tasks/BuildTrigger.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
doAutoCompleteChildProjects
core/src/main/java/hudson/tasks/BuildTrigger.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@Override public String asString(Properties properties) { try { return super.asString(properties); } catch (TransformerException e) { throw wrapExceptionAsRuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asString 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
asString
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public String getAlias() { return alias; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAlias File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-34602
HIGH
7.5
jeecgboot/jeecg-boot
getAlias
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
dd7bf104e7ed59142909567ecd004335c3442ec5
0
Analyze the following code function for security vulnerabilities
public List<PanelSharePo> shareOut() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shareOut File: backend/src/main/java/io/dataease/service/panel/ShareService.java Repository: dataease The code follows secure coding practices.
[ "CWE-639" ]
CVE-2023-32310
HIGH
8.1
dataease
shareOut
backend/src/main/java/io/dataease/service/panel/ShareService.java
72f428e87b5395c03d2f94ef6185fc247ddbc8dc
0
Analyze the following code function for security vulnerabilities
private void setAndBroadcastNetworkSetTime(long time) { if (DBG) log("setAndBroadcastNetworkSetTime: time=" + time + "ms"); SystemClock.setCurrentTimeMillis(time); Intent intent = new Intent(TelephonyIntents.ACTION_NETWORK_SET_TIME); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING); intent.putExtra("time", time); mPhone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAndBroadcastNetworkSetTime File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
setAndBroadcastNetworkSetTime
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
public String getSkinFile(String filename, XWikiContext context) { return getSkinFile(filename, false, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSkinFile 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
getSkinFile
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@ApiOperation(value = "Modify Link Operation") @RequestMapping(value = "/modifyLink", method = RequestMethod.POST) @ResponseBody public String modifyLink(@RequestParam(value = "userid", required = true) String userId, @RequestParam(value = "cid", required = false) String cid, @RequestParam(value = "solutionid", required = false) String solutionId, @RequestParam(value = "version", required = false) String version, @RequestParam(value = "linkid", required = true) String linkId, @RequestParam(value = "linkname", required = true) String linkName) { String result = null; logger.debug(EELFLoggerDelegator.debugLogger, " modifyLink() : Begin"); try { result = solutionService.modifyLink(userId, cid, solutionId, version, linkId, linkName); } catch (Exception e) { logger.error(EELFLoggerDelegator.errorLogger, "Exception in modifyLink() ", e); } logger.debug(EELFLoggerDelegator.debugLogger, " modifyLink() : End"); return result; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2018-25097 - Severity: MEDIUM - CVSS Score: 4.0 Description: Senitization for CSS Vulnerability Issue-Id : ACUMOS-1650 Description : Senitization for CSS Vulnerability - Design Studio Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com> Function: modifyLink File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java Repository: acumos/design-studio Fixed Code: @ApiOperation(value = "Modify Link Operation") @RequestMapping(value = "/modifyLink", method = RequestMethod.POST) @ResponseBody public String modifyLink(@RequestParam(value = "userid", required = true) String userId, @RequestParam(value = "cid", required = false) String cid, @RequestParam(value = "solutionid", required = false) String solutionId, @RequestParam(value = "version", required = false) String version, @RequestParam(value = "linkid", required = true) String linkId, @RequestParam(value = "linkname", required = true) String linkName) { String result = null; logger.debug(EELFLoggerDelegator.debugLogger, " modifyLink() : Begin"); try { result = solutionService.modifyLink(userId, cid, SanitizeUtils.sanitize(solutionId), version, linkId, linkName); } catch (Exception e) { logger.error(EELFLoggerDelegator.errorLogger, "Exception in modifyLink() ", e); } logger.debug(EELFLoggerDelegator.debugLogger, " modifyLink() : End"); return result; }
[ "CWE-79" ]
CVE-2018-25097
MEDIUM
4
acumos/design-studio
modifyLink
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
0df8a5e8722188744973168648e4c74c69ce67fd
1
Analyze the following code function for security vulnerabilities
@Override public String getModalTitle() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModalTitle File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
getModalTitle
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
public boolean isKeyguardShowing() { return mStatusBarKeyguardViewManager.isShowing(); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2017-0822 - Severity: HIGH - CVSS Score: 7.5 Description: Enforce policy for camera gesture in keyguard If the admin has disabled the camera for secure keyguards, in addition to removing the bottom-right hand corner camera button do not allow the camera to be opened via the camera gesture either. Bug: 63334090 Merged-In: I104688eaad719528376e2851f837d5956a6a1169 Test: Manually tested launching the camera on secure and non-secure keyguard and non-keyguard, both via camera icon and gesture Change-Id: I104688eaad719528376e2851f837d5956a6a1169 (cherry picked from commit 98ec92375d75630c10595bfcbae184ad7350e2d3) Function: isKeyguardShowing File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android Fixed Code: public boolean isKeyguardShowing() { if (mStatusBarKeyguardViewManager == null) { Slog.i(TAG, "isKeyguardShowing() called before startKeyguard(), returning true"); return true; } return mStatusBarKeyguardViewManager.isShowing(); }
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isKeyguardShowing
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
1
Analyze the following code function for security vulnerabilities
protected String computeCurrentFolder() { String currentFolder = getSettings().getExplorerResource(); if (currentFolder == null) { // set current folder to root folder try { currentFolder = getCms().getSitePath(getCms().readFolder("/", CmsResourceFilter.IGNORE_EXPIRATION)); } catch (CmsException e) { // can usually be ignored if (LOG.isInfoEnabled()) { LOG.info(e); } currentFolder = "/"; } } if (!currentFolder.endsWith("/")) { // add folder separator to currentFolder currentFolder += "/"; } return currentFolder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computeCurrentFolder 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
computeCurrentFolder
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public Element toDOM(Document document) { Element element = document.createElement("ResourceMessage"); toDOM(document, element); return element; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toDOM File: base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toDOM
base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
final StandardTemplateParams title(CharSequence title) { this.title = title; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: title File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
title
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void publishService(IBinder token, Intent intent, IBinder service) { // Refuse possible leaked file descriptors if (intent != null && intent.hasFileDescriptors() == true) { throw new IllegalArgumentException("File descriptors passed in Intent"); } synchronized(this) { if (!(token instanceof ServiceRecord)) { throw new IllegalArgumentException("Invalid service token"); } mServices.publishServiceLocked((ServiceRecord)token, intent, service); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: publishService 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
publishService
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public TimeZone getTimeZone(ClickHouseConfig config) { return this.config.hasOption(ClickHouseClientOption.SERVER_TIME_ZONE) ? this.config.getServerTimeZone() : ClickHouseChecker.nonNull(config, ClickHouseConfig.TYPE_NAME).getServerTimeZone(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimeZone File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
getTimeZone
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
@Override public boolean clearResetPasswordToken(ComponentName admin, String callerPackageName) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return false; } CallerIdentity caller; if (isUnicornFlagEnabled()) { caller = getCallerIdentity(admin, callerPackageName); } else { caller = getCallerIdentity(admin); } final int userId = caller.getUserId(); boolean result = false; if (isUnicornFlagEnabled()) { EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin( admin, MANAGE_DEVICE_POLICY_RESET_PASSWORD, caller.getPackageName(), userId); Long currentTokenHandle = mDevicePolicyEngine.getLocalPolicySetByAdmin( PolicyDefinition.RESET_PASSWORD_TOKEN, enforcingAdmin, userId); if (currentTokenHandle != null) { result = resetEscrowToken(currentTokenHandle, userId); mDevicePolicyEngine.removeLocalPolicy( PolicyDefinition.RESET_PASSWORD_TOKEN, enforcingAdmin, userId); } } else { Objects.requireNonNull(admin, "ComponentName is null"); Preconditions.checkCallAuthorization( isProfileOwner(caller) || isDefaultDeviceOwner(caller)); synchronized (getLockObject()) { DevicePolicyData policy = getUserData(userId); if (policy.mPasswordTokenHandle != 0) { result = resetEscrowToken(policy.mPasswordTokenHandle, userId); policy.mPasswordTokenHandle = 0; saveSettingsLocked(userId); } } } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearResetPasswordToken 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
clearResetPasswordToken
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public String getCountries() { return mCountries; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCountries File: framework/java/android/net/wifi/hotspot2/pps/Policy.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21240
MEDIUM
5.5
android
getCountries
framework/java/android/net/wifi/hotspot2/pps/Policy.java
69119d1d3102e27b6473c785125696881bce9563
0
Analyze the following code function for security vulnerabilities
public int size() { return workUnitList.size(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: size File: src/main/java/emissary/pickup/WorkBundle.java Repository: NationalSecurityAgency/emissary The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-32634
MEDIUM
6.5
NationalSecurityAgency/emissary
size
src/main/java/emissary/pickup/WorkBundle.java
40260b1ec1f76cc92361702cc14fa1e4388e19d7
0
Analyze the following code function for security vulnerabilities
public Version[] getRevisions() throws XWikiException { return this.doc.getRevisions(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRevisions File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getRevisions
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
private void saveSettingsLocked(int userHandle) { if (DevicePolicyData.store( getUserData(userHandle), makeJournaledFile(userHandle), !mInjector.storageManagerIsFileBasedEncryptionEnabled())) { sendChangedNotification(userHandle); } invalidateBinderCaches(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveSettingsLocked 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
saveSettingsLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") @Override protected void executeBusinessLogic() throws ConnectorException { configureProxy(); final String serviceNS = (String) getInputParameter(SERVICE_NS); LOGGER.info(SERVICE_NS + " " + serviceNS); final String serviceName = (String) getInputParameter(SERVICE_NAME); LOGGER.info(SERVICE_NAME + " " + serviceName); final String portName = (String) getInputParameter(PORT_NAME); LOGGER.info(PORT_NAME + " " + portName); final String binding = (String) getInputParameter(BINDING); LOGGER.info(BINDING + " " + binding); final String endpointAddress = (String) getInputParameter(ENDPOINT_ADDRESS); LOGGER.info(ENDPOINT_ADDRESS + " " + endpointAddress); final QName serviceQName = new QName(serviceNS, serviceName); final QName portQName = new QName(serviceNS, portName); final Service service = Service.create(serviceQName); service.addPort(portQName, binding, endpointAddress); final Dispatch<Source> dispatch = service.createDispatch(portQName, Source.class, Service.Mode.MESSAGE); dispatch.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress); final Object authUserName = getInputParameter(USER_NAME); if (authUserName != null) { LOGGER.info(USER_NAME + " " + authUserName); dispatch.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, authUserName); final Object authPassword = getInputParameter(PASSWORD); LOGGER.info(PASSWORD + " ********"); dispatch.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, authPassword); } final String soapAction = (String) getInputParameter(SOAP_ACTION); LOGGER.info(SOAP_ACTION + " " + soapAction); if (soapAction != null) { dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, true); dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, soapAction); } final List<List<Object>> httpHeadersList = (List<List<Object>>) getInputParameter(HTTP_HEADERS); if (httpHeadersList != null) { final Map<String, List<String>> httpHeadersMap = new HashMap<>(); for (final List<Object> row : httpHeadersList) { if (row.size() == 2) { final List<String> parameters = new ArrayList<>(); final Object value = row.get(1); if (value instanceof Collection) { for (final Object parameter : (Collection<Object>) value) { parameters.add(parameter.toString()); } } else { parameters.add(value.toString()); } httpHeadersMap.put((String) row.get(0), parameters); } } dispatch.getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, httpHeadersMap); } String initialEnvelope = (String) getInputParameter(ENVELOPE); String sanitizedEnvelope = sanitizeString(initialEnvelope); if (!Objects.equals(initialEnvelope, sanitizedEnvelope)) { LOGGER.warning("Invalid XML characters have been detected in the envelope, they will be removed."); } LOGGER.info(ENVELOPE + " " + sanitizedEnvelope); Boolean oneWayInvoke = (Boolean) getInputParameter(ONE_WAY_INVOKE); if (oneWayInvoke == null) { oneWayInvoke = false; } Source sourceResponse = null; try { Source message = new StreamSource(new StringReader(sanitizedEnvelope)); if (oneWayInvoke) { dispatch.invokeOneWay(message); } else { sourceResponse = dispatch.invoke(message); } } catch (final Exception e) { throw new ConnectorException("Exception trying to call remote webservice", e); } restoreConfiguration(); Boolean buildResponseDocumentEnvelope = (Boolean) getInputParameter(BUILD_RESPONSE_DOCUMENT_ENVELOPE); LOGGER.info(BUILD_RESPONSE_DOCUMENT_ENVELOPE + " " + buildResponseDocumentEnvelope); Boolean buildResponseDocumentBody = (Boolean) getInputParameter(BUILD_RESPONSE_DOCUMENT_BODY); LOGGER.info(BUILD_RESPONSE_DOCUMENT_BODY + " " + buildResponseDocumentBody); if (buildResponseDocumentEnvelope == null) { buildResponseDocumentEnvelope = false; } if (buildResponseDocumentBody == null) { buildResponseDocumentBody = false; } Document responseDocumentEnvelope = null; if (sourceResponse != null && (buildResponseDocumentEnvelope || buildResponseDocumentBody)) { responseDocumentEnvelope = buildResponseDocumentEnvelope(sourceResponse); } Document responseDocumentBody = null; if (buildResponseDocumentBody) { responseDocumentBody = buildResponseDocumentBody(responseDocumentEnvelope); } Boolean printRequestAndResponse = (Boolean) getInputParameter(PRINT_REQUEST_AND_RESPONSE); LOGGER.info(PRINT_REQUEST_AND_RESPONSE + " " + printRequestAndResponse); if (printRequestAndResponse == null) { printRequestAndResponse = false; } if (printRequestAndResponse) { printRequestAndResponse(sourceResponse, buildResponseDocumentEnvelope, buildResponseDocumentBody, responseDocumentEnvelope, responseDocumentBody); } setOutputParameter(OUTPUT_SOURCE_RESPONSE, sourceResponse); setOutputParameter(OUTPUT_RESPONSE_DOCUMENT_ENVELOPE, responseDocumentEnvelope); setOutputParameter(OUTPUT_RESPONSE_DOCUMENT_BODY, responseDocumentBody); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2020-36640 - Severity: MEDIUM - CVSS Score: 4.9 Description: fix(vulnerabilities): fix XXE attacks vulnerabilities and other code smell (#17) * Access to external entities and network access should always be disable to avoid XXS attacks vulnerabilities. * Log error properly * refactor logger name to be compliant with java naming conventions Function: executeBusinessLogic File: src/main/java/org/bonitasoft/connectors/ws/SecureWSConnector.java Repository: bonitasoft/bonita-connector-webservice Fixed Code: @Override protected void executeBusinessLogic() throws ConnectorException { configureProxy(); final String serviceNS = (String) getInputParameter(SERVICE_NS); logger.info(SERVICE_NS + " " + serviceNS); final String serviceName = (String) getInputParameter(SERVICE_NAME); logger.info(SERVICE_NAME + " " + serviceName); final String portName = (String) getInputParameter(PORT_NAME); logger.info(PORT_NAME + " " + portName); final String binding = (String) getInputParameter(BINDING); logger.info(BINDING + " " + binding); final String endpointAddress = (String) getInputParameter(ENDPOINT_ADDRESS); logger.info(ENDPOINT_ADDRESS + " " + endpointAddress); final QName serviceQName = new QName(serviceNS, serviceName); final QName portQName = new QName(serviceNS, portName); final Service service = Service.create(serviceQName); service.addPort(portQName, binding, endpointAddress); final Dispatch<Source> dispatch = service.createDispatch(portQName, Source.class, Service.Mode.MESSAGE); dispatch.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress); final Object authUserName = getInputParameter(USER_NAME); if (authUserName != null) { logger.info(USER_NAME + " " + authUserName); dispatch.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, authUserName); final Object authPassword = getInputParameter(PASSWORD); logger.info(PASSWORD + " ********"); dispatch.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, authPassword); } final String soapAction = (String) getInputParameter(SOAP_ACTION); logger.info(SOAP_ACTION + " " + soapAction); if (soapAction != null) { dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, true); dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, soapAction); } final List<List<Object>> httpHeadersList = (List<List<Object>>) getInputParameter(HTTP_HEADERS); if (httpHeadersList != null) { final Map<String, List<String>> httpHeadersMap = new HashMap<>(); for (final List<Object> row : httpHeadersList) { if (row.size() == 2) { final List<String> parameters = new ArrayList<>(); final Object value = row.get(1); if (value instanceof Collection) { for (final Object parameter : (Collection<Object>) value) { parameters.add(parameter.toString()); } } else { parameters.add(value.toString()); } httpHeadersMap.put((String) row.get(0), parameters); } } dispatch.getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, httpHeadersMap); } String initialEnvelope = (String) getInputParameter(ENVELOPE); String sanitizedEnvelope = sanitizeString(initialEnvelope); if (!Objects.equals(initialEnvelope, sanitizedEnvelope)) { logger.warning("Invalid XML characters have been detected in the envelope, they will be removed."); } logger.info(ENVELOPE + " " + sanitizedEnvelope); Boolean oneWayInvoke = (Boolean) getInputParameter(ONE_WAY_INVOKE); if (oneWayInvoke == null) { oneWayInvoke = false; } Source sourceResponse = null; try { Source message = new StreamSource(new StringReader(sanitizedEnvelope)); if (oneWayInvoke) { dispatch.invokeOneWay(message); } else { sourceResponse = dispatch.invoke(message); } } catch (final Exception e) { throw new ConnectorException("Exception trying to call remote webservice", e); } restoreConfiguration(); Boolean buildResponseDocumentEnvelope = (Boolean) getInputParameter(BUILD_RESPONSE_DOCUMENT_ENVELOPE); logger.info(BUILD_RESPONSE_DOCUMENT_ENVELOPE + " " + buildResponseDocumentEnvelope); Boolean buildResponseDocumentBody = (Boolean) getInputParameter(BUILD_RESPONSE_DOCUMENT_BODY); logger.info(BUILD_RESPONSE_DOCUMENT_BODY + " " + buildResponseDocumentBody); if (buildResponseDocumentEnvelope == null) { buildResponseDocumentEnvelope = false; } if (buildResponseDocumentBody == null) { buildResponseDocumentBody = false; } Document responseDocumentEnvelope = null; if (sourceResponse != null && (buildResponseDocumentEnvelope || buildResponseDocumentBody)) { responseDocumentEnvelope = buildResponseDocumentEnvelope(sourceResponse); } Document responseDocumentBody = null; if (buildResponseDocumentBody) { responseDocumentBody = buildResponseDocumentBody(responseDocumentEnvelope); } Boolean printRequestAndResponse = (Boolean) getInputParameter(PRINT_REQUEST_AND_RESPONSE); logger.info(PRINT_REQUEST_AND_RESPONSE + " " + printRequestAndResponse); if (printRequestAndResponse == null) { printRequestAndResponse = false; } if (printRequestAndResponse) { printRequestAndResponse(sourceResponse, buildResponseDocumentEnvelope, buildResponseDocumentBody, responseDocumentEnvelope, responseDocumentBody); } setOutputParameter(OUTPUT_SOURCE_RESPONSE, sourceResponse); setOutputParameter(OUTPUT_RESPONSE_DOCUMENT_ENVELOPE, responseDocumentEnvelope); setOutputParameter(OUTPUT_RESPONSE_DOCUMENT_BODY, responseDocumentBody); }
[ "CWE-611" ]
CVE-2020-36640
MEDIUM
4.9
bonitasoft/bonita-connector-webservice
executeBusinessLogic
src/main/java/org/bonitasoft/connectors/ws/SecureWSConnector.java
a12ad691c05af19e9061d7949b6b828ce48815d5
1
Analyze the following code function for security vulnerabilities
private JsonObject getJsonObjectFromBody(RoutingContext ctx) throws IOException { String contentType = getRequestContentType(ctx); String body = stripNewlinesAndTabs(readBody(ctx)); // If the content type is application/graphql, the query is in the body if (contentType != null && contentType.startsWith(APPLICATION_GRAPHQL)) { JsonObjectBuilder input = Json.createObjectBuilder(); input.add(QUERY, body); return input.build(); // Else we expect a Json in the content } else { if (body == null || body.isEmpty()) { return null; } try (StringReader bodyReader = new StringReader(body); JsonReader jsonReader = jsonReaderFactory.createReader(bodyReader)) { return jsonReader.readObject(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJsonObjectFromBody File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java Repository: quarkusio/quarkus The code follows secure coding practices.
[ "CWE-444" ]
CVE-2022-2466
CRITICAL
9.8
quarkusio/quarkus
getJsonObjectFromBody
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
08e5c3106ce4bfb18b24a38514eeba6464668b07
0
Analyze the following code function for security vulnerabilities
void removeActiveAdminLocked(final ComponentName adminReceiver, final int userHandle) { final ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver, userHandle); DevicePolicyData policy = getUserData(userHandle); if (admin != null && !policy.mRemovingAdmins.contains(adminReceiver)) { policy.mRemovingAdmins.add(adminReceiver); sendAdminCommandLocked(admin, DeviceAdminReceiver.ACTION_DEVICE_ADMIN_DISABLED, new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { removeAdminArtifacts(adminReceiver, userHandle); removePackageIfRequired(adminReceiver.getPackageName(), userHandle); } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeActiveAdminLocked 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
removeActiveAdminLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 element(String name, String namespaceURI) { Element elem = super.elementImpl(name, namespaceURI); return new XMLBuilder2(elem, this.getElement()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: element 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
element
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
boolean super_awakenScrollBars(int startDelay, boolean invalidate);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: super_awakenScrollBars File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
super_awakenScrollBars
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void deleteApn() { if (mApnData.getUri() != null) { getContentResolver().delete(mApnData.getUri(), null, null); mApnData = new ApnData(sProjection.length); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteApn File: src/com/android/settings/network/apn/ApnEditor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40125
HIGH
7.8
android
deleteApn
src/com/android/settings/network/apn/ApnEditor.java
63d464c3fa5c7b9900448fef3844790756e557eb
0
Analyze the following code function for security vulnerabilities
public void activityResumed(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); mRemote.transact(ACTIVITY_RESUMED_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: activityResumed File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
activityResumed
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void removeUserControlDisabledPackages(CallerIdentity caller, EnforcingAdmin enforcingAdmin) { if (isDeviceOwner(caller)) { mDevicePolicyEngine.removeGlobalPolicy( PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES, enforcingAdmin); } else { mDevicePolicyEngine.removeLocalPolicy( PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES, enforcingAdmin, caller.getUserId()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUserControlDisabledPackages 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
removeUserControlDisabledPackages
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException { try { if (contentType.startsWith("multipart/form-data")) { throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); } else if (contentType.startsWith("application/x-www-form-urlencoded")) { String formString = ""; for (Entry<String, Object> param : formParams.entrySet()) { formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; } if (formString.length() == 0) { // empty string return formString; } else { return formString.substring(0, formString.length() - 1); } } else { if (isBodyNullable) { return obj == null ? "null" : json.getMapper().writeValueAsString(obj); } else { return obj == null ? "" : json.getMapper().writeValueAsString(obj); } } } catch (Exception ex) { throw new ApiException("Failed to perform serializeToString: " + ex.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: serializeToString File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
serializeToString
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
protected int maxReservedStreams() { return maxReservedStreams != null ? maxReservedStreams : DEFAULT_MAX_RESERVED_STREAMS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: maxReservedStreams File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
maxReservedStreams
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
public RowDescriptionGenerator getRowDescriptionGenerator() { return rowDescriptionGenerator; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRowDescriptionGenerator 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
getRowDescriptionGenerator
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void removeAccount(Account account) { final AccountManager accountManager = mContext.getSystemService(AccountManager.class); final AccountManagerFuture<Bundle> bundle = accountManager.removeAccount(account, null, null /* callback */, null /* handler */); try { final Bundle result = bundle.getResult(); if (result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT, /* default */ false)) { Slogf.i(LOG_TAG, "Account removed from the primary user."); } else { // TODO(174768447): Revisit start activity logic. final Intent removeIntent = result.getParcelable(AccountManager.KEY_INTENT); removeIntent.addFlags(FLAG_ACTIVITY_NEW_TASK); if (removeIntent != null) { Slogf.i(LOG_TAG, "Starting activity to remove account"); new Handler(Looper.getMainLooper()).post(() -> { mContext.startActivity(removeIntent); }); } else { Slogf.e(LOG_TAG, "Could not remove account from the primary user."); } } } catch (OperationCanceledException | AuthenticatorException | IOException e) { Slogf.e(LOG_TAG, "Exception removing account from the primary user.", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAccount 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
removeAccount
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public int read(byte[] array) throws IOException { return read(array, 0, array.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/org/cyberneko/html/HTMLScanner.java Repository: sparklemotion/nekohtml The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-24839
MEDIUM
5
sparklemotion/nekohtml
read
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
public static boolean isEmbedded(){ return embeddedMode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEmbedded File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
isEmbedded
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public AuthorizationStrategy getAuthorizationStrategy() { return authorizationStrategy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthorizationStrategy File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getAuthorizationStrategy
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public List<S3PluginActifactDto> listS3PluginActifacts() { String releaseFileUrl = getGlobalSystemVariableByName(SYS_VAR_PUBLIC_PLUGIN_ARTIFACTS_RELEASE_URL); if (StringUtils.isBlank(releaseFileUrl)) { throw new WecubeCoreException("3093", "The remote plugin artifacts release file is not properly provided."); } try { List<S3PluginActifactDto> results = parseReleaseFile(releaseFileUrl); return results; } catch (Exception e) { log.error("Failed to parse release file.", e); throw new WecubeCoreException("3094", String.format("Cannot parse release file properly.Caused by " + e.getMessage())); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listS3PluginActifacts File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java Repository: WeBankPartners/wecube-platform The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-45746
MEDIUM
5
WeBankPartners/wecube-platform
listS3PluginActifacts
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
1164dae43c505f8a0233cc049b2689d6ca6d0c37
0
Analyze the following code function for security vulnerabilities
private static final void readExceptionFromParcel(Parcel reply, String msg, int code) { switch (code) { case 2: throw new IllegalArgumentException(msg); case 3: throw new UnsupportedOperationException(msg); case 4: throw new SQLiteAbortException(msg); case 5: throw new SQLiteConstraintException(msg); case 6: throw new SQLiteDatabaseCorruptException(msg); case 7: throw new SQLiteFullException(msg); case 8: throw new SQLiteDiskIOException(msg); case 9: throw new SQLiteException(msg); case 11: throw new OperationCanceledException(msg); default: reply.readException(code, msg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readExceptionFromParcel File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
readExceptionFromParcel
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
public static synchronized void uninstall(String accessToken) { if (!isInstalled()) throw new IllegalStateException(localized("security.not_installed")); //$NON-NLS-1$ var activeThreads = new Thread[0]; int oldPrio = Thread.currentThread().getPriority(); try { INSTANCE.checkAccess(accessToken); if (INSTANCE.isPartlyDisabled) throw new IllegalStateException(localized("security.already_disabled")); //$NON-NLS-1$ Thread.currentThread().setPriority(Thread.MAX_PRIORITY); LOG.info("Request uninstall"); //$NON-NLS-1$ // try to clean up and try to run finalize() of test objects System.gc(); // NOSONAR System.runFinalization(); // NOSONAR // cannot be used in conjunction with classic JUnit timeout, use @StrictTimeout activeThreads = INSTANCE.checkThreadGroup(); INSTANCE.checkCommonThreadPool(); INSTANCE.unwhitelistThreads(); INSTANCE.blockThreadCreation = false; INSTANCE.lastUninstallFailed = false; INSTANCE.isActive = false; } catch (Throwable t) { // NOSONAR INSTANCE.lastUninstallFailed = true; LOG.error("UNINSTALL FAILED", t); //$NON-NLS-1$ throw t; } finally { Thread.currentThread().setPriority(oldPrio); } if (activeThreads.length > 0) throw new IllegalStateException( formatLocalized("security.error_threads_still_active", Arrays.toString(activeThreads))); //$NON-NLS-1$ }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: uninstall File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
uninstall
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
private static boolean areIconsObviouslyDifferent(Icon a, Icon b) { if (a == b) { return false; } if (a == null || b == null) { return true; } if (a.sameAs(b)) { return false; } final int aType = a.getType(); if (aType != b.getType()) { return true; } if (aType == Icon.TYPE_BITMAP || aType == Icon.TYPE_ADAPTIVE_BITMAP) { final Bitmap aBitmap = a.getBitmap(); final Bitmap bBitmap = b.getBitmap(); return aBitmap.getWidth() != bBitmap.getWidth() || aBitmap.getHeight() != bBitmap.getHeight() || aBitmap.getConfig() != bBitmap.getConfig() || aBitmap.getGenerationId() != bBitmap.getGenerationId(); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: areIconsObviouslyDifferent File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
areIconsObviouslyDifferent
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public SleepTokenAcquirer createSleepTokenAcquirer(@NonNull String tag) { Objects.requireNonNull(tag); return new SleepTokenAcquirerImpl(tag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSleepTokenAcquirer 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
createSleepTokenAcquirer
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private static Node migrateDefaultValueProvider(Element defaultValueProviderElement) { List<NodeTuple> tuples = new ArrayList<>(); String classTag = getClassTag(defaultValueProviderElement.attributeValue("class")); Element scriptNameElement = defaultValueProviderElement.element("scriptName"); if (scriptNameElement != null) { tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "scriptName"), new ScalarNode(Tag.STR, scriptNameElement.getText().trim()))); } Element valueElement = defaultValueProviderElement.element("value"); if (valueElement != null) { tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "value"), new ScalarNode(Tag.STR, valueElement.getText().trim()))); } return new MappingNode(new Tag(classTag), tuples, FlowStyle.BLOCK); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateDefaultValueProvider File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-538" ]
CVE-2021-21250
MEDIUM
4
theonedev/onedev
migrateDefaultValueProvider
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
9196fd795e87dab069b4260a3590a0ea886e770f
0
Analyze the following code function for security vulnerabilities
@Override public void deleteProject(long projectID) { synchronized (this) { removeProject(projectID); File dir = getProjectDir(projectID); if (dir.exists()) { deleteDir(dir); } } projectRemoved = true; saveWorkspace(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteProject File: main/src/com/google/refine/io/FileProjectManager.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-37476
HIGH
7.8
OpenRefine
deleteProject
main/src/com/google/refine/io/FileProjectManager.java
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
0
Analyze the following code function for security vulnerabilities
public ParcelFileDescriptor openContentUri(Uri uri) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openContentUri File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
openContentUri
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getCrossProfilePackages(ComponentName who) { if (!mHasFeature) { return Collections.emptyList(); } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization(isProfileOwner(caller)); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); return admin.mCrossProfilePackages; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfilePackages 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
getCrossProfilePackages
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override protected Component newProjectTitle(String componentId) { return new Label(componentId, "Files"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newProjectTitle File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-434" ]
CVE-2021-21245
HIGH
7.5
theonedev/onedev
newProjectTitle
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
private void sendUpdates(KeyguardUpdateMonitorCallback callback) { // Notify listener of the current state callback.onRefreshBatteryInfo(mBatteryStatus); callback.onTimeChanged(); callback.onRingerModeChanged(mRingMode); callback.onPhoneStateChanged(mPhoneState); callback.onRefreshCarrierInfo(); callback.onClockVisibilityChanged(); for (Entry<Integer, SimData> data : mSimDatas.entrySet()) { final SimData state = data.getValue(); callback.onSimStateChanged(state.subId, state.slotId, state.simState); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendUpdates 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
sendUpdates
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
boolean safelyDestroy(String reason) { if (isDestroyable()) { if (DEBUG_SWITCH) { final Task task = getTask(); Slog.v(TAG_SWITCH, "Safely destroying " + this + " in state " + getState() + " resumed=" + task.getTopResumedActivity() + " pausing=" + task.getTopPausingActivity() + " for reason " + reason); } return destroyImmediately(reason); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: safelyDestroy 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
safelyDestroy
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public static VersionedYamlDoc fromBean(Object bean) { VersionedYamlDoc doc = new VersionedYamlDoc((MappingNode) new OneYaml().represent(bean)); doc.setVersion(MigrationHelper.getVersion(HibernateProxyHelper.getClassWithoutInitializingProxy(bean))); return doc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromBean File: server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-21249
MEDIUM
6.5
theonedev/onedev
fromBean
server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java
d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66
0
Analyze the following code function for security vulnerabilities
public void doGroupAction(Object obj) { idTimeMap.remove(obj); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doGroupAction File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java Repository: OpenIdentityPlatform/OpenAM The code follows secure coding practices.
[ "CWE-287" ]
CVE-2023-37471
CRITICAL
9.8
OpenIdentityPlatform/OpenAM
doGroupAction
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
7c18543d126e8a567b83bb4535631825aaa9d742
0
Analyze the following code function for security vulnerabilities
@Test public void postQueryNoMetricBadRequest() throws Exception { final DeferredGroupException dge = mock(DeferredGroupException.class); when(dge.getCause()).thenReturn(new NoSuchUniqueName("foo", "metrics")); when(query_result.configureFromQuery((TSQuery)any(), anyInt())) .thenReturn(Deferred.fromError(dge)); HttpQuery query = NettyMocks.postQuery(tsdb, "/api/query", "{\"start\":1425440315306,\"queries\":" + "[{\"metric\":\"nonexistent\",\"aggregator\":\"sum\",\"rate\":true," + "\"rateOptions\":{\"counter\":false}}]}"); rpc.execute(tsdb, query); assertEquals(HttpResponseStatus.BAD_REQUEST, query.response().getStatus()); final String json = query.response().getContent().toString(Charset.forName("UTF-8")); assertTrue(json.contains("No such name for 'foo': 'metrics'")); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-25827 - Severity: MEDIUM - CVSS Score: 6.1 Description: Fix for #2269 and #2267 XSS vulnerability. Escaping the user supplied input when outputing the HTML for the old BadRequest HTML handlers should help. Thanks to the reporters. Fixes CVE-2018-13003. Function: postQueryNoMetricBadRequest File: test/tsd/TestQueryRpc.java Repository: OpenTSDB/opentsdb Fixed Code: @Test public void postQueryNoMetricBadRequest() throws Exception { final DeferredGroupException dge = mock(DeferredGroupException.class); when(dge.getCause()).thenReturn(new NoSuchUniqueName("foo", "metrics")); when(query_result.configureFromQuery((TSQuery)any(), anyInt())) .thenReturn(Deferred.fromError(dge)); HttpQuery query = NettyMocks.postQuery(tsdb, "/api/query", "{\"start\":1425440315306,\"queries\":" + "[{\"metric\":\"nonexistent\",\"aggregator\":\"sum\",\"rate\":true," + "\"rateOptions\":{\"counter\":false}}]}"); rpc.execute(tsdb, query); assertEquals(HttpResponseStatus.BAD_REQUEST, query.response().getStatus()); final String json = query.response().getContent().toString(Charset.forName("UTF-8")); assertTrue(json.contains("No such name for &#39;foo&#39;: &#39;metrics&#39;")); }
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
postQueryNoMetricBadRequest
test/tsd/TestQueryRpc.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
1
Analyze the following code function for security vulnerabilities
public int engineUpdate( byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) { buffer.write(input, inputOffset, inputLen); return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineUpdate File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineUpdate
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
@Override protected SQLDialect createSQLDialect(JDBCDataStore dataStore) { return delegate.createSQLDialect(dataStore); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSQLDialect File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
createSQLDialect
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
@Override public void setFractionLength(int minFrac, int maxFrac) { // Validation should happen outside of DecimalQuantity, e.g., in the Rounder class. assert minFrac >= 0; assert maxFrac >= minFrac; // Save values into internal state // Negation is safe for minFrac/maxFrac because -Integer.MAX_VALUE > Integer.MIN_VALUE rReqPos = -minFrac; rOptPos = -maxFrac; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFractionLength 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
setFractionLength
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
public Authentication getAuthentication(String authName) { return authentications.get(authName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthentication File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getAuthentication
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public RemoteInput getRemoteInput() { return mRemoteInput; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemoteInput File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getRemoteInput
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void removeChildrenContentFromRouterLayout( final RouterLayout targetRouterLayout, final Map<RouterLayout, HasElement> oldChildren) { HasElement oldContent = oldChildren.get(targetRouterLayout); RouterLayout removeFrom = targetRouterLayout; // Recursively remove content of the all nested router // layouts of the given old content to be detached. This // is needed to let Dependency Injection frameworks to // re-create managed components with no // duplicates/leftovers. while (oldContent != null) { removeFrom.removeRouterLayoutContent(oldContent); if (oldContent instanceof RouterLayout) { removeFrom = (RouterLayout) oldContent; } oldContent = oldChildren.get(oldContent); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeChildrenContentFromRouterLayout 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
removeChildrenContentFromRouterLayout
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Override public synchronized SSLEngineResult unwrap( final ByteBuffer src, final ByteBuffer[] dsts, final int offset, final int length) throws SSLException { try { return unwrap(singleSrcBuffer(src), 0, 1, dsts, offset, length); } finally { resetSingleSrcBuffer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unwrap File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
unwrap
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return Objects.hashCode(this.id); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
hashCode
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
public Endpoint getAuthorizationOIDCEndpoint() throws URISyntaxException { return getEndPoint(AuthorizationOIDCEndpoint.HINT); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthorizationOIDCEndpoint 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
getAuthorizationOIDCEndpoint
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
private int runDump() { String pkg = nextArg(); if (pkg == null) { System.err.println("Error: no package specified"); return 1; } ActivityManager.dumpPackageStateStatic(FileDescriptor.out, pkg); return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runDump File: cmds/pm/src/com/android/commands/pm/Pm.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3833
HIGH
9.3
android
runDump
cmds/pm/src/com/android/commands/pm/Pm.java
4e4743a354e26467318b437892a9980eb9b8328a
0
Analyze the following code function for security vulnerabilities
@Override public void onSkipToPrevious() { super.onSkipToPrevious(); RemoteControlCallback.skipToPrevious(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSkipToPrevious File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
onSkipToPrevious
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Temporal(TemporalType.TIMESTAMP) @Column(name = "create_date", nullable = false, length = 19) public Date getCreateDate() { return this.createDate; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCreateDate File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getCreateDate
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
private void finishWindowsDrawn() { synchronized (mLock) { if (!mScreenOnEarly || mWindowManagerDrawComplete) { return; // spurious } mWindowManagerDrawComplete = true; } finishScreenTurningOn(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishWindowsDrawn File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
finishWindowsDrawn
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
protected void basicRemove() { if (parent_ != null && parent_.firstChild_ == this) { parent_.firstChild_ = nextSibling_; } else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) { previousSibling_.nextSibling_ = nextSibling_; } if (nextSibling_ != null && nextSibling_.previousSibling_ == this) { nextSibling_.previousSibling_ = previousSibling_; } if (parent_ != null && this == parent_.getLastChild()) { parent_.firstChild_.previousSibling_ = previousSibling_; } nextSibling_ = null; previousSibling_ = null; parent_ = null; attachedToPage_ = false; for (final DomNode descendant : getDescendants()) { descendant.attachedToPage_ = false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: basicRemove File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
basicRemove
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
private List<ReadableManufacturer> getManufacturers(MerchantStore store, List<Long> ids, Language language) throws Exception { List<ReadableManufacturer> manufacturerList = new ArrayList<ReadableManufacturer>(); List<com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer> manufacturers = manufacturerService.listByProductsByCategoriesId(store, ids, language); if(!manufacturers.isEmpty()) { for(com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer manufacturer : manufacturers) { ReadableManufacturer manuf = new ReadableManufacturerPopulator().populate(manufacturer, new ReadableManufacturer(), store, language); manufacturerList.add(manuf); } } return manufacturerList; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getManufacturers File: sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java Repository: shopizer-ecommerce/shopizer The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-33561
LOW
3.5
shopizer-ecommerce/shopizer
getManufacturers
sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
197f8c78c8f673b957e41ca2c823afc654c19271
0
Analyze the following code function for security vulnerabilities
public synchronized boolean isAllowUserComments() throws DAOException { if (viewManager == null) { return false; } CommentGroup commentGroupAll = DataManager.getInstance().getDao().getCommentGroupUnfiltered(); if (commentGroupAll == null) { logger.warn("Comment view for all comments not found in the DB, please insert."); return false; } if (!commentGroupAll.isEnabled()) { logger.trace("User comments disabled globally."); viewManager.setAllowUserComments(false); return false; } if (viewManager.isAllowUserComments() == null) { try { if (StringUtils.isNotEmpty(commentGroupAll.getSolrQuery()) && DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder("+").append(SolrConstants.PI) .append(':') .append(viewManager.getPi()) .append(" +(") .append(commentGroupAll.getSolrQuery()) .append(')') .toString()) == 0) { viewManager.setAllowUserComments(false); logger.trace("User comments are not allowed for this record."); } else { viewManager.setAllowUserComments(true); } } catch (IndexUnreachableException e) { logger.debug("IndexUnreachableException thrown here: {}", e.getMessage()); return false; } catch (PresentationException e) { logger.debug(StringConstants.LOG_PRESENTATION_EXCEPTION_THROWN_HERE, e.getMessage()); return false; } } return viewManager.isAllowUserComments(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAllowUserComments File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
isAllowUserComments
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
public JSONArray getJSONArray(String key) throws JSONException { Object o = get(key); if (o instanceof JSONArray) { return (JSONArray)o; } throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJSONArray File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getJSONArray
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public void onServiceConnected(ComponentName name, IBinder service) { try { mConnectionCb.onServiceConnected(service); } catch (RemoteException re) { Slog.e(TAG, "Error passing service interface", re); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onServiceConnected File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
onServiceConnected
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public static boolean hasCredentialChanged(WifiConfiguration existingConfig, WifiConfiguration newConfig) { if (!Objects.equals(existingConfig.allowedKeyManagement, newConfig.allowedKeyManagement)) { return true; } if (!Objects.equals(existingConfig.allowedProtocols, newConfig.allowedProtocols)) { return true; } if (!Objects.equals(existingConfig.allowedAuthAlgorithms, newConfig.allowedAuthAlgorithms)) { return true; } if (!Objects.equals(existingConfig.allowedPairwiseCiphers, newConfig.allowedPairwiseCiphers)) { return true; } if (!Objects.equals(existingConfig.allowedGroupCiphers, newConfig.allowedGroupCiphers)) { return true; } if (!Objects.equals(existingConfig.allowedGroupManagementCiphers, newConfig.allowedGroupManagementCiphers)) { return true; } if (!Objects.equals(existingConfig.allowedSuiteBCiphers, newConfig.allowedSuiteBCiphers)) { return true; } if (!existingConfig.getSecurityParamsList().equals(newConfig.getSecurityParamsList())) { return true; } if (!Objects.equals(existingConfig.preSharedKey, newConfig.preSharedKey)) { return true; } if (!Arrays.equals(existingConfig.wepKeys, newConfig.wepKeys)) { return true; } if (existingConfig.wepTxKeyIndex != newConfig.wepTxKeyIndex) { return true; } if (existingConfig.hiddenSSID != newConfig.hiddenSSID) { return true; } if (existingConfig.requirePmf != newConfig.requirePmf) { return true; } if (existingConfig.carrierId != newConfig.carrierId) { return true; } if (hasEnterpriseConfigChanged(existingConfig.enterpriseConfig, newConfig.enterpriseConfig)) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasCredentialChanged File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
hasCredentialChanged
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
private void sendClientIdent() throws IOException { log.info("Client identity string: {}", clientID); connInfo.out.write((clientID + "\r\n").getBytes(IOUtils.UTF8)); connInfo.out.flush(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendClientIdent File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
sendClientIdent
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
@PostMapping(value = "/localCache") public String updateLocalCacheFromStore() { LOGGER.info("start to dump all data from store."); dumpService.dumpAll(); LOGGER.info("finish to dump all data from store."); return HttpServletResponse.SC_OK + ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateLocalCacheFromStore File: config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigOpsController.java Repository: alibaba/nacos The code follows secure coding practices.
[ "CWE-306" ]
CVE-2021-29442
MEDIUM
5
alibaba/nacos
updateLocalCacheFromStore
config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigOpsController.java
bffd440297618d189a7c8cac26191147d763cc6f
0
Analyze the following code function for security vulnerabilities
private void showRecipientErrorDialog(final String message) { final DialogFragment frag = RecipientErrorDialogFragment.newInstance(message); frag.show(getFragmentManager(), "recipient error"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showRecipientErrorDialog File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
showRecipientErrorDialog
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public static boolean defaultToTrue(Boolean b) { if(b==null) return true; return b; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: defaultToTrue 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
defaultToTrue
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Override boolean isVisibleRequested() { return mVisibleRequested; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isVisibleRequested 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
isVisibleRequested
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void getWindowDisplayFrame(Session session, IWindow client, Rect outDisplayFrame) { synchronized(mWindowMap) { WindowState win = windowForClientLocked(session, client, false); if (win == null) { outDisplayFrame.setEmpty(); return; } outDisplayFrame.set(win.mDisplayFrame); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWindowDisplayFrame 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
getWindowDisplayFrame
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public synchronized List<Action> getActions() { // add all the transient actions, too List<Action> actions = new Vector<Action>(super.getActions()); actions.addAll(transientActions); // return the read only list to cause a failure on plugins who try to add an action here return Collections.unmodifiableList(actions); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActions File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getActions
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void setSelectedRecordLanguage(String selectedRecordLanguage) { logger.trace("setSelectedRecordLanguage: {}", selectedRecordLanguage); if (selectedRecordLanguage != null && selectedRecordLanguage.length() == 3) { // Map ISO-3 codes to their ISO-2 variant Language language = DataManager.getInstance().getLanguageHelper().getLanguage(selectedRecordLanguage); if (language != null) { logger.trace("Mapped language found: {}", language.getIsoCodeOld()); this.selectedRecordLanguage = language.getIsoCodeOld(); } else { logger.warn("Language not found for code: {}", selectedRecordLanguage); this.selectedRecordLanguage = selectedRecordLanguage; } } else { this.selectedRecordLanguage = selectedRecordLanguage; } MetadataBean mdb = BeanUtils.getMetadataBean(); if (mdb != null) { mdb.setSelectedRecordLanguage(this.selectedRecordLanguage); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSelectedRecordLanguage File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
setSelectedRecordLanguage
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
@Override public void removeMember(Context context, Group group, EPerson ePerson) throws SQLException { List<CollectionRole> collectionRoles = collectionRoleService.findByGroup(context, group); if (!collectionRoles.isEmpty()) { List<PoolTask> poolTasks = poolTaskService.findByGroup(context, group); List<ClaimedTask> claimedTasks = claimedTaskService.findByEperson(context, ePerson); for (ClaimedTask claimedTask : claimedTasks) { Step stepByName = workflowFactory.getStepByName(claimedTask.getStepID()); Role role = stepByName.getRole(); for (CollectionRole collectionRole : collectionRoles) { if (StringUtils.equals(collectionRole.getRoleId(), role.getId()) && claimedTask.getWorkflowItem().getCollection() == collectionRole.getCollection()) { List<EPerson> ePeople = allMembers(context, group); if (ePeople.size() == 1 && ePeople.contains(ePerson)) { throw new IllegalStateException( "Refused to remove user " + ePerson .getID() + " from workflow group because the group " + group .getID() + " has tasks assigned and no other members"); } } } } if (!poolTasks.isEmpty()) { List<EPerson> ePeople = allMembers(context, group); if (ePeople.size() == 1 && ePeople.contains(ePerson)) { throw new IllegalStateException( "Refused to remove user " + ePerson .getID() + " from workflow group because the group " + group .getID() + " has tasks assigned and no other members"); } } } if (group.remove(ePerson)) { context.addEvent(new Event(Event.REMOVE, Constants.GROUP, group.getID(), Constants.EPERSON, ePerson.getID(), ePerson.getEmail(), getIdentifiers(context, group))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeMember File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41189
HIGH
9
DSpace
removeMember
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
0
Analyze the following code function for security vulnerabilities
@GuardedBy("getLockObject()") private void updateProfileLockTimeoutLocked(@UserIdInt int userId) { final long timeMs; if (isSeparateProfileChallengeEnabled(userId)) { timeMs = getMaximumTimeToLockPolicyFromAdmins( getActiveAdminsForLockscreenPoliciesLocked(userId)); } else { timeMs = Long.MAX_VALUE; } final DevicePolicyData policy = getUserDataUnchecked(userId); if (policy.mLastMaximumTimeToLock == timeMs) { return; } policy.mLastMaximumTimeToLock = timeMs; mInjector.binderWithCleanCallingIdentity(() -> getPowerManagerInternal().setMaximumScreenOffTimeoutFromDeviceAdmin( userId, policy.mLastMaximumTimeToLock)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateProfileLockTimeoutLocked 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
updateProfileLockTimeoutLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void updateLinkProperties(LinkProperties newLp) { if (mVerboseLoggingEnabled) { log("Link configuration changed for netId: " + mLastNetworkId + " old: " + mLinkProperties + " new: " + newLp); } // We own this instance of LinkProperties because IpClient passes us a copy. mLinkProperties = newLp; if (mNetworkAgent != null) { mNetworkAgent.sendLinkProperties(mLinkProperties); } if (mNetworkAgentState == DetailedState.CONNECTED) { // If anything has changed and we're already connected, send out a notification. // TODO: Update all callers to use NetworkCallbacks and delete this. sendLinkConfigurationChangedBroadcast(); } if (mVerboseLoggingEnabled) { StringBuilder sb = new StringBuilder(); sb.append("updateLinkProperties nid: " + mLastNetworkId); sb.append(" state: " + mNetworkAgentState); if (mLinkProperties != null) { sb.append(" "); sb.append(getLinkPropertiesSummary(mLinkProperties)); } logd(sb.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateLinkProperties 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
updateLinkProperties
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0