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
private void writePrimitive(Object value) throws JMSException { if (this.reading || isReadonlyBody()) throw new MessageNotWriteableException(NOT_WRITEABLE); try { RMQMessage.writePrimitive(value, this.out); } catch (IOException x) { throw new RMQJMSException(x); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writePrimitive File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
writePrimitive
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Override public Rectangle2D getBoundingBox() { return boundsToParent(bounds); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBoundingBox File: svg-core/src/main/java/com/kitfox/svg/ImageSVG.java Repository: blackears/svgSalamander The code follows secure coding practices.
[ "CWE-918" ]
CVE-2017-5617
MEDIUM
5.8
blackears/svgSalamander
getBoundingBox
svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
826555b0a3229b6cf4671fe4de7aa51b5946b63d
0
Analyze the following code function for security vulnerabilities
private void installEncryptionUnawareProviders(int userId) { // We're only interested in providers that are encryption unaware, and // we don't care about uninstalled apps, since there's no way they're // running at this point. final int matchFlags = GET_PROVIDERS | MATCH_DIRECT_BOOT_UNAWARE; synchronized (this) { final int NP = mProcessNames.getMap().size(); for (int ip = 0; ip < NP; ip++) { final SparseArray<ProcessRecord> apps = mProcessNames.getMap().valueAt(ip); final int NA = apps.size(); for (int ia = 0; ia < NA; ia++) { final ProcessRecord app = apps.valueAt(ia); if (app.userId != userId || app.thread == null || app.unlocked) continue; final int NG = app.pkgList.size(); for (int ig = 0; ig < NG; ig++) { try { final String pkgName = app.pkgList.keyAt(ig); final PackageInfo pkgInfo = AppGlobals.getPackageManager() .getPackageInfo(pkgName, matchFlags, userId); if (pkgInfo != null && !ArrayUtils.isEmpty(pkgInfo.providers)) { for (ProviderInfo pi : pkgInfo.providers) { // TODO: keep in sync with generateApplicationProvidersLocked final boolean processMatch = Objects.equals(pi.processName, app.processName) || pi.multiprocess; final boolean userMatch = isSingleton(pi.processName, pi.applicationInfo, pi.name, pi.flags) ? (app.userId == UserHandle.USER_SYSTEM) : true; if (processMatch && userMatch) { Log.v(TAG, "Installing " + pi); app.thread.scheduleInstallProvider(pi); } else { Log.v(TAG, "Skipping " + pi); } } } } catch (RemoteException ignored) { } } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: installEncryptionUnawareProviders File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
installEncryptionUnawareProviders
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public void sendSetRingbackRequested(String id) throws Exception { for (IConnectionServiceAdapter a : mConnectionServiceAdapters) { a.setRingbackRequested(id, mConnectionById.get(id).ringing, null /*Session.Info*/); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSetRingbackRequested File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
sendSetRingbackRequested
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void onDoubleTapEventAck() { temporarilyHideTextHandles(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDoubleTapEventAck 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
onDoubleTapEventAck
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private static JNLPClassLoader createInstance(JNLPFile file, UpdatePolicy policy, String mainName, boolean enableCodeBase) throws LaunchException { String uniqueKey = file.getUniqueKey(); JNLPClassLoader baseLoader = uniqueKeyToLoader.get(uniqueKey); JNLPClassLoader loader = new JNLPClassLoader(file, policy, mainName, enableCodeBase); // If security level is 'high' or greater, we must check if the user allows unsigned applets // when the JNLPClassLoader is created. We do so here, because doing so in the constructor // causes unwanted side-effects for some applets. However, if the loader has been tagged // with "runInSandbox", then we do not show this dialog - since this tag indicates that // the user was already shown a CertWarning dialog and has chosen to run the applet sandboxed. // This means they've already agreed to running the applet and have specified with which // permission level to do it! if (loader.getSigningState() == SigningState.PARTIAL) { loader.securityDelegate.promptUserOnPartialSigning(); } else if (!loader.getSigning() && !loader.securityDelegate.userPromptedForSandbox() && file instanceof PluginBridge) { UnsignedAppletTrustConfirmation.checkUnsignedWithUserIfRequired((PluginBridge) file); } // New loader init may have caused extensions to create a // loader for this unique key. Check. JNLPClassLoader extLoader = uniqueKeyToLoader.get(uniqueKey); if (extLoader != null && extLoader != loader) { if (loader.getSigning() != extLoader.getSigning()) { loader.securityDelegate.promptUserOnPartialSigning(); } loader.merge(extLoader); extLoader.decrementLoaderUseCount(); // loader urls have been merged, ext loader is no longer used } // loader is now current + ext. But we also need to think of // the baseLoader if (baseLoader != null && baseLoader != loader) { loader.merge(baseLoader); } return loader; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createInstance File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.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
createInstance
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Override public <A extends SocketAddress> A getPeerAddress(Class<A> type) { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPeerAddress File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
getPeerAddress
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
@Override public void postNavLevel(StringBuffer sb, int depth) { if (!canRender(null, depth)) { return; } HtmlTag ul = new HtmlTag("ul"); sb.append(ul.renderCloseTag()); sb.append("\n"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postNavLevel File: java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java Repository: spacewalkproject/spacewalk The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
postNavLevel
java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
7b9ff9ad
0
Analyze the following code function for security vulnerabilities
public void recomputeDisableFlags(boolean animate) { mCommandQueue.recomputeDisableFlags(animate); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recomputeDisableFlags File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
recomputeDisableFlags
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private void writeContent(final TransformerHandler th, final String content) throws SAXException { th.characters(content.toCharArray(), 0, content.length()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeContent File: stroom-core-server/src/main/java/stroom/importexport/server/Config.java Repository: gchq/stroom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
writeContent
stroom-core-server/src/main/java/stroom/importexport/server/Config.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
0
Analyze the following code function for security vulnerabilities
protected void engineInitVerify( PublicKey publicKey) throws InvalidKeyException { CipherParameters param = DSAUtil.generatePublicKeyParameter(publicKey); digest.reset(); signer.init(false, param); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineInitVerify File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-347" ]
CVE-2016-1000338
MEDIUM
5
bcgit/bc-java
engineInitVerify
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
b0c3ce99d43d73a096268831d0d120ffc89eac7f
0
Analyze the following code function for security vulnerabilities
public int getRequestedOrientation(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); mRemote.transact(GET_REQUESTED_ORIENTATION_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestedOrientation File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getRequestedOrientation
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void setDumpFiles(boolean dumpFiles) { mDumpFiles = dumpFiles; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDumpFiles 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
setDumpFiles
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void selectSingle(AsyncResult<SQLConnection> conn, String sql, JsonArray params, Handler<AsyncResult<JsonArray>> replyHandler) { try { if (conn.failed()) { replyHandler.handle(Future.failedFuture(conn.cause())); return; } conn.result().querySingleWithParams(sql, params, replyHandler); } catch (Exception e) { log.error("select single sql: " + e.getMessage() + " - " + sql, e); replyHandler.handle(Future.failedFuture(e)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectSingle 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
selectSingle
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public boolean isProviderWhitelListed(String packageName, int profileId) { DevicePolicyManagerInternal devicePolicyManager = LocalServices.getService( DevicePolicyManagerInternal.class); // If the policy manager is not available on the device we deny it all. if (devicePolicyManager == null) { return false; } List<String> crossProfilePackages = devicePolicyManager .getCrossProfileWidgetProviders(profileId); return crossProfilePackages.contains(packageName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProviderWhitelListed 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
isProviderWhitelListed
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Override public void setRunningRemoteTransitionDelegate(IApplicationThread caller) { mAmInternal.enforceCallingPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS, "setRunningRemoteTransition"); final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); synchronized (mGlobalLock) { // Also only allow a process which is already runningRemoteAnimation to mark another // process. final WindowProcessController callingProc = getProcessController(callingPid, callingUid); if (callingProc == null || !callingProc.isRunningRemoteTransition()) { final String msg = "Can't call setRunningRemoteTransition from a process (pid=" + callingPid + " uid=" + callingUid + ") which isn't itself running a " + "remote transition."; Slog.e(TAG, msg); throw new SecurityException(msg); } final WindowProcessController wpc = getProcessController(caller); if (wpc == null) { Slog.w(TAG, "Unable to find process for application " + caller); return; } wpc.setRunningRemoteAnimation(true /* running */); callingProc.addRemoteAnimationDelegate(wpc); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRunningRemoteTransitionDelegate 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
setRunningRemoteTransitionDelegate
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void sendCommand(String packageName, String command, Bundle args, ResultReceiver cb) { mSessionCb.sendCommand(packageName, Binder.getCallingPid(), Binder.getCallingUid(), command, args, cb); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendCommand File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
sendCommand
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "ImportedFiles=" + imported + " currentDir=" + currentDir; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/net/sourceforge/plantuml/preproc/ImportedFiles.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
toString
src/net/sourceforge/plantuml/preproc/ImportedFiles.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
byte getFlags() { return flags; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFlags File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
getFlags
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
private void writeElement(XMLStreamWriter streamWriter, String localName, String value, boolean emptyIfNull) throws XMLStreamException { if (value != null) { if (value.isEmpty()) { streamWriter.writeEmptyElement(localName); } else { streamWriter.writeStartElement(localName); streamWriter.writeCharacters(value); streamWriter.writeEndElement(); } } else if (emptyIfNull) { streamWriter.writeEmptyElement(localName); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeElement File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-27480
HIGH
7.7
xwiki/xwiki-platform
writeElement
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
e3527b98fdd8dc8179c24dc55e662b2c55199434
0
Analyze the following code function for security vulnerabilities
public void validateHeaders() { // Need this block for WebDAV support. "Connection:close" header is ignored String lengthHeader = getHeader(CONTENT_LENGTH_HEADER); if ((lengthHeader == null) && (this.statusCode >= 300)) { int bodyBytes = this.outputStream.getOutputStreamLength(); if (getBufferSize() > bodyBytes) { Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES, "WinstoneResponse.ForcingContentLength", "" + bodyBytes); forceHeader(CONTENT_LENGTH_HEADER, "" + bodyBytes); lengthHeader = getHeader(CONTENT_LENGTH_HEADER); } } forceHeader(KEEP_ALIVE_HEADER, !closeAfterRequest() ? KEEP_ALIVE_OPEN : KEEP_ALIVE_CLOSE); String contentType = getHeader(CONTENT_TYPE_HEADER); if (this.statusCode != SC_MOVED_TEMPORARILY) { if (contentType == null) { // Bypass normal encoding forceHeader(CONTENT_TYPE_HEADER, "text/html;charset=" + getCharacterEncoding()); } else if (contentType.startsWith("text/")) { // replace charset in content StringBuffer remainder = new StringBuffer(); getCharsetFromContentTypeHeader(contentType, remainder); forceHeader(CONTENT_TYPE_HEADER, remainder.toString() + ";charset=" + getCharacterEncoding()); } } if (getHeader(DATE_HEADER) == null) { forceHeader(DATE_HEADER, formatHeaderDate(new Date())); } if (getHeader(X_POWERED_BY_HEADER) == null) { forceHeader(X_POWERED_BY_HEADER, X_POWERED_BY_HEADER_VALUE); } if (this.locale != null) { String lang = this.locale.getLanguage(); if ((this.locale.getCountry() != null) && !this.locale.getCountry().equals("")) { lang = lang + "-" + this.locale.getCountry(); } forceHeader(CONTENT_LANGUAGE_HEADER, lang); } // If we don't have a webappConfig, exit here, cause we definitely don't // have a session if (req.getWebAppConfig() == null) { return; } // Write out the new session cookie if it's present HostConfiguration hostConfig = req.getHostGroup().getHostByName(req.getServerName()); for (Iterator i = req.getCurrentSessionIds().keySet().iterator(); i.hasNext(); ) { String prefix = (String) i.next(); String sessionId = (String) req.getCurrentSessionIds().get(prefix); WebAppConfiguration ownerContext = hostConfig.getWebAppByURI(prefix); if (ownerContext != null) { WinstoneSession session = ownerContext.getSessionById(sessionId, true); if ((session != null) && session.isNew()) { session.setIsNew(false); Cookie cookie = new Cookie(WinstoneSession.SESSION_COOKIE_NAME, session.getId()); cookie.setMaxAge(-1); cookie.setSecure(req.isSecure()); cookie.setVersion(0); //req.isSecure() ? 1 : 0); cookie.setPath(req.getWebAppConfig().getContextPath().equals("") ? "/" : req.getWebAppConfig().getContextPath()); this.cookies.add(cookie); // don't call addCookie because we might be including } } } // Look for expired sessions: ie ones where the requested and current ids are different for (Iterator i = req.getRequestedSessionIds().keySet().iterator(); i.hasNext(); ) { String prefix = (String) i.next(); String sessionId = (String) req.getRequestedSessionIds().get(prefix); if (!req.getCurrentSessionIds().containsKey(prefix)) { Cookie cookie = new Cookie(WinstoneSession.SESSION_COOKIE_NAME, sessionId); cookie.setMaxAge(0); // explicitly expire this cookie cookie.setSecure(req.isSecure()); cookie.setVersion(0); //req.isSecure() ? 1 : 0); cookie.setPath(prefix.equals("") ? "/" : prefix); this.cookies.add(cookie); // don't call addCookie because we might be including } } Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES, "WinstoneResponse.HeadersPreCommit", this.headers + ""); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateHeaders File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
validateHeaders
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
private String constructResumedTraceName(String packageName) { return "focused app: " + packageName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: constructResumedTraceName 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
constructResumedTraceName
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public Object getFeature(String feature, String version) { return doc.getFeature(feature, version); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFeature 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
getFeature
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
private void setupModel(FragmentModel model, FormEntrySession fes, VisitDomainWrapper visitDomainWrapper, Boolean createVisit) { model.addAttribute("currentDate", (new DateMidnight()).toDate()); model.addAttribute("command", fes); model.addAttribute("visit", visitDomainWrapper); if (createVisit != null) { model.addAttribute("createVisit", createVisit.toString()); } else { model.addAttribute("createVisit", "false"); } Integer hfeMajorVersion = 1; Integer hfeMinorVersion = 0; try { String hfeVersion = ModuleFactory.getStartedModuleById("htmlformentry").getVersion(); String[] versionSplit = hfeVersion.split("\\."); hfeMajorVersion = Integer.valueOf(versionSplit[0]); hfeMinorVersion = Integer.valueOf(versionSplit[1]); } catch (Exception e) { log.warn("Unable to retrieve htmlformentry major and minor versions", e); } model.addAttribute("hfeMajorVersion", hfeMajorVersion); model.addAttribute("hfeMinorVersion", hfeMinorVersion); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setupModel File: omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java Repository: openmrs/openmrs-module-htmlformentryui The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-4284
MEDIUM
6.1
openmrs/openmrs-module-htmlformentryui
setupModel
omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
811990972ea07649ae33c4b56c61c3b520895f07
0
Analyze the following code function for security vulnerabilities
public void defineEntityReplacementText(String entityName, String replacementText) throws XmlPullParserException { throw new XmlPullParserException("defineEntityReplacementText() not supported"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: defineEntityReplacementText File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
defineEntityReplacementText
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") protected JsonDeserializer<Object> _findCustomBeanDeserializer(JavaType type, DeserializationConfig config, BeanDescription beanDesc) throws JsonMappingException { for (Deserializers d : _factoryConfig.deserializers()) { JsonDeserializer<?> deser = d.findBeanDeserializer(type, config, beanDesc); if (deser != null) { return (JsonDeserializer<Object>) deser; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _findCustomBeanDeserializer File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
_findCustomBeanDeserializer
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
private void incrementRecipientsTimesContacted( final String toAddresses, final String ccAddresses, final String bccAddresses) { final List<String> recipients = Lists.newArrayList(); addAddressesToRecipientList(recipients, toAddresses); addAddressesToRecipientList(recipients, ccAddresses); addAddressesToRecipientList(recipients, bccAddresses); incrementRecipientsTimesContacted(recipients); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: incrementRecipientsTimesContacted 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
incrementRecipientsTimesContacted
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@Override protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { fillParamValues(request); if (DIALOG_CANCEL.equals(getParamAction())) { setAction(ACTION_CANCEL); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initWorkplaceRequestValues 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
initWorkplaceRequestValues
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public void setSerialTo(String serialTo) { this.serialTo = serialTo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSerialTo File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setSerialTo
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public String ParamAsRealPath(String key, XWikiContext context) { return ParamAsRealPath(key); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ParamAsRealPath 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
ParamAsRealPath
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public String escapeString(String str) { try { return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { return str; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: escapeString 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
escapeString
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static String getQueryString(String template, String entityName) { Assert.hasText(entityName, "Entity name must not be null or empty!"); return String.format(template, entityName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getQueryString File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
getQueryString
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public String search() { String key; Map<String, Object> data; if (getParaToInt(1) == null) { if (isNotNullOrNotEmptyStr(getPara("key"))) { if ("GET".equals(getRequest().getMethod())) { key = convertRequestParam(getPara("key")); } else { key = getPara("key"); } data = articleService.searchArticle(1, getDefaultRows(), key); } else { return all(); } } else { key = convertRequestParam(getPara(0)); data = articleService.searchArticle(getParaToInt(1), getDefaultRows(), key); } // 记录回话的Key setAttr("key", WebTools.htmlEncode(key)); setAttr("tipsType", I18nUtil.getStringFromRes("search")); setAttr("tipsName", WebTools.htmlEncode(key)); setPageInfo(Constants.getArticleUri() + "search/" + key + "-", data, getParaToInt(1, 1)); return "page"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: search File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
search
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
@Override public void removeAllDynamicShortcuts(String packageName, @UserIdInt int userId) { verifyCaller(packageName, userId); List<ShortcutInfo> changedShortcuts = new ArrayList<>(); List<ShortcutInfo> removedShortcuts = null; final ShortcutPackage ps; synchronized (mLock) { throwIfUserLockedL(userId); ps = getPackageShortcutsForPublisherLocked(packageName, userId); // Dynamic shortcuts that are either cached or pinned will not get deleted. ps.findAll(changedShortcuts, (ShortcutInfo si) -> si.isVisibleToPublisher() && si.isDynamic() && (si.isCached() || si.isPinned()), ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO); removedShortcuts = ps.deleteAllDynamicShortcuts(); changedShortcuts = prepareChangedShortcuts( changedShortcuts, null, removedShortcuts, ps); } packageShortcutsChanged(ps, changedShortcuts, removedShortcuts); verifyStates(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAllDynamicShortcuts 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
removeAllDynamicShortcuts
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public FormDefBean fetchFormDetails(CRFVersionBean crfVBean,FormDefBean formDef){ CRFDAO<String, ArrayList> crfDao = new CRFDAO(this.ds); CRFBean crfBean = (CRFBean) crfDao.findByPK(crfVBean.getCrfId()); formDef.setOid(crfVBean.getOid()); formDef.setName(crfBean.getName() + " - " +crfVBean.getName()); formDef.setRepeating("No"); FormDetailsBean formDetails = new FormDetailsBean(); formDetails.setName(crfVBean.getName()); formDetails.setOid(crfVBean.getOid()); formDetails.setParentFormOid(crfBean.getOid()); setSectionBean(formDetails,new Integer(crfVBean.getId())); formDef.setFormDetails(formDetails); return formDef; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fetchFormDetails File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
fetchFormDetails
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
void forceReportingResized() { mWindowFrames.forceReportingResized(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forceReportingResized File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
forceReportingResized
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public Set<DocumentReference> getAlwaysUsedExtensions() { XWikiContext context = Utils.getContext(); // Retrieve the current wiki name from the XWiki context String currentWiki = StringUtils.defaultIfEmpty(context.getWikiId(), context.getMainXWiki()); // If we already have extensions defined for this wiki, we return them if (this.alwaysUsedExtensions.get(currentWiki) != null) { return this.alwaysUsedExtensions.get(currentWiki); } else { // Otherwise, we look them up in the database. Set<DocumentReference> extensions = new HashSet<>(); String query = ", BaseObject as obj, StringProperty as use where obj.className='" + getExtensionClassName() + "'" + " and obj.name=doc.fullName and use.id.id=obj.id and use.id.name='use' and use.value='always'"; try { for (DocumentReference extension : context.getWiki().getStore() .searchDocumentReferences(query, context)) { try { XWikiDocument doc = context.getWiki().getDocument(extension, context); // Only add the extension as being "always used" if the page holding it has been saved with // programming rights. if (Utils.getComponent(AuthorizationManager.class).hasAccess(Right.PROGRAM, doc.getAuthorReference(), doc.getDocumentReference())) { extensions.add(extension); } } catch (XWikiException e1) { LOGGER.error("Error while adding skin extension [{}] as always used. It will be ignored.", extension, e1); } } this.alwaysUsedExtensions.put(currentWiki, extensions); return extensions; } catch (XWikiException e) { LOGGER.error("Error while retrieving always used JS extensions", e); return Collections.emptySet(); } } }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-29206 - Severity: MEDIUM - CVSS Score: 5.4 Description: XWIKI-9119: Refactoring of SkinExtensionPlugin * Provide some tests Function: getAlwaysUsedExtensions File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java Repository: xwiki/xwiki-platform Fixed Code: public Set<DocumentReference> getAlwaysUsedExtensions() { XWikiContext context = Utils.getContext(); // Retrieve the current wiki name from the XWiki context String currentWiki = StringUtils.defaultIfEmpty(context.getWikiId(), context.getMainXWiki()); // If we already have extensions defined for this wiki, we return them if (this.alwaysUsedExtensions.get(currentWiki) != null) { return this.alwaysUsedExtensions.get(currentWiki); } else { // Otherwise, we look them up in the database. Set<DocumentReference> extensions = new HashSet<>(); String query = ", BaseObject as obj, StringProperty as use where obj.className='" + getExtensionClassName() + "'" + " and obj.name=doc.fullName and use.id.id=obj.id and use.id.name='use' and use.value='always'"; try { for (DocumentReference extension : context.getWiki().getStore() .searchDocumentReferences(query, context)) { try { XWikiDocument doc = context.getWiki().getDocument(extension, context); // Only add the extension as being "always used" if the page holding it has been saved with // programming rights. if (getAuthorizationManager().hasAccess(Right.PROGRAM, doc.getAuthorReference(), doc.getDocumentReference())) { extensions.add(extension); } } catch (XWikiException e1) { LOGGER.error("Error while adding skin extension [{}] as always used. It will be ignored.", extension, e1); } } this.alwaysUsedExtensions.put(currentWiki, extensions); return extensions; } catch (XWikiException e) { LOGGER.error("Error while retrieving always used JS extensions", e); return Collections.emptySet(); } } }
[ "CWE-79" ]
CVE-2023-29206
MEDIUM
5.4
xwiki/xwiki-platform
getAlwaysUsedExtensions
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
1
Analyze the following code function for security vulnerabilities
@Override public void notifyCommandBehavior(int commandBehavior) { if (commandBehavior == Display.COMMAND_BEHAVIOR_NATIVE) { if (getActivity() instanceof CodenameOneActivity) { ((CodenameOneActivity) getActivity()).enableNativeMenu(true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyCommandBehavior File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
notifyCommandBehavior
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public String updateDocumentSection(int sectionNumber, String newSectionContent) throws XWikiException { String content; if (is10Syntax()) { content = updateDocumentSection10(sectionNumber, newSectionContent); } else { // Get the current section block HeaderBlock header = getFilteredHeaders().get(sectionNumber - 1); XDOM xdom = (XDOM) header.getRoot(); // newSectionContent -> Blocks List<Block> blocks = parseContent(newSectionContent).getChildren(); int sectionLevel = header.getLevel().getAsInt(); for (int level = 1; level < sectionLevel && blocks.size() == 1 && blocks.get(0) instanceof SectionBlock; ++level) { blocks = blocks.get(0).getChildren(); } // replace old current SectionBlock with new Blocks Block section = header.getSection(); section.getParent().replaceChild(blocks, section); // render back XDOM to document's content syntax content = renderXDOM(xdom, getSyntax()); } return content; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateDocumentSection File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
updateDocumentSection
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Override protected void callback(UpstreamCause uc, UnmarshallingContext context) { if (uc.upstreamCause != null) { if (uc.upstreamCauses == null) uc.upstreamCauses = new ArrayList<Cause>(); uc.upstreamCauses.add(uc.upstreamCause); uc.upstreamCause = null; OldDataMonitor.report(context, "1.288"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: callback File: core/src/main/java/hudson/model/Cause.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2067
LOW
3.5
jenkinsci/jenkins
callback
core/src/main/java/hudson/model/Cause.java
5d57c855f3147bfc5e7fda9252317b428a700014
0
Analyze the following code function for security vulnerabilities
private void setPropertyIfNotNull(org.neo4j.graphdb.Node root, String propertyKey, Object value) { if (value!=null) { root.setProperty(propertyKey, value); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPropertyIfNotNull File: src/main/java/apoc/load/Xml.java Repository: neo4j-contrib/neo4j-apoc-procedures The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000820
HIGH
7.5
neo4j-contrib/neo4j-apoc-procedures
setPropertyIfNotNull
src/main/java/apoc/load/Xml.java
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
0
Analyze the following code function for security vulnerabilities
@RequiresPermissions("topic:index_all") @GetMapping("/index_all") @ResponseBody public Result index_all() { indexedService.indexAllTopic(); return success(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: index_all File: src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java Repository: atjiu/pybbs The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-23391
MEDIUM
4.3
atjiu/pybbs
index_all
src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
0
Analyze the following code function for security vulnerabilities
public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onEnrollmentHelp File: core/java/android/hardware/fingerprint/FingerprintManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
onEnrollmentHelp
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public Class<?> findLoadedClassFromParent(String name) { return findLoadedClass(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findLoadedClassFromParent File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.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
findLoadedClassFromParent
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@GetMapping("/settings") public String settings(HttpSession session, Model model) { // 再查一遍,保证数据的最新 User user = userService.selectById(getUser().getId()); model.addAttribute("user", user); return render("user/settings"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: settings File: src/main/java/co/yiiu/pybbs/controller/front/IndexController.java Repository: atjiu/pybbs The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-23391
MEDIUM
4.3
atjiu/pybbs
settings
src/main/java/co/yiiu/pybbs/controller/front/IndexController.java
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
0
Analyze the following code function for security vulnerabilities
@Override public void notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userHandle) { Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()), String.format(NOT_SYSTEM_CALLER_MSG, "call notifyLockTaskModeChanged")); synchronized (getLockObject()) { final DevicePolicyData policy = getUserData(userHandle); if (policy.mStatusBarDisabled) { // Status bar is managed by LockTaskController during LockTask, so we cancel this // policy when LockTask starts, and reapply it when LockTask ends setStatusBarDisabledInternal(!isEnabled, userHandle); } Bundle adminExtras = new Bundle(); adminExtras.putString(DeviceAdminReceiver.EXTRA_LOCK_TASK_PACKAGE, pkg); for (ActiveAdmin admin : policy.mAdminList) { final boolean ownsDevice = isDeviceOwner(admin.info.getComponent(), userHandle); final boolean ownsProfile = isProfileOwner(admin.info.getComponent(), userHandle); // TODO(b/281738975): Should we be logging this for all admins? if (ownsDevice || ownsProfile) { if (isEnabled) { sendAdminCommandLocked(admin, DeviceAdminReceiver.ACTION_LOCK_TASK_ENTERING, adminExtras, null); } else { sendAdminCommandLocked(admin, DeviceAdminReceiver.ACTION_LOCK_TASK_EXITING); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_LOCKTASK_MODE_ENABLED) .setAdmin(admin.info == null ? null : admin.info.getPackageName()) .setBoolean(isEnabled) .setStrings(pkg) .write(); } } } // TODO(b/281738975): Should we be logging this for all admins? for(EnforcingAdmin admin : mDevicePolicyEngine.getLocalPoliciesSetByAdmins( PolicyDefinition.LOCK_TASK, userHandle).keySet()) { if (admin.hasAuthority(EnforcingAdmin.DPC_AUTHORITY)) { // already handled above continue; } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_LOCKTASK_MODE_ENABLED) .setAdmin(admin.getPackageName()) .setBoolean(isEnabled) .setStrings(pkg) .write(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyLockTaskModeChanged 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
notifyLockTaskModeChanged
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
protected boolean assureDir(File fileDir) { if (fileDir.exists() == false) fileDir.mkdirs(); return fileDir.isDirectory(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assureDir File: 1.x/src/rogatkin/web/WarRoller.java Repository: drogatkin/TJWS2 The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4594
CRITICAL
9.8
drogatkin/TJWS2
assureDir
1.x/src/rogatkin/web/WarRoller.java
1bac15c496ec54efe21ad7fab4e17633778582fc
0
Analyze the following code function for security vulnerabilities
@RequestMapping("doUpload") @Csrf public String upload(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, MultipartFile[] files, String path, boolean privatefile, boolean overwrite, HttpServletRequest request, ModelMap model) { if (null != files) { try { for (MultipartFile file : files) { String originalName = file.getOriginalFilename(); String suffix = CmsFileUtils.getSuffix(originalName); String filepath = CommonUtils.joinString(path, Constants.SEPARATOR, originalName); String fuleFilePath = siteComponent.getWebFilePath(site.getId(), filepath); if (overwrite || !CmsFileUtils.exists(fuleFilePath)) { if (CmsFileUtils.exists(fuleFilePath)) { String historyFilePath = siteComponent.getWebHistoryFilePath(site.getId(), filepath, true); try { CmsFileUtils.copyFileToFile(historyFilePath, historyFilePath); } catch (IOException e1) { } } CmsFileUtils.upload(file, fuleFilePath); if (CmsFileUtils.isSafe(fuleFilePath, suffix)) { FileUploadResult uploadResult = CmsFileUtils.getFileSize(fuleFilePath, originalName, suffix); logUploadService.save(new LogUpload(site.getId(), admin.getId(), LogLoginService.CHANNEL_WEB_MANAGER, originalName, privatefile, CmsFileUtils.getFileType(CmsFileUtils.getSuffix(originalName)), file.getSize(), uploadResult.getWidth(), uploadResult.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), filepath)); } else { CmsFileUtils.delete(fuleFilePath); model.addAttribute(CommonConstants.ERROR, LanguagesUtils.getMessage( CommonConstants.applicationContext, request.getLocale(), "verify.custom.file.unsafe")); return CommonConstants.TEMPLATE_ERROR; } } } } catch (IOException e) { model.addAttribute(CommonConstants.ERROR, e.getMessage()); log.error(e.getMessage(), e); return CommonConstants.TEMPLATE_ERROR; } } return CommonConstants.TEMPLATE_DONE; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-51252 - Severity: MEDIUM - CVSS Score: 5.4 Description: https://github.com/sanluan/PublicCMS/issues/79 Function: upload File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/cms/CmsWebFileAdminController.java Repository: sanluan/PublicCMS Fixed Code: @RequestMapping("doUpload") @Csrf public String upload(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, MultipartFile[] files, String path, boolean privatefile, boolean overwrite, HttpServletRequest request, ModelMap model) { if (null != files) { try { for (MultipartFile file : files) { String originalName = file.getOriginalFilename(); String suffix = CmsFileUtils.getSuffix(originalName); String filepath = CommonUtils.joinString(path, Constants.SEPARATOR, originalName); String fuleFilePath = siteComponent.getWebFilePath(site.getId(), filepath); if (ArrayUtils.contains(safeConfigComponent.getSafeSuffix(site), suffix)) { if (overwrite || !CmsFileUtils.exists(fuleFilePath)) { if (CmsFileUtils.exists(fuleFilePath)) { String historyFilePath = siteComponent.getWebHistoryFilePath(site.getId(), filepath, true); try { CmsFileUtils.copyFileToFile(historyFilePath, historyFilePath); } catch (IOException e1) { } } CmsFileUtils.upload(file, fuleFilePath); if (CmsFileUtils.isSafe(fuleFilePath, suffix)) { FileUploadResult uploadResult = CmsFileUtils.getFileSize(fuleFilePath, originalName, suffix); logUploadService.save(new LogUpload(site.getId(), admin.getId(), LogLoginService.CHANNEL_WEB_MANAGER, originalName, privatefile, CmsFileUtils.getFileType(CmsFileUtils.getSuffix(originalName)), file.getSize(), uploadResult.getWidth(), uploadResult.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), filepath)); } else { CmsFileUtils.delete(fuleFilePath); model.addAttribute(CommonConstants.ERROR, LanguagesUtils.getMessage( CommonConstants.applicationContext, request.getLocale(), "verify.custom.file.unsafe")); return CommonConstants.TEMPLATE_ERROR; } } } else { model.addAttribute(CommonConstants.ERROR, LanguagesUtils.getMessage(CommonConstants.applicationContext, request.getLocale(), "verify.custom.fileType")); return CommonConstants.TEMPLATE_ERROR; } } } catch (IOException e) { model.addAttribute(CommonConstants.ERROR, e.getMessage()); log.error(e.getMessage(), e); return CommonConstants.TEMPLATE_ERROR; } } return CommonConstants.TEMPLATE_DONE; }
[ "CWE-79" ]
CVE-2023-51252
MEDIUM
5.4
sanluan/PublicCMS
upload
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/cms/CmsWebFileAdminController.java
2459a3f92c680ae011a369f32306c17df07caaa0
1
Analyze the following code function for security vulnerabilities
@Override public double readDouble() throws JMSException { return (Double)this.readPrimitiveType(Double.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readDouble File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
readDouble
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
void startTimeTrackingFocusedActivityLocked() { final ActivityRecord resumedActivity = mStackSupervisor.getResumedActivityLocked(); if (!mSleeping && mCurAppTimeTracker != null && resumedActivity != null) { mCurAppTimeTracker.start(resumedActivity.packageName); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startTimeTrackingFocusedActivityLocked 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
startTimeTrackingFocusedActivityLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override boolean check(MemberGroupConfig c1, MemberGroupConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(new ArrayList<String>(c1.getInterfaces()), new ArrayList<String>(c2.getInterfaces())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
private boolean checkPackagesInPermittedListOrSystem(List<String> enabledPackages, List<String> permittedList, int userIdToCheck) { long id = mInjector.binderClearCallingIdentity(); try { // If we have an enabled packages list for a managed profile the packages // we should check are installed for the parent user. UserInfo user = getUserInfo(userIdToCheck); if (user.isManagedProfile()) { userIdToCheck = user.profileGroupId; } for (String enabledPackage : enabledPackages) { boolean systemService = false; try { ApplicationInfo applicationInfo = mIPackageManager.getApplicationInfo( enabledPackage, PackageManager.MATCH_UNINSTALLED_PACKAGES, userIdToCheck); systemService = (applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } catch (RemoteException e) { Slogf.i(LOG_TAG, "Can't talk to package managed", e); } if (!systemService && !permittedList.contains(enabledPackage)) { return false; } } } finally { mInjector.binderRestoreCallingIdentity(id); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPackagesInPermittedListOrSystem 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
checkPackagesInPermittedListOrSystem
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
int checkCallingPermission(String permission) { return checkPermission(permission, Binder.getCallingPid(), Binder.getCallingUid()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkCallingPermission File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
checkCallingPermission
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
static URL classLocation(Class<?> type) { return type.getResource(type.getSimpleName() + ".class"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: classLocation File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
classLocation
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
@Override public void unregisterUserSwitchObserver(IUserSwitchObserver observer) { mUserController.unregisterUserSwitchObserver(observer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unregisterUserSwitchObserver 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
unregisterUserSwitchObserver
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public Object parseGroovyFromPage(String fullName, XWikiContext context) throws XWikiException { XWikiDocument groovyDocument = context.getWiki().getDocument(fullName, context); Object sdoc = context.get(XWikiDocument.CKEY_SDOC); context.put(XWikiDocument.CKEY_SDOC, groovyDocument); try { return parseGroovyFromString(groovyDocument.getContent(), context); } finally { context.put(XWikiDocument.CKEY_SDOC, sdoc); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseGroovyFromPage 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
parseGroovyFromPage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private boolean isFilsSha384Supported() { return (getSupportedFeatures() & WIFI_FEATURE_FILS_SHA384) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFilsSha384Supported 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
isFilsSha384Supported
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
protected void processFile() throws Exception { processFile(QUARTZ_XML_DEFAULT_FILE_NAME); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processFile File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
processFile
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
public Long getUpdateUserId() { return updateUserId; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-7171 - Severity: LOW - CVSS Score: 3.3 Description: fix(novel-admin): 友情链接URL格式校验 Function: getUpdateUserId File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java Repository: 201206030/novel-plus Fixed Code: public Long getUpdateUserId() { return updateUserId; }
[ "CWE-79" ]
CVE-2023-7171
LOW
3.3
201206030/novel-plus
getUpdateUserId
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
d6093d8182362422370d7eaf6c53afde9ee45215
1
Analyze the following code function for security vulnerabilities
private <T> T getComponent(Class<T> clazz) { List<T> list = Context.getRegisteredComponents(clazz); if (list == null || list.size() == 0) throw new RuntimeException("Cannot find component of " + clazz); return list.get(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getComponent File: api/src/main/java/org/openmrs/module/uiframework/UiFrameworkActivator.java Repository: openmrs/openmrs-module-uiframework The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-24621
MEDIUM
6.5
openmrs/openmrs-module-uiframework
getComponent
api/src/main/java/org/openmrs/module/uiframework/UiFrameworkActivator.java
0422fa52c7eba3d96cce2936cb92897dca4b680a
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RMQMessage other = (RMQMessage) obj; if (this.internalMessageID == null) { if (other.internalMessageID != null) return false; } else if (!this.internalMessageID.equals(other.internalMessageID)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
equals
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Deprecated @Override public Iterator<Map.Entry<String, String>> iterator() { return HeadersUtils.iteratorAsString(headers); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: iterator File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
iterator
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
private int readFromBuffer() { return applicationBuffer.get() & 0xff; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFromBuffer File: src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
readFromBuffer
src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public long getTopDocumentIddoc() { if (viewManager != null) { return viewManager.getTopStructElementIddoc(); } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTopDocumentIddoc 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
getTopDocumentIddoc
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 handleMessage(Message msg) { switch (msg.what) { case COLLECT_PSS_BG_MSG: { long start = SystemClock.uptimeMillis(); MemInfoReader memInfo = null; synchronized (ActivityManagerService.this) { if (mFullPssPending) { mFullPssPending = false; memInfo = new MemInfoReader(); } } if (memInfo != null) { updateCpuStatsNow(); long nativeTotalPss = 0; synchronized (mProcessCpuTracker) { final int N = mProcessCpuTracker.countStats(); for (int j=0; j<N; j++) { ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(j); if (st.vsize <= 0 || st.uid >= Process.FIRST_APPLICATION_UID) { // This is definitely an application process; skip it. continue; } synchronized (mPidsSelfLocked) { if (mPidsSelfLocked.indexOfKey(st.pid) >= 0) { // This is one of our own processes; skip it. continue; } } nativeTotalPss += Debug.getPss(st.pid, null, null); } } memInfo.readMemInfo(); synchronized (ActivityManagerService.this) { if (DEBUG_PSS) Slog.d(TAG_PSS, "Collected native and kernel memory in " + (SystemClock.uptimeMillis()-start) + "ms"); final long cachedKb = memInfo.getCachedSizeKb(); final long freeKb = memInfo.getFreeSizeKb(); final long zramKb = memInfo.getZramTotalSizeKb(); final long kernelKb = memInfo.getKernelUsedSizeKb(); EventLogTags.writeAmMeminfo(cachedKb*1024, freeKb*1024, zramKb*1024, kernelKb*1024, nativeTotalPss*1024); mProcessStats.addSysMemUsageLocked(cachedKb, freeKb, zramKb, kernelKb, nativeTotalPss); } } int num = 0; long[] tmp = new long[1]; do { ProcessRecord proc; int procState; int pid; long lastPssTime; synchronized (ActivityManagerService.this) { if (mPendingPssProcesses.size() <= 0) { if (mTestPssMode || DEBUG_PSS) Slog.d(TAG_PSS, "Collected PSS of " + num + " processes in " + (SystemClock.uptimeMillis() - start) + "ms"); mPendingPssProcesses.clear(); return; } proc = mPendingPssProcesses.remove(0); procState = proc.pssProcState; lastPssTime = proc.lastPssTime; if (proc.thread != null && procState == proc.setProcState && (lastPssTime+ProcessList.PSS_SAFE_TIME_FROM_STATE_CHANGE) < SystemClock.uptimeMillis()) { pid = proc.pid; } else { proc = null; pid = 0; } } if (proc != null) { long pss = Debug.getPss(pid, tmp, null); synchronized (ActivityManagerService.this) { if (pss != 0 && proc.thread != null && proc.setProcState == procState && proc.pid == pid && proc.lastPssTime == lastPssTime) { num++; recordPssSampleLocked(proc, procState, pss, tmp[0], SystemClock.uptimeMillis()); } } } } while (true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleMessage 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
handleMessage
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
public static @StrongAuthFlags int getDefaultFlags(Context context) { boolean strongAuthRequired = context.getResources().getBoolean( com.android.internal.R.bool.config_strongAuthRequiredOnBoot); return strongAuthRequired ? STRONG_AUTH_REQUIRED_AFTER_BOOT : STRONG_AUTH_NOT_REQUIRED; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultFlags File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
getDefaultFlags
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public List<String> getShellCommandLine( String... arguments ) { List<String> commandLine = new ArrayList<String>(); if ( getShellCommand() != null ) { commandLine.add( getShellCommand() ); } if ( getShellArgs() != null ) { commandLine.addAll( getShellArgsList() ); } commandLine.addAll( getCommandLine( getExecutable(), arguments ) ); return commandLine; }
Vulnerability Classification: - CWE: CWE-116 - CVE: CVE-2022-29599 - Severity: HIGH - CVSS Score: 7.5 Description: [MSHARED-297] - BourneShell unconditionally single quotes executable and arguments Function: getShellCommandLine File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java Repository: apache/maven-shared-utils Fixed Code: public List<String> getShellCommandLine( String... arguments ) { List<String> commandLine = new ArrayList<String>(); if ( getShellCommand() != null ) { commandLine.add( getShellCommand() ); } if ( getShellArgs() != null ) { commandLine.addAll( getShellArgsList() ); } commandLine.addAll( getCommandLine( executable, arguments ) ); return commandLine; }
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
getShellCommandLine
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
2735facbbbc2e13546328cb02dbb401b3776eea3
1
Analyze the following code function for security vulnerabilities
void goingToSleepLocked() { scheduleSleepTimeout(); if (!mGoingToSleep.isHeld()) { mGoingToSleep.acquire(); if (mLaunchingActivity.isHeld()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivity.release(); mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG); } } checkReadyForSleepLocked(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: goingToSleepLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
goingToSleepLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
private ActiveRecordPlugin getActiveRecordPlugin(IDataSourceProvider dataSourceProvider) { ActiveRecordPlugin arp = new ActiveRecordPlugin("c3p0Plugin" + new Random().nextInt(), dataSourceProvider); arp.addMapping(User.TABLE_NAME, "userId", User.class); arp.addMapping(Log.TABLE_NAME, "logId", Log.class); arp.addMapping(Type.TABLE_NAME, "typeId", Type.class); arp.addMapping(Link.TABLE_NAME, "linkId", Link.class); arp.addMapping(Comment.TABLE_NAME, "commentId", Comment.class); arp.addMapping(LogNav.TABLE_NAME, "navId", LogNav.class); arp.addMapping(WebSite.TABLE_NAME, "siteId", WebSite.class); arp.addMapping(Plugin.TABLE_NAME, "pluginId", Plugin.class); arp.addMapping(Tag.TABLE_NAME, "tagId", Tag.class); return arp; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveRecordPlugin File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
getActiveRecordPlugin
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
@NonNull private SearchSpec getSearchSpec() { return new SearchSpec.Builder() .addFilterSchemas(AppSearchShortcutInfo.SCHEMA_TYPE) .addFilterNamespaces(getPackageName()) .setTermMatch(SearchSpec.TERM_MATCH_EXACT_ONLY) .setResultCountPerPage(mShortcutUser.mService.getMaxActivityShortcuts()) .build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSearchSpec File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
getSearchSpec
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
@Override protected String getResourcePath() { return "/META-INF/resources/VAADIN/static/push"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourcePath File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java Repository: vaadin/osgi The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
getResourcePath
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
0
Analyze the following code function for security vulnerabilities
public static <T> T tryJavaDeserialize(byte[] bytes, byte[] ret, List<String> whitelist) { try (ObjectInputStream ois = new CheckedInputStream(new ByteArrayInputStream(ret), whitelist)) { return (T) ois.readObject(); } catch (CacheException ce) { throw ce; } catch (Exception ee) { if (log.isDebugEnabled()) log.debugf("Standard deserialization not in use for %s", Util.printArray(bytes)); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tryJavaDeserialize File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
tryJavaDeserialize
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java
efc44b7b0a5dd4f44773808840dd9785cabcf21c
0
Analyze the following code function for security vulnerabilities
public byte[] getSingleOctetStringValue(String attrOid) throws Pkcs7DecodingException { Asn1OpaqueObject value = getSingleValue(attrOid); if (value == null) { return null; } try { return Asn1BerParser.parse(value.getEncoded(), OctetStringChoice.class).value; } catch (Asn1DecodingException e) { throw new Pkcs7DecodingException("Failed to decode OBJECT IDENTIFIER", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSingleOctetStringValue File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
getSingleOctetStringValue
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity<?> entity) { Response response; if ("POST".equals(method)) { response = invocationBuilder.post(entity); } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { response = invocationBuilder.method("DELETE", entity); } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { response = invocationBuilder.method(method); } return response; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendRequest File: samples/openapi3/client/extensions/x-auth-id-alias/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
sendRequest
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private static boolean isLocalHost(String host) { try { var address = InetAddress.getByName(host); return address.isLoopbackAddress() || address.isAnyLocalAddress(); } catch (@SuppressWarnings("unused") UnknownHostException e) { return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLocalHost 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
isLocalHost
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
@Test public void createsCountQueryForJoins() throws Exception { assertCountQuery("select distinct new User(u.name) from User u left outer join u.roles r WHERE r = ?", "select count(distinct u) from User u left outer join u.roles r WHERE r = ?"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createsCountQueryForJoins File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
createsCountQueryForJoins
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public <T> ResponseEntity<T> get(Env env, String path, ParameterizedTypeReference<T> reference, Object... uriVariables) throws RestClientException { return exchangeGet(env, path, reference, uriVariables); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java Repository: apolloconfig/apollo The code follows secure coding practices.
[ "CWE-20" ]
CVE-2020-15170
MEDIUM
6.8
apolloconfig/apollo
get
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
0
Analyze the following code function for security vulnerabilities
public String getParamRedirect() { return m_paramRedirect; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParamRedirect 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
getParamRedirect
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
private static RemoteViews cloneIfLocalBinder(RemoteViews rv) { if (isLocalBinder() && rv != null) { return rv.clone(); } return rv; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cloneIfLocalBinder 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
cloneIfLocalBinder
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public static void putIntOrdered(long adddress, int newValue) { PlatformDependent0.putIntOrdered(adddress, newValue); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putIntOrdered File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
putIntOrdered
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Override public int getInterfaceVersion() { return ISupplicantStaNetworkCallback.VERSION; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInterfaceVersion File: service/java/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
getInterfaceVersion
service/java/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public void setStatusChangedTitle(String statusChangedTitle) { this.statusChangedTitle = statusChangedTitle; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStatusChangedTitle File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setStatusChangedTitle
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
@Override public void updatePersistentConfiguration(Configuration values) { enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION, "updateConfiguration()"); enforceWriteSettingsPermission("updateConfiguration()"); if (values == null) { throw new NullPointerException("Configuration must not be null"); } int userId = UserHandle.getCallingUserId(); synchronized(this) { final long origId = Binder.clearCallingIdentity(); updateConfigurationLocked(values, null, false, true, userId); Binder.restoreCallingIdentity(origId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePersistentConfiguration File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
updatePersistentConfiguration
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public static int shuffle(ByteBuffer input, BitShuffleType type, ByteBuffer shuffled) throws IOException { if (!input.isDirect()) { throw new SnappyError(SnappyErrorCode.NOT_A_DIRECT_BUFFER, "input is not a direct buffer"); } if (!shuffled.isDirect()) { throw new SnappyError(SnappyErrorCode.NOT_A_DIRECT_BUFFER, "destination is not a direct buffer"); } // input: input[pos(), limit()) // output: shuffled int uPos = input.position(); int uLen = input.remaining(); int typeSize = type.getTypeSize(); if (uLen % typeSize != 0) { throw new IllegalArgumentException("input length must be a multiple of the given type size: " + typeSize); } if (shuffled.remaining() < uLen) { throw new IllegalArgumentException("not enough space for output"); } int numProcessed = impl.shuffleDirectBuffer(input, uPos, typeSize, uLen, shuffled, shuffled.position()); assert(numProcessed == uLen); // pos limit // [ ......BBBBBBB.........] shuffled.limit(shuffled.position() + numProcessed); return numProcessed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shuffle File: src/main/java/org/xerial/snappy/BitShuffle.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-190" ]
CVE-2023-34453
HIGH
7.5
xerial/snappy-java
shuffle
src/main/java/org/xerial/snappy/BitShuffle.java
820e2e074c58748b41dbd547f4edba9e108ad905
0
Analyze the following code function for security vulnerabilities
@Override public FileOutputStream openStream() throws IOException { return new FileOutputStream(file, modes.contains(APPEND)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openStream File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
openStream
guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public void resetBuffer() { if (!isIncluding()) { if (isCommitted()) throw new IllegalStateException(Launcher.RESOURCES .getString("WinstoneResponse.ResponseCommitted")); // Disregard any output temporarily while we flush this.outputStream.setDisregardMode(true); if (this.outputWriter != null) { this.outputWriter.flush(); } this.outputStream.setDisregardMode(false); this.outputStream.reset(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetBuffer File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
resetBuffer
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
public void invokeZoomPicker() { mZoomControlsDelegate.invokeZoomPicker(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: invokeZoomPicker 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
invokeZoomPicker
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public ApiClient setHttpClient(Client httpClient) { this.httpClient = httpClient; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHttpClient File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setHttpClient
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static short getShort(long address) { return PlatformDependent0.getShort(address); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShort File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
getShort
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public boolean isSleepingOrShuttingDown() { return isSleeping() || mShuttingDown; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSleepingOrShuttingDown File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
isSleepingOrShuttingDown
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@RequestMapping(value = "/{appId}" + STATUS_URL + "/{referenceId:\\S+}.json", method = RequestMethod.GET) public final void getStatusSpecificAppId( @SuppressWarnings("unused") @PathVariable final String appId, @PathVariable final String referenceId, @RequestParam(value = "jsonp", defaultValue = "") final String jsonpCallback, final HttpServletRequest statusRequest, final HttpServletResponse statusResponse) { getStatus(referenceId, jsonpCallback, statusRequest, statusResponse); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2020-15231 - Severity: MEDIUM - CVSS Score: 4.3 Description: Remove JSONP support See: https://github.com/mapfish/mapfish-print/security/code-scanning/5?query=ref%3Arefs%2Fheads%2Fmaster Function: getStatusSpecificAppId File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java Repository: mapfish/mapfish-print Fixed Code: @RequestMapping(value = "/{appId}" + STATUS_URL + "/{referenceId:\\S+}.json", method = RequestMethod.GET) public final void getStatusSpecificAppId( @SuppressWarnings("unused") @PathVariable final String appId, @PathVariable final String referenceId, final HttpServletRequest statusRequest, final HttpServletResponse statusResponse) { getStatus(referenceId, statusRequest, statusResponse); }
[ "CWE-79" ]
CVE-2020-15231
MEDIUM
4.3
mapfish/mapfish-print
getStatusSpecificAppId
core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
89155f2506b9cee822e15ce60ccae390a1419d5e
1
Analyze the following code function for security vulnerabilities
protected SelectorList getSelectorList(final String selectors, final BrowserVersion browserVersion) throws IOException { final CSSOMParser parser = new CSSOMParser(new CSS3Parser()); final CheckErrorHandler errorHandler = new CheckErrorHandler(); parser.setErrorHandler(errorHandler); final SelectorList selectorList = parser.parseSelectors(selectors); // in case of error parseSelectors returns null if (errorHandler.errorDetected()) { throw new CSSException("Invalid selectors: " + selectors); } if (selectorList != null) { int documentMode = 9; if (browserVersion.hasFeature(QUERYSELECTORALL_NOT_IN_QUIRKS)) { final Object sobj = getPage().getScriptableObject(); if (sobj instanceof HTMLDocument) { documentMode = ((HTMLDocument) sobj).getDocumentMode(); } } CSSStyleSheet.validateSelectors(selectorList, documentMode, this); } return selectorList; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSelectorList 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
getSelectorList
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
@Override protected void onResume() { super.onResume(); AndroidImplementation.setActivity(this); AndroidNativeUtil.onResume(); if (isBillingEnabled() && getBillingSupport() != null) { billingSupport.consumeAndAcknowlegePurchases(); } background = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onResume File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
onResume
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void scrollTo(int xPix, int yPix) { if (mNativeContentViewCore == 0) return; final float xCurrentPix = mRenderCoordinates.getScrollXPix(); final float yCurrentPix = mRenderCoordinates.getScrollYPix(); final float dxPix = xPix - xCurrentPix; final float dyPix = yPix - yCurrentPix; if (dxPix != 0 || dyPix != 0) { long time = SystemClock.uptimeMillis(); // It's a very real (and valid) possibility that a fling may still // be active when programatically scrolling. Cancelling the fling in // such cases ensures a consistent gesture event stream. if (mPotentiallyActiveFlingCount > 0) nativeFlingCancel(mNativeContentViewCore, time); nativeScrollBegin(mNativeContentViewCore, time, xCurrentPix, yCurrentPix, -dxPix, -dyPix); nativeScrollBy(mNativeContentViewCore, time, xCurrentPix, yCurrentPix, dxPix, dyPix); nativeScrollEnd(mNativeContentViewCore, time); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scrollTo File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
scrollTo
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
@Override public boolean willBeRemoved() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: willBeRemoved File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
willBeRemoved
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 d(String data) { return cdata(data); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: d 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
d
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public void onCallFilteringCompleted(String callId, Connection.CallFilteringCompletionInfo completionInfo, Session.Info sessionInfo) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCallFilteringCompleted File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
onCallFilteringCompleted
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public static File createTempDir(int port) throws IOException { File tempDir = File.createTempFile("portofino.tomcat.", "." + port); tempDir.delete(); tempDir.mkdir(); tempDir.deleteOnExit(); return tempDir; }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2022-3952 - Severity: HIGH - CVSS Score: 7.1 Description: vuln-fix: Temporary Directory Hijacking or Information Disclosure This fixes either Temporary Directory Hijacking, or Temporary Directory Local Information Disclosure. Weakness: CWE-379: Creation of Temporary File in Directory with Insecure Permissions Severity: High CVSSS: 7.3 Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.UseFilesCreateTempDirectory) Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/10 Co-authored-by: Moderne <team@moderne.io> Function: createTempDir File: microservices/launcher/src/main/java/com/manydesigns/portofino/microservices/launcher/WarFileLauncher.java Repository: ManyDesigns/Portofino Fixed Code: public static File createTempDir(int port) throws IOException { File tempDir = Files.createTempDirectory("portofino.tomcat." + "." + port).toFile(); tempDir.deleteOnExit(); return tempDir; }
[ "CWE-668" ]
CVE-2022-3952
HIGH
7.1
ManyDesigns/Portofino
createTempDir
microservices/launcher/src/main/java/com/manydesigns/portofino/microservices/launcher/WarFileLauncher.java
94653cb357806c9cf24d8d294e6afea33f8f0775
1
Analyze the following code function for security vulnerabilities
@Override public long getJMSTimestamp() throws JMSException { Object timestamp = this.getObjectProperty(JMS_MESSAGE_TIMESTAMP); if (timestamp == null) { return 0L; } else { return convertToLong(timestamp); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJMSTimestamp File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
getJMSTimestamp
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public abstract int getBottomPadding();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBottomPadding File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getBottomPadding
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0