instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public static void deleteWithErrMesg(File f) { deleteWithErrMesg(f, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteWithErrMesg File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.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
deleteWithErrMesg
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
private String getLinuxBrowser() throws Exception { if (linuxBrowser == null) { String browsers= configService.getString(LINUX_BROWSERS_PROP_NAME); if (browsers== null) { logger.error("Required property not set: " + LINUX_BROWSERS_PROP_NAME); return null; } Runtime runtime = Runtime.getRuntime(); for (String b : browsers.split(":")) { if (runtime.exec(new String[] { "which", b }).waitFor() == 0) { linuxBrowser = b; break; } } } return linuxBrowser; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLinuxBrowser File: modules/service/browserlauncher/src/main/java/net/java/sip/communicator/impl/browserlauncher/BrowserLauncherImpl.java Repository: jitsi The code follows secure coding practices.
[ "CWE-77" ]
CVE-2022-43550
CRITICAL
9.8
jitsi
getLinuxBrowser
modules/service/browserlauncher/src/main/java/net/java/sip/communicator/impl/browserlauncher/BrowserLauncherImpl.java
8aa7be58522f4264078d54752aae5483bfd854b2
0
Analyze the following code function for security vulnerabilities
private void writeInternal() { synchronized (mPackages) { synchronized (mFileLock) { AtomicFile file = getFile(); FileOutputStream f = null; try { f = file.startWrite(); BufferedOutputStream out = new BufferedOutputStream(f); FileUtils.setPermissions(file.getBaseFile().getPath(), 0640, SYSTEM_UID, PACKAGE_INFO_GID); StringBuilder sb = new StringBuilder(); for (PackageParser.Package pkg : mPackages.values()) { if (pkg.mLastPackageUsageTimeInMills == 0) { continue; } sb.setLength(0); sb.append(pkg.packageName); sb.append(' '); sb.append((long)pkg.mLastPackageUsageTimeInMills); sb.append('\n'); out.write(sb.toString().getBytes(StandardCharsets.US_ASCII)); } out.flush(); file.finishWrite(f); } catch (IOException e) { if (f != null) { file.failWrite(f); } Log.e(TAG, "Failed to write package usage times", e); } } } mLastWritten.set(SystemClock.elapsedRealtime()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeInternal File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
writeInternal
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void setRunning(boolean running) { mKeepRunning.set(running); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRunning File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
setRunning
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
private void onJobFinished(JobFinishedEvent event) { // Skip it if: // * the authenticator was not yet initialized // * we are using the standard authenticator // * the event is not related to an install or uninstall job if (this.authService == null || this.authService.getClass() == XWikiAuthServiceImpl.class || (!event.getJobType().equals(InstallJob.JOBTYPE) && !event.getJobType().equals(UninstallJob.JOBTYPE))) { return; } try { // Get the class corresponding to the configuration Class<? extends XWikiAuthService> authClass = getAuthServiceClass(); // If the class does not have the same reference anymore it means it's coming from a different classloader // which generally imply that it's coming from an extension which has been reloaded or upgraded // Both still need to have the same class name as otherwise it means the current class did not had anything // to with with the standard configuration (some authenticators register themself) if (this.authService.getClass() != authClass && this.authService.getClass().getName().equals(authClass.getName())) { setAuthService(authClass); } } catch (ClassNotFoundException e) { LOGGER.warn("Failed to get the class of the configured authenticator ({}), keeping current authenticator.", ExceptionUtils.getRootCauseMessage(e)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onJobFinished 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-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
onJobFinished
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
0
Analyze the following code function for security vulnerabilities
private void appendDropBoxProcessHeaders(ProcessRecord process, String processName, StringBuilder sb) { // Watchdog thread ends up invoking this function (with // a null ProcessRecord) to add the stack file to dropbox. // Do not acquire a lock on this (am) in such cases, as it // could cause a potential deadlock, if and when watchdog // is invoked due to unavailability of lock on am and it // would prevent watchdog from killing system_server. if (process == null) { sb.append("Process: ").append(processName).append("\n"); return; } // Note: ProcessRecord 'process' is guarded by the service // instance. (notably process.pkgList, which could otherwise change // concurrently during execution of this method) synchronized (this) { sb.append("Process: ").append(processName).append("\n"); sb.append("PID: ").append(process.pid).append("\n"); int flags = process.info.flags; IPackageManager pm = AppGlobals.getPackageManager(); sb.append("Flags: 0x").append(Integer.toHexString(flags)).append("\n"); for (int ip=0; ip<process.pkgList.size(); ip++) { String pkg = process.pkgList.keyAt(ip); sb.append("Package: ").append(pkg); try { PackageInfo pi = pm.getPackageInfo(pkg, 0, UserHandle.getCallingUserId()); if (pi != null) { sb.append(" v").append(pi.getLongVersionCode()); if (pi.versionName != null) { sb.append(" (").append(pi.versionName).append(")"); } } } catch (RemoteException e) { Slog.e(TAG, "Error getting package info: " + pkg, e); } sb.append("\n"); } if (process.info.isInstantApp()) { sb.append("Instant-App: true\n"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendDropBoxProcessHeaders 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
appendDropBoxProcessHeaders
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public boolean isUninstallBlocked(String packageName) { // This function should return true if and only if the package is blocked by // setUninstallBlocked(). It should still return false for other cases of blocks, such as // when the package is a system app, or when it is an active device admin. final int userId = UserHandle.getCallingUserId(); synchronized (getLockObject()) { try { return mIPackageManager.getBlockUninstallForUser(packageName, userId); } catch (RemoteException re) { // Shouldn't happen. Slogf.e(LOG_TAG, "Failed to getBlockUninstallForUser", re); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUninstallBlocked 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
isUninstallBlocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void inserirResponsavel(Responsavel responsavel) throws Exception{ ResultSet result = this.bancoConec.execConsulta("Select * from ACI_Responsavel where Email='" +responsavel.getEmail()+"'"); if(result.first()){ throw new Exception("Responsavel com esse email já existente"); } result.close(); String comSQL = "insert into ACI_Responsavel values('"+ responsavel.getEmail()+"','"+responsavel.getNome()+ "','"+ responsavel.getTelefone()+"','"+responsavel.getEndereco() + "')"; this.bancoConec.execComando(comSQL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inserirResponsavel File: Escola Eclipse/Escola/src/banco_de_dados/dao/Responsaveis.java Repository: marinaguimaraes/ACI_Escola The code follows secure coding practices.
[ "CWE-89" ]
CVE-2015-10037
MEDIUM
5.2
marinaguimaraes/ACI_Escola
inserirResponsavel
Escola Eclipse/Escola/src/banco_de_dados/dao/Responsaveis.java
34eed1f7b9295d1424912f79989d8aba5de41e9f
0
Analyze the following code function for security vulnerabilities
public void setOverrideApnsEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setOverrideApnEnabled"); if (mService != null) { try { mService.setOverrideApnsEnabled(admin, enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOverrideApnsEnabled File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setOverrideApnsEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
String getHmacSha1(String data, byte[] key) { SecretKeySpec signingKey = new SecretKeySpec(key, HMAC_SHA1_ALGORITHM); Mac mac = null; try { mac = Mac.getInstance(HMAC_SHA1_ALGORITHM); mac.init(signingKey); } catch(NoSuchAlgorithmException e) { throw new OpenIdException(e); } catch(InvalidKeyException e) { throw new OpenIdException(e); } try { byte[] rawHmac = mac.doFinal(data.getBytes("UTF-8")); return Base64.encodeBytes(rawHmac); } catch(IllegalStateException e) { throw new OpenIdException(e); } catch(UnsupportedEncodingException e) { throw new OpenIdException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHmacSha1 File: JOpenId/src/org/expressme/openid/OpenIdManager.java Repository: michaelliao/jopenid The code follows secure coding practices.
[ "CWE-208" ]
CVE-2010-10006
LOW
1.4
michaelliao/jopenid
getHmacSha1
JOpenId/src/org/expressme/openid/OpenIdManager.java
c9baaa976b684637f0d5a50268e91846a7a719ab
0
Analyze the following code function for security vulnerabilities
public void unstableProviderDied(IBinder connection) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(connection); mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unstableProviderDied File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
unstableProviderDied
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private List<String> makeCommands(ApplicationConfiguration config, File webpack, File webpackConfig, String nodeExec) { List<String> command = new ArrayList<>(); command.add(nodeExec); command.add(webpack.getAbsolutePath()); command.add("--config"); command.add(webpackConfig.getAbsolutePath()); command.add("--port"); command.add(String.valueOf(port)); command.add("--env"); command.add("watchDogPort=" + watchDog.get().getWatchDogPort()); command.addAll(Arrays.asList(config .getStringProperty(SERVLET_PARAMETER_DEVMODE_WEBPACK_OPTIONS, "-d --inline=false") .split(" +"))); return command; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeCommands File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-172" ]
CVE-2021-33604
LOW
1.2
vaadin/flow
makeCommands
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") private boolean maybePrunePersistedUriGrantsLocked(int uid) { final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(uid); if (perms == null) return false; if (perms.size() < MAX_PERSISTED_URI_GRANTS) return false; final ArrayList<UriPermission> persisted = Lists.newArrayList(); for (UriPermission perm : perms.values()) { if (perm.persistedModeFlags != 0) { persisted.add(perm); } } final int trimCount = persisted.size() - MAX_PERSISTED_URI_GRANTS; if (trimCount <= 0) return false; Collections.sort(persisted, new UriPermission.PersistedTimeComparator()); for (int i = 0; i < trimCount; i++) { final UriPermission perm = persisted.get(i); if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "Trimming grant created at " + perm.persistedCreateTime); perm.releasePersistableModes(~0); removeUriPermissionIfNeededLocked(perm); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: maybePrunePersistedUriGrantsLocked 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
maybePrunePersistedUriGrantsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void addViewerPreference(PdfName key, PdfObject value) { this.viewerPreferences.addViewerPreference(key, value); setViewerPreferences(this.viewerPreferences); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addViewerPreference File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
addViewerPreference
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public HttpRequest query(final Map<String, String> queryMap) { for (final Map.Entry<String, String> entry : queryMap.entrySet()) { query.add(entry.getKey(), entry.getValue()); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: query File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
query
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
@Override public int getDisplayWidth() { if (this.myView != null) { int w = this.myView.getViewWidth(); displayWidth = w; return w; } return displayWidth; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDisplayWidth 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
getDisplayWidth
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public static String quote(String string, boolean escapeForwardSlashAlways) { if (string == null || string.length() == 0) { return "\"\""; } char c = 0; int i; int len = string.length(); StringBuilder sb = new StringBuilder(len + 4); String t; sb.append('"'); for (i = 0; i < len; i += 1) { c = string.charAt(i); switch (c) { case '\\': case '"': sb.append('\\'); sb.append(c); break; case '/': if (escapeForwardSlashAlways || i > 0 && string.charAt(i - 1) == '<') { sb.append('\\'); } sb.append(c); break; case '\b': sb.append("\\b"); break; case '\t': sb.append("\\t"); break; case '\n': sb.append("\\n"); break; case '\f': sb.append("\\f"); break; case '\r': sb.append("\\r"); break; case '\u2028': sb.append("\\u2028"); break; case '\u2029': sb.append("\\u2029"); break; default: if (c < ' ') { t = "000" + Integer.toHexString(c); sb.append("\\u" + t.substring(t.length() - 4)); } else { sb.append(c); } } } sb.append('"'); return sb.toString(); }
Vulnerability Classification: - CWE: CWE-674, CWE-787 - CVE: CVE-2022-45693 - Severity: HIGH - CVSS Score: 7.5 Description: Fixing StackOverflow error Function: quote File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison Fixed Code: public static String quote(String string, boolean escapeForwardSlashAlways) { if (string == null || string.length() == 0) { return "\"\""; } char c = 0; int i; int len = string.length(); StringBuilder sb = new StringBuilder(len + 4); String t; sb.append('"'); for (i = 0; i < len; i += 1) { c = string.charAt(i); switch (c) { case '\\': // Escape a backslash, but only if it isn't already escaped if (i == len - 1 || string.charAt(i + 1) != '\\') { sb.append('\\'); } sb.append(c); break; case '"': sb.append('\\'); sb.append(c); break; case '/': if (escapeForwardSlashAlways || i > 0 && string.charAt(i - 1) == '<') { sb.append('\\'); } sb.append(c); break; case '\b': sb.append("\\b"); break; case '\t': sb.append("\\t"); break; case '\n': sb.append("\\n"); break; case '\f': sb.append("\\f"); break; case '\r': sb.append("\\r"); break; case '\u2028': sb.append("\\u2028"); break; case '\u2029': sb.append("\\u2029"); break; default: if (c < ' ') { t = "000" + Integer.toHexString(c); sb.append("\\u" + t.substring(t.length() - 4)); } else { sb.append(c); } } } sb.append('"'); return sb.toString(); }
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
quote
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
1
Analyze the following code function for security vulnerabilities
@Override public void removeDynamicShortcuts(String packageName, List<String> shortcutIds, @UserIdInt int userId) { verifyCaller(packageName, userId); Objects.requireNonNull(shortcutIds, "shortcutIds must be provided"); List<ShortcutInfo> changedShortcuts = null; List<ShortcutInfo> removedShortcuts = null; final ShortcutPackage ps; synchronized (mLock) { throwIfUserLockedL(userId); ps = getPackageShortcutsForPublisherLocked(packageName, userId); ps.ensureImmutableShortcutsNotIncludedWithIds((List<String>) shortcutIds, /*ignoreInvisible=*/ true); for (int i = shortcutIds.size() - 1; i >= 0; i--) { final String id = Preconditions.checkStringNotEmpty( (String) shortcutIds.get(i)); if (!ps.isShortcutExistsAndVisibleToPublisher(id)) { continue; } ShortcutInfo removed = ps.deleteDynamicWithId(id, /*ignoreInvisible=*/ true, /*wasPushedOut*/ false); if (removed == null) { if (changedShortcuts == null) { changedShortcuts = new ArrayList<>(1); } changedShortcuts.add(ps.findShortcutById(id)); } else { if (removedShortcuts == null) { removedShortcuts = new ArrayList<>(1); } removedShortcuts.add(removed); } } // We may have removed dynamic shortcuts which may have left a gap, so adjust the ranks. ps.adjustRanks(); } packageShortcutsChanged(ps, changedShortcuts, removedShortcuts); verifyStates(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeDynamicShortcuts 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
removeDynamicShortcuts
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
private String extractLabel(JsonNode node) { if (node != null && node.has(LABEL)) { return node.get(LABEL).asText(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractLabel File: src/main/java/org/commonwl/view/cwl/CWLService.java Repository: common-workflow-language/cwlviewer The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-41110
HIGH
7.5
common-workflow-language/cwlviewer
extractLabel
src/main/java/org/commonwl/view/cwl/CWLService.java
f6066f09edb70033a2ce80200e9fa9e70a5c29de
0
Analyze the following code function for security vulnerabilities
public void moveTaskToTop(int taskId) { final long origId = Binder.clearCallingIdentity(); try { synchronized(mWindowMap) { Task task = mTaskIdToTask.get(taskId); if (task == null) { // Normal behavior, addAppToken will be called next and task will be created. return; } final TaskStack stack = task.mStack; final DisplayContent displayContent = task.getDisplayContent(); displayContent.moveStack(stack, true); if (displayContent.isDefaultDisplay) { final TaskStack homeStack = displayContent.getHomeStack(); if (homeStack != stack) { // When a non-home stack moves to the top, the home stack moves to the // bottom. displayContent.moveStack(homeStack, false); } } stack.moveTaskToTop(task); if (mAppTransition.isTransitionSet()) { task.setSendingToBottom(false); } moveStackWindowsLocked(displayContent); } } finally { Binder.restoreCallingIdentity(origId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveTaskToTop File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
moveTaskToTop
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public static WebForm sendParameterizedEmail(Map<String,Object> parameters, Set<String> spamValidation, Host host, User user) throws DotRuntimeException { // check for possible spam if(spamValidation != null) if (FormSpamFilter.isSpamRequest(parameters, spamValidation)) { throw new DotRuntimeException("Spam detected"); } //Variables initialization //Default parameters to be ignored when sending the email String ignoreString = ":formType:formName:to:from:subject:cc:bcc:html:dispatch:order:" + "prettyOrder:autoReplyTo:autoReplyFrom:autoReplyText:autoReplySubject:" + "ignore:emailTemplate:autoReplyTemplate:autoReplyHtml:chargeCreditCard:attachFiles:"; if(UtilMethods.isSet(getMapValue("ignore", parameters))) { ignoreString += getMapValue("ignore", parameters).toString().replace(",", ":") + ":"; } // Sort the forms' fields by the given order parameter String order = (String)getMapValue("order", parameters); Map<String, Object> orderedMap = new LinkedHashMap<String, Object>(); // Parameter prettyOrder is used to map // the pretty names of the variables used in the order field // E.G: order = firstName, lastName // prettyOrder = First Name, Last Name String prettyOrder = (String)getMapValue("prettyOrder", parameters); Map<String, String> prettyVariableNamesMap = new LinkedHashMap<String, String>(); // Parameter attachFiles is used to specify the file kind of fields you want to attach // to the mail is sent by this method // E.G: attachFiles = file1, file2, ... String attachFiles = (String)getMapValue("attachFiles", parameters); //Building the parameters maps from the order and pretty order parameters if (order != null) { String[] orderArr = order.split("[;,]"); String[] prettyOrderArr = prettyOrder!=null?prettyOrder.split("[;,]"):new String[0]; for (int i = 0; i < orderArr.length; i++) { String orderParam = orderArr[i].trim(); Object value = (getMapValue(orderParam, parameters) == null) ? null : getMapValue(orderParam, parameters); if(value != null) { //if pretty name is passed using it as a key value in the ordered map if (prettyOrderArr.length > i) prettyVariableNamesMap.put(orderArr[i].trim(), prettyOrderArr[i].trim()); else prettyVariableNamesMap.put(orderArr[i].trim(), orderArr[i].trim()); orderedMap.put(orderArr[i].trim(), value); } } } for (Entry<String, Object> param : parameters.entrySet()) { if(!orderedMap.containsKey(param.getKey())) { orderedMap.put(param.getKey(), param.getValue()); prettyVariableNamesMap.put(param.getKey(), param.getKey()); } } StringBuffer filesLinks = new StringBuffer(); // Saving the form in the database and the submitted file to the dotCMS String formType = getMapValue("formType", parameters) != null? (String)getMapValue("formType", parameters):(String)getMapValue("formName", parameters); WebForm formBean = saveFormBean(parameters, host, formType, ignoreString, filesLinks); // Setting up the email // Email variables - decrypting crypted email addresses String from = UtilMethods.replace((String)getMapValue("from", parameters), "spamx", ""); String to = UtilMethods.replace((String)getMapValue("to", parameters), "spamx", ""); String cc = UtilMethods.replace((String)getMapValue("cc", parameters), "spamx", ""); String bcc = UtilMethods.replace((String)getMapValue("bcc", parameters), "spamx", ""); String fromName = UtilMethods.replace((String)getMapValue("fromName", parameters), "spamx", ""); try { from = PublicEncryptionFactory.decryptString(from); } catch (Exception e) { } try { to = PublicEncryptionFactory.decryptString(to); } catch (Exception e) { } try { cc = PublicEncryptionFactory.decryptString(cc); } catch (Exception e) { } try { bcc = PublicEncryptionFactory.decryptString(bcc); } catch (Exception e) { } try { fromName = PublicEncryptionFactory.decryptString(fromName); } catch (Exception e) { } String subject = (String)getMapValue("subject", parameters); subject = (subject == null) ? "Mail from " + host.getHostname() + "" : subject; String emailFolder = (String)getMapValue("emailFolder", parameters); boolean html = getMapValue("html", parameters) != null?Parameter.getBooleanFromString((String)getMapValue("html", parameters)):true; String templatePath = (String) getMapValue("emailTemplate", parameters); // Building email message no template Map<String, String> emailBodies = null; try { emailBodies = buildEmail(templatePath, host, orderedMap, prettyVariableNamesMap, filesLinks.toString(), ignoreString, user); } catch (Exception e) { Logger.error(EmailFactory.class, "sendForm: Couldn't build the email body text.", e); throw new DotRuntimeException("sendForm: Couldn't build the email body text.", e); } // Saving email backup in a file try { String filePath = FileUtil.getRealPath(Config.getStringProperty("EMAIL_BACKUPS")); new File(filePath).mkdir(); File file = null; synchronized (emailTime) { emailTime = new Long(emailTime.longValue() + 1); if (UtilMethods.isSet(emailFolder)) { new File(filePath + File.separator + emailFolder).mkdir(); filePath = filePath + File.separator + emailFolder; } file = new File(filePath + File.separator + emailTime.toString() + ".html"); } if (file != null) { java.io.OutputStream os = new java.io.FileOutputStream(file); BufferedOutputStream bos = new BufferedOutputStream(os); if(emailBodies.get("emailHTMLBody") != null) bos.write(emailBodies.get("emailHTMLBody").getBytes()); else if(emailBodies.get("emailHTMLTableBody") != null) bos.write(emailBodies.get("emailHTMLTableBody").getBytes()); else bos.write(emailBodies.get("emailPlainTextBody").getBytes()); bos.flush(); bos.close(); os.close(); } } catch (Exception e) { Logger.warn(EmailFactory.class, "sendForm: Couldn't save the email backup in " + Config.getStringProperty("EMAIL_BACKUPS")); } // send the mail out; Mailer m = new Mailer(); m.setToEmail(to); m.setFromEmail(from); m.setFromName(fromName); m.setCc(cc); m.setBcc(bcc); m.setSubject(subject); if (html) { if(UtilMethods.isSet(emailBodies.get("emailHTMLBody"))) m.setHTMLBody(emailBodies.get("emailHTMLBody")); else m.setHTMLBody(emailBodies.get("emailHTMLTableBody")); } m.setTextBody(emailBodies.get("emailPlainTextBody")); //Attaching files requested to be attached to the email if(attachFiles != null) { attachFiles = "," + attachFiles.replaceAll("\\s", "") + ","; for(Entry<String, Object> entry : parameters.entrySet()) { if(entry.getValue() instanceof File && attachFiles.indexOf("," + entry.getKey() + ",") > -1) { File f = (File)entry.getValue(); m.addAttachment(f, entry.getKey() + "." + UtilMethods.getFileExtension(f.getName())); } } } if (m.sendMessage()) { // there is an auto reply, send it on if ((UtilMethods.isSet((String)getMapValue("autoReplyTemplate", parameters)) || UtilMethods.isSet((String)getMapValue("autoReplyText", parameters))) && UtilMethods.isSet((String)getMapValue("autoReplySubject", parameters)) && UtilMethods.isSet((String)getMapValue("autoReplyFrom", parameters))) { templatePath = (String) getMapValue("autoReplyTemplate", parameters); if(UtilMethods.isSet(templatePath)) { try { emailBodies = buildEmail(templatePath, host, orderedMap, prettyVariableNamesMap, filesLinks.toString(), ignoreString, user); } catch (Exception e) { Logger.error(EmailFactory.class, "sendForm: Couldn't build the auto reply email body text. Sending plain text.", e); } } m = new Mailer(); String autoReplyTo = (String)(getMapValue("autoReplyTo", parameters) == null?getMapValue("from", parameters):getMapValue("autoReplyTo", parameters)); m.setToEmail(UtilMethods.replace(autoReplyTo, "spamx", "")); m.setFromEmail(UtilMethods.replace((String)getMapValue("autoReplyFrom", parameters), "spamx", "")); m.setSubject((String)getMapValue("autoReplySubject", parameters)); String autoReplyText = (String)getMapValue("autoReplyText", parameters); boolean autoReplyHtml = getMapValue("autoReplyHtml", parameters) != null?Parameter.getBooleanFromString((String)getMapValue("autoReplyHtml", parameters)):html; if (autoReplyText != null) { if(autoReplyHtml) { m.setHTMLBody((String)getMapValue("autoReplyText", parameters)); } else { m.setTextBody((String)getMapValue("autoReplyText", parameters)); } } else { if (autoReplyHtml) { if(UtilMethods.isSet(emailBodies.get("emailHTMLBody"))) m.setHTMLBody(emailBodies.get("emailHTMLBody")); else m.setHTMLBody(emailBodies.get("emailHTMLTableBody")); } m.setTextBody(emailBodies.get("emailPlainTextBody")); } m.sendMessage(); } } else { if(formBean != null){ try { HibernateUtil.delete(formBean); } catch (DotHibernateException e) { Logger.error(EmailFactory.class, e.getMessage(), e); } } throw new DotRuntimeException("Unable to send the email"); } return formBean; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2016-4040 - Severity: MEDIUM - CVSS Score: 6.5 Description: fixes #8840 sort by sanitizing and email header injection Function: sendParameterizedEmail File: src/com/dotmarketing/factories/EmailFactory.java Repository: dotCMS/core Fixed Code: public static WebForm sendParameterizedEmail(Map<String,Object> parameters, Set<String> spamValidation, Host host, User user) throws DotRuntimeException { // check for possible spam if(spamValidation != null) if (FormSpamFilter.isSpamRequest(parameters, spamValidation)) { throw new DotRuntimeException("Spam detected"); } //Variables initialization //Default parameters to be ignored when sending the email String ignoreString = ":formType:formName:to:from:subject:cc:bcc:html:dispatch:order:" + "prettyOrder:autoReplyTo:autoReplyFrom:autoReplyText:autoReplySubject:" + "ignore:emailTemplate:autoReplyTemplate:autoReplyHtml:chargeCreditCard:attachFiles:"; if(UtilMethods.isSet(getMapValue("ignore", parameters))) { ignoreString += getMapValue("ignore", parameters).toString().replace(",", ":") + ":"; } // Sort the forms' fields by the given order parameter String order = (String)getMapValue("order", parameters); Map<String, Object> orderedMap = new LinkedHashMap<String, Object>(); // Parameter prettyOrder is used to map // the pretty names of the variables used in the order field // E.G: order = firstName, lastName // prettyOrder = First Name, Last Name String prettyOrder = (String)getMapValue("prettyOrder", parameters); Map<String, String> prettyVariableNamesMap = new LinkedHashMap<String, String>(); // Parameter attachFiles is used to specify the file kind of fields you want to attach // to the mail is sent by this method // E.G: attachFiles = file1, file2, ... String attachFiles = (String)getMapValue("attachFiles", parameters); //Building the parameters maps from the order and pretty order parameters if (order != null) { String[] orderArr = order.split("[;,]"); String[] prettyOrderArr = prettyOrder!=null?prettyOrder.split("[;,]"):new String[0]; for (int i = 0; i < orderArr.length; i++) { String orderParam = orderArr[i].trim(); Object value = (getMapValue(orderParam, parameters) == null) ? null : getMapValue(orderParam, parameters); if(value != null) { //if pretty name is passed using it as a key value in the ordered map if (prettyOrderArr.length > i) prettyVariableNamesMap.put(orderArr[i].trim(), prettyOrderArr[i].trim()); else prettyVariableNamesMap.put(orderArr[i].trim(), orderArr[i].trim()); orderedMap.put(orderArr[i].trim(), value); } } } for (Entry<String, Object> param : parameters.entrySet()) { if(!orderedMap.containsKey(param.getKey())) { orderedMap.put(param.getKey(), param.getValue()); prettyVariableNamesMap.put(param.getKey(), param.getKey()); } } StringBuffer filesLinks = new StringBuffer(); // Saving the form in the database and the submitted file to the dotCMS String formType = getMapValue("formType", parameters) != null? (String)getMapValue("formType", parameters):(String)getMapValue("formName", parameters); WebForm formBean = saveFormBean(parameters, host, formType, ignoreString, filesLinks); // Setting up the email // Email variables - decrypting crypted email addresses String from = UtilMethods.replace((String)getMapValue("from", parameters), "spamx", ""); String to = UtilMethods.replace((String)getMapValue("to", parameters), "spamx", ""); String cc = UtilMethods.replace((String)getMapValue("cc", parameters), "spamx", ""); String bcc = UtilMethods.replace((String)getMapValue("bcc", parameters), "spamx", ""); String fromName = UtilMethods.replace((String)getMapValue("fromName", parameters), "spamx", ""); try { from = PublicEncryptionFactory.decryptString(from); } catch (Exception e) { } try { to = PublicEncryptionFactory.decryptString(to); } catch (Exception e) { } try { cc = PublicEncryptionFactory.decryptString(cc); } catch (Exception e) { } try { bcc = PublicEncryptionFactory.decryptString(bcc); } catch (Exception e) { } try { fromName = PublicEncryptionFactory.decryptString(fromName); } catch (Exception e) { } String subject = (String)getMapValue("subject", parameters); subject = (subject == null) ? "Mail from " + host.getHostname() + "" : subject; // strip line breaks from headers from = from.replaceAll("\\s", " "); to = to.replaceAll("\\s", " "); cc = cc.replaceAll("\\s", " "); bcc = bcc.replaceAll("\\s", " "); fromName = fromName.replaceAll("\\s", " "); subject = subject.replaceAll("\\s", " "); String emailFolder = (String)getMapValue("emailFolder", parameters); boolean html = getMapValue("html", parameters) != null?Parameter.getBooleanFromString((String)getMapValue("html", parameters)):true; String templatePath = (String) getMapValue("emailTemplate", parameters); // Building email message no template Map<String, String> emailBodies = null; try { emailBodies = buildEmail(templatePath, host, orderedMap, prettyVariableNamesMap, filesLinks.toString(), ignoreString, user); } catch (Exception e) { Logger.error(EmailFactory.class, "sendForm: Couldn't build the email body text.", e); throw new DotRuntimeException("sendForm: Couldn't build the email body text.", e); } // Saving email backup in a file try { String filePath = FileUtil.getRealPath(Config.getStringProperty("EMAIL_BACKUPS")); new File(filePath).mkdir(); File file = null; synchronized (emailTime) { emailTime = new Long(emailTime.longValue() + 1); if (UtilMethods.isSet(emailFolder)) { new File(filePath + File.separator + emailFolder).mkdir(); filePath = filePath + File.separator + emailFolder; } file = new File(filePath + File.separator + emailTime.toString() + ".html"); } if (file != null) { java.io.OutputStream os = new java.io.FileOutputStream(file); BufferedOutputStream bos = new BufferedOutputStream(os); if(emailBodies.get("emailHTMLBody") != null) bos.write(emailBodies.get("emailHTMLBody").getBytes()); else if(emailBodies.get("emailHTMLTableBody") != null) bos.write(emailBodies.get("emailHTMLTableBody").getBytes()); else bos.write(emailBodies.get("emailPlainTextBody").getBytes()); bos.flush(); bos.close(); os.close(); } } catch (Exception e) { Logger.warn(EmailFactory.class, "sendForm: Couldn't save the email backup in " + Config.getStringProperty("EMAIL_BACKUPS")); } // send the mail out; Mailer m = new Mailer(); m.setToEmail(to); m.setFromEmail(from); m.setFromName(fromName); m.setCc(cc); m.setBcc(bcc); m.setSubject(subject); if (html) { if(UtilMethods.isSet(emailBodies.get("emailHTMLBody"))) m.setHTMLBody(emailBodies.get("emailHTMLBody")); else m.setHTMLBody(emailBodies.get("emailHTMLTableBody")); } m.setTextBody(emailBodies.get("emailPlainTextBody")); //Attaching files requested to be attached to the email if(attachFiles != null) { attachFiles = "," + attachFiles.replaceAll("\\s", "") + ","; for(Entry<String, Object> entry : parameters.entrySet()) { if(entry.getValue() instanceof File && attachFiles.indexOf("," + entry.getKey() + ",") > -1) { File f = (File)entry.getValue(); m.addAttachment(f, entry.getKey() + "." + UtilMethods.getFileExtension(f.getName())); } } } if (m.sendMessage()) { // there is an auto reply, send it on if ((UtilMethods.isSet((String)getMapValue("autoReplyTemplate", parameters)) || UtilMethods.isSet((String)getMapValue("autoReplyText", parameters))) && UtilMethods.isSet((String)getMapValue("autoReplySubject", parameters)) && UtilMethods.isSet((String)getMapValue("autoReplyFrom", parameters))) { templatePath = (String) getMapValue("autoReplyTemplate", parameters); if(UtilMethods.isSet(templatePath)) { try { emailBodies = buildEmail(templatePath, host, orderedMap, prettyVariableNamesMap, filesLinks.toString(), ignoreString, user); } catch (Exception e) { Logger.error(EmailFactory.class, "sendForm: Couldn't build the auto reply email body text. Sending plain text.", e); } } m = new Mailer(); String autoReplyTo = (String)(getMapValue("autoReplyTo", parameters) == null?getMapValue("from", parameters):getMapValue("autoReplyTo", parameters)); m.setToEmail(UtilMethods.replace(autoReplyTo, "spamx", "")); m.setFromEmail(UtilMethods.replace((String)getMapValue("autoReplyFrom", parameters), "spamx", "")); m.setSubject((String)getMapValue("autoReplySubject", parameters)); String autoReplyText = (String)getMapValue("autoReplyText", parameters); boolean autoReplyHtml = getMapValue("autoReplyHtml", parameters) != null?Parameter.getBooleanFromString((String)getMapValue("autoReplyHtml", parameters)):html; if (autoReplyText != null) { if(autoReplyHtml) { m.setHTMLBody((String)getMapValue("autoReplyText", parameters)); } else { m.setTextBody((String)getMapValue("autoReplyText", parameters)); } } else { if (autoReplyHtml) { if(UtilMethods.isSet(emailBodies.get("emailHTMLBody"))) m.setHTMLBody(emailBodies.get("emailHTMLBody")); else m.setHTMLBody(emailBodies.get("emailHTMLTableBody")); } m.setTextBody(emailBodies.get("emailPlainTextBody")); } m.sendMessage(); } } else { if(formBean != null){ try { HibernateUtil.delete(formBean); } catch (DotHibernateException e) { Logger.error(EmailFactory.class, e.getMessage(), e); } } throw new DotRuntimeException("Unable to send the email"); } return formBean; }
[ "CWE-89" ]
CVE-2016-4040
MEDIUM
6.5
dotCMS/core
sendParameterizedEmail
src/com/dotmarketing/factories/EmailFactory.java
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
1
Analyze the following code function for security vulnerabilities
private String getSkinFileInternal(String fileName, String skinId, boolean forceSkinAction, XWikiContext context) { try { if (skinId != null) { // Try only in the specified skin. Skin skin = getInternalSkinManager().getSkin(skinId); if (skin != null) { Resource<?> resource = skin.getLocalResource(fileName); if (resource != null) { return resource.getURL(forceSkinAction); } } } else { // Try in the current skin. Skin skin = getInternalSkinManager().getCurrentSkin(true); if (skin != null) { Resource<?> resource = skin.getResource(fileName); if (resource != null) { return resource.getURL(forceSkinAction); } } else { // Try in the current parent skin. Skin parentSkin = getInternalSkinManager().getCurrentParentSkin(true); if (parentSkin != null) { Resource<?> resource = parentSkin.getResource(fileName); if (resource != null) { return resource.getURL(forceSkinAction); } } } } // Look for a resource file. String resourceFilePath = "/resources/" + fileName; XWikiURLFactory urlFactory = context.getURLFactory(); if (resourceExists(resourceFilePath)) { URL url = urlFactory.createResourceURL(fileName, forceSkinAction, context, getResourceURLCacheParameters(resourceFilePath)); return urlFactory.getURL(url, context); } } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Exception while getting skin file [{}] from skin [{}]", fileName, skinId, e); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSkinFileInternal 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
getSkinFileInternal
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Deprecated public BaseObject addObjectFromRequest(String className, String prefix, int num, XWikiContext context) throws XWikiException { return addXObjectFromRequest(resolveClassReference(className), prefix, num, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObjectFromRequest 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
addObjectFromRequest
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public boolean onShowFileChooser(WebView mWebView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) { if (uploadMessage != null) { uploadMessage.onReceiveValue(null); uploadMessage = null; } uploadMessage = filePathCallback; Intent intent = fileChooserParams.createIntent(); try { AndroidNativeUtil.getActivity().startActivityForResult(intent, REQUEST_SELECT_FILE); } catch (ActivityNotFoundException e) { uploadMessage = null; Toast.makeText(getActivity().getApplicationContext(), "Cannot Open File Chooser", Toast.LENGTH_LONG).show(); return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onShowFileChooser 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
onShowFileChooser
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Deprecated public boolean getHintAvoidBackgroundClipping() { return (mFlags & FLAG_HINT_AVOID_BACKGROUND_CLIPPING) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHintAvoidBackgroundClipping File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getHintAvoidBackgroundClipping
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public void onStateChanged(boolean accessibilityEnabled, boolean touchExplorationEnabled) { mRightAffordanceView.setClickable(touchExplorationEnabled); mLeftAffordanceView.setClickable(touchExplorationEnabled); mRightAffordanceView.setFocusable(accessibilityEnabled); mLeftAffordanceView.setFocusable(accessibilityEnabled); mLockIcon.update(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onStateChanged File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onStateChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
int unsafeConvertIncomingUser(int userId) { return (userId == UserHandle.USER_CURRENT || userId == UserHandle.USER_CURRENT_OR_SELF) ? mCurrentUserId : userId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unsafeConvertIncomingUser 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
unsafeConvertIncomingUser
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private String getAnalysisName(String analysisName, String domainId) { String finalName = analysisName.replaceAll(timeWindowPattern.pattern(), ""); finalName = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(finalName), " "); if (domainId != null && finalName.startsWith(domainId) && (finalName.length() > domainId.length())) finalName = finalName.substring(domainId.length() + 1); return finalName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAnalysisName File: src/main/java/org/ohdsi/webapi/service/FeatureExtractionService.java Repository: OHDSI/WebAPI The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15563
HIGH
7.5
OHDSI/WebAPI
getAnalysisName
src/main/java/org/ohdsi/webapi/service/FeatureExtractionService.java
b3944074a1976c95d500239cbbf0741917ed75ca
0
Analyze the following code function for security vulnerabilities
private synchronized void doNotify() { if (!notified) { notified = true; notifyAll(); // NOSONAR } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doNotify File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-172" ]
CVE-2021-33604
LOW
1.2
vaadin/flow
doNotify
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
0
Analyze the following code function for security vulnerabilities
private void handleNewPackageInstalled(String packageName, int userHandle) { // If personal apps were suspended by the admin, suspend the newly installed one. if (!getUserData(userHandle).mAppsSuspended) { return; } final String[] packagesToSuspend = { packageName }; // Check if package is considered not suspendable? if (mInjector.getPackageManager(userHandle) .getUnsuspendablePackages(packagesToSuspend).length != 0) { Slogf.i(LOG_TAG, "Newly installed package is unsuspendable: " + packageName); return; } mInjector.getPackageManagerInternal() .setPackagesSuspendedByAdmin(userHandle, packagesToSuspend, true /*suspend*/); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleNewPackageInstalled 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
handleNewPackageInstalled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@PasswordComplexity @RequiresPermission(value = MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS, conditional = true) public int getRequiredPasswordComplexity() { if (mService == null) { return PASSWORD_COMPLEXITY_NONE; } try { return mService.getRequiredPasswordComplexity( mContext.getPackageName(), mParentInstance); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequiredPasswordComplexity File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getRequiredPasswordComplexity
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public boolean isSyncPending(Account account, String authority, ComponentName cname) { return isSyncPendingAsUser(account, authority, cname, UserHandle.getCallingUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSyncPending File: services/core/java/com/android/server/content/ContentService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2426
MEDIUM
4.3
android
isSyncPending
services/core/java/com/android/server/content/ContentService.java
63363af721650e426db5b0bdfb8b2d4fe36abdb0
0
Analyze the following code function for security vulnerabilities
@Binds ConversationIconManager bindConversationIconManager(IconManager iconManager);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindConversationIconManager File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
bindConversationIconManager
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
String getTenantId() { return tenantId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTenantId 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
getTenantId
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Override public void setTestCallDiagnosticService(String packageName) { try { Log.startSession("TSI.sTCDS"); enforceModifyPermission(); enforceShellOnly(Binder.getCallingUid(), "setTestCallDiagnosticService is for " + "shell use only."); synchronized (mLock) { long token = Binder.clearCallingIdentity(); try { CallDiagnosticServiceController controller = mCallsManager.getCallDiagnosticServiceController(); if (controller != null) { controller.setTestCallDiagnosticService(packageName); } } finally { Binder.restoreCallingIdentity(token); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTestCallDiagnosticService File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
setTestCallDiagnosticService
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public void warning(SAXParseException e) { sb.append("WARNING: "); sb.append(e.getMessage()); sb.append("\n"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: warning File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40315
HIGH
8
OpenNMS/opennms
warning
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
201301e067329ababa3c0671ded5c4c43347d4a8
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 xpathFind(String xpath, NamespaceContext nsContext) { try { Node foundNode = super.xpathFindImpl(xpath, nsContext); return new XMLBuilder2(foundNode, null); } catch (XPathExpressionException e) { throw wrapExceptionAsRuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: xpathFind 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
xpathFind
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public void joinInit() throws InterruptedException { initThread.join(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: joinInit File: core/src/main/java/hudson/WebAppMain.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-254" ]
CVE-2014-9634
MEDIUM
5
jenkinsci/jenkins
joinInit
core/src/main/java/hudson/WebAppMain.java
582128b9ac179a788d43c1478be8a5224dc19710
0
Analyze the following code function for security vulnerabilities
public List<IssuesDao> list(IssuesRequest request) { request.setOrders(ServiceUtils.getDefaultOrderByField(request.getOrders(), "create_time")); request.getOrders().forEach(order -> { if (StringUtils.isNotEmpty(order.getName()) && order.getName().startsWith("custom")) { request.setIsCustomSorted(true); request.setCustomFieldId(order.getName().replace("custom_", StringUtils.EMPTY)); order.setPrefix("cfi"); order.setName("value"); } }); ServiceUtils.setBaseQueryRequestCustomMultipleFields(request); List<IssuesDao> issues = extIssuesMapper.getIssues(request); Map<String, Set<String>> caseSetMap = getCaseSetMap(issues); Map<String, User> userMap = getUserMap(issues); Map<String, String> planMap = getPlanMap(issues); issues.forEach(item -> { User createUser = userMap.get(item.getCreator()); if (createUser != null) { item.setCreatorName(createUser.getName()); } String resourceName = planMap.get(item.getResourceId()); if (StringUtils.isNotBlank(resourceName)) { item.setResourceName(resourceName); } Set<String> caseIdSet = caseSetMap.get(item.getId()); if (caseIdSet == null) { caseIdSet = new HashSet<>(); } item.setCaseIds(new ArrayList<>(caseIdSet)); item.setCaseCount(caseIdSet.size()); }); buildCustomField(issues); //处理MD图片链接内容 handleJiraIssueMdUrl(request.getWorkspaceId(), request.getProjectId(), issues); return issues; }
Vulnerability Classification: - CWE: CWE-918 - CVE: CVE-2022-23544 - Severity: MEDIUM - CVSS Score: 6.1 Description: fix(测试跟踪): 缺陷平台请求转发添加白名单 Function: list File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere Fixed Code: public List<IssuesDao> list(IssuesRequest request) { request.setOrders(ServiceUtils.getDefaultOrderByField(request.getOrders(), "create_time")); request.getOrders().forEach(order -> { if (StringUtils.isNotEmpty(order.getName()) && order.getName().startsWith("custom")) { request.setIsCustomSorted(true); request.setCustomFieldId(order.getName().replace("custom_", StringUtils.EMPTY)); order.setPrefix("cfi"); order.setName("value"); } }); ServiceUtils.setBaseQueryRequestCustomMultipleFields(request); List<IssuesDao> issues = extIssuesMapper.getIssues(request); Map<String, Set<String>> caseSetMap = getCaseSetMap(issues); Map<String, User> userMap = getUserMap(issues); Map<String, String> planMap = getPlanMap(issues); issues.forEach(item -> { User createUser = userMap.get(item.getCreator()); if (createUser != null) { item.setCreatorName(createUser.getName()); } String resourceName = planMap.get(item.getResourceId()); if (StringUtils.isNotBlank(resourceName)) { item.setResourceName(resourceName); } Set<String> caseIdSet = caseSetMap.get(item.getId()); if (caseIdSet == null) { caseIdSet = new HashSet<>(); } item.setCaseIds(new ArrayList<>(caseIdSet)); item.setCaseCount(caseIdSet.size()); }); buildCustomField(issues); return issues; }
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
list
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
1
Analyze the following code function for security vulnerabilities
public void setViewsTabBar(ViewsTabBar viewsTabBar) { this.viewsTabBar = viewsTabBar; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setViewsTabBar File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
setViewsTabBar
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public CompletableFuture<BatchIterator<Row>> getIterator(TransactionContext txnCtx, CollectPhase collectPhase, CollectTask collectTask, boolean supportMoveToStart) { FileUriCollectPhase fileUriCollectPhase = (FileUriCollectPhase) collectPhase; InputFactory.Context<LineCollectorExpression<?>> ctx = inputFactory.ctxForRefs(txnCtx, FileLineReferenceResolver::getImplementation); ctx.add(collectPhase.toCollect()); List<String> fileUris = targetUriToStringList(txnCtx, nodeCtx, fileUriCollectPhase.targetUri()); FileReadingIterator fileReadingIterator = new FileReadingIterator( fileUris, fileUriCollectPhase.compression(), fileInputFactoryMap, fileUriCollectPhase.sharedStorage(), fileUriCollectPhase.nodeIds().size(), getReaderNumber(fileUriCollectPhase.nodeIds(), clusterService.state().nodes().getLocalNodeId()), fileUriCollectPhase.withClauseOptions(), threadPool.scheduler() ); CopyFromParserProperties parserProperties = fileUriCollectPhase.parserProperties(); LineProcessor lineProcessor = new LineProcessor( parserProperties.skipNumLines() > 0 ? new SkippingBatchIterator<>(fileReadingIterator, (int) parserProperties.skipNumLines()) : fileReadingIterator, ctx.topLevelInputs(), ctx.expressions(), fileUriCollectPhase.inputFormat(), parserProperties, fileUriCollectPhase.targetColumns() ); return CompletableFuture.completedFuture(lineProcessor); }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2024-24565 - Severity: MEDIUM - CVSS Score: 6.5 Description: Restrict `COPY FROM` using local files to superuser Fixing a security issue where any user could read/import content of any file on the host system, the CrateDB process user has read access to. Function: getIterator File: server/src/main/java/io/crate/execution/engine/collect/sources/FileCollectSource.java Repository: crate Fixed Code: @Override public CompletableFuture<BatchIterator<Row>> getIterator(TransactionContext txnCtx, CollectPhase collectPhase, CollectTask collectTask, boolean supportMoveToStart) { FileUriCollectPhase fileUriCollectPhase = (FileUriCollectPhase) collectPhase; InputFactory.Context<LineCollectorExpression<?>> ctx = inputFactory.ctxForRefs(txnCtx, FileLineReferenceResolver::getImplementation); ctx.add(collectPhase.toCollect()); Role user = requireNonNull(roles.findUser(txnCtx.sessionSettings().userName()), "User who invoked a statement must exist"); List<URI> fileUris = targetUriToStringList(txnCtx, nodeCtx, fileUriCollectPhase.targetUri()).stream() .map(s -> { var uri = FileReadingIterator.toURI(s); if (uri.getScheme().equals("file") && user.isSuperUser() == false) { throw new UnauthorizedException("Only a superuser can read from the local file system"); } return uri; }) .toList(); FileReadingIterator fileReadingIterator = new FileReadingIterator( fileUris, fileUriCollectPhase.compression(), fileInputFactoryMap, fileUriCollectPhase.sharedStorage(), fileUriCollectPhase.nodeIds().size(), getReaderNumber(fileUriCollectPhase.nodeIds(), clusterService.state().nodes().getLocalNodeId()), fileUriCollectPhase.withClauseOptions(), threadPool.scheduler() ); CopyFromParserProperties parserProperties = fileUriCollectPhase.parserProperties(); LineProcessor lineProcessor = new LineProcessor( parserProperties.skipNumLines() > 0 ? new SkippingBatchIterator<>(fileReadingIterator, (int) parserProperties.skipNumLines()) : fileReadingIterator, ctx.topLevelInputs(), ctx.expressions(), fileUriCollectPhase.inputFormat(), parserProperties, fileUriCollectPhase.targetColumns() ); return CompletableFuture.completedFuture(lineProcessor); }
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
getIterator
server/src/main/java/io/crate/execution/engine/collect/sources/FileCollectSource.java
4e857d675683095945dd524d6ba03e692c70ecd6
1
Analyze the following code function for security vulnerabilities
private WindowState findWindow(int hashCode) { if (hashCode == -1) { // TODO(multidisplay): Extend to multiple displays. return getFocusedWindow(); } synchronized (mWindowMap) { final int numDisplays = mDisplayContents.size(); for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList(); final int numWindows = windows.size(); for (int winNdx = 0; winNdx < numWindows; ++winNdx) { final WindowState w = windows.get(winNdx); if (System.identityHashCode(w) == hashCode) { return w; } } } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findWindow File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
findWindow
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public void startConfirmDeviceCredentialIntent(Intent intent, Bundle options) { mAtmInternal.startConfirmDeviceCredentialIntent(intent, options); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startConfirmDeviceCredentialIntent 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
startConfirmDeviceCredentialIntent
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
protected JsonDeserializer<?> _findCustomCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { for (Deserializers d : _factoryConfig.deserializers()) { JsonDeserializer<?> deser = d.findCollectionDeserializer(type, config, beanDesc, elementTypeDeserializer, elementDeserializer); if (deser != null) { return deser; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _findCustomCollectionDeserializer 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
_findCustomCollectionDeserializer
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
@Override protected Image generatePeerImage() { try { final Bitmap nativeBuffer = Bitmap.createBitmap( getWidth(), getHeight(), Bitmap.Config.ARGB_8888); Image image = new AndroidImplementation.NativeImage(nativeBuffer); getActivity().runOnUiThread(new Runnable() { @Override public void run() { try { Canvas canvas = new Canvas(nativeBuffer); web.draw(canvas); } catch(Throwable t) { t.printStackTrace(); } } }); return image; } catch(Throwable t) { t.printStackTrace(); return Image.createImage(5, 5); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generatePeerImage 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
generatePeerImage
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public boolean supportsLocalVoiceInteraction() throws RemoteException { return LocalServices.getService(VoiceInteractionManagerInternal.class) .supportsLocalVoiceInteraction(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: supportsLocalVoiceInteraction 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
supportsLocalVoiceInteraction
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private void fillA(TestContext context, PostgresClient client, String tenant, int i) { Async async = context.async(); String schema = PostgresClient.convertToPsqlStandard(tenant); execute(context, "INSERT INTO " + schema + ".a (i) VALUES (" + i + ") ON CONFLICT DO NOTHING;"); client.select("SELECT i FROM " + schema + ".a", context.asyncAssertSuccess(get -> { context.assertEquals(i, get.getResults().get(0).getInteger(0)); async.complete(); })); async.awaitSuccess(5000); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillA File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
fillA
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Override public void setMaximumTimeToLock(ComponentName who, long timeMs, boolean parent) { if (!mHasFeature) { return; } Objects.requireNonNull(who, "ComponentName is null"); final int userHandle = mInjector.userHandleGetCallingUserId(); synchronized (getLockObject()) { final ActiveAdmin ap = getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_FORCE_LOCK, parent); if (ap.maximumTimeToUnlock != timeMs) { ap.maximumTimeToUnlock = timeMs; saveSettingsLocked(userHandle); updateMaximumTimeToLockLocked(userHandle); } } if (SecurityLog.isLoggingEnabled()) { final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle; SecurityLog.writeEvent(SecurityLog.TAG_MAX_SCREEN_LOCK_TIMEOUT_SET, who.getPackageName(), userHandle, affectedUserId, timeMs); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMaximumTimeToLock 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
setMaximumTimeToLock
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public void setTransformOrtho(Object nativeGraphics, float left, float right, float bottom, float top, float near, float far) { CN1Matrix4f m = (CN1Matrix4f)nativeGraphics; m.setOrtho(left, right, bottom, top, near, far); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTransformOrtho 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
setTransformOrtho
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void setState(String state) { this.state = state; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setState 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
setState
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public void createConferenceFailed( PhoneAccountHandle connectionManagerPhoneAccount, String callId, ConnectionRequest request, boolean isIncoming, Session.Info sessionInfo) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createConferenceFailed 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
createConferenceFailed
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public static int getStatusCode(HttpURLConnection conn) { try { return conn.getResponseCode(); } catch (IOException e) { throw ErrorUtil .createCommandException("connection to the remote repository host failed: " + e.getMessage()); } }
Vulnerability Classification: - CWE: CWE-306 - CVE: CVE-2021-32700 - Severity: MEDIUM - CVSS Score: 5.8 Description: Fix central connection Function: getStatusCode File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java Repository: ballerina-platform/ballerina-lang Fixed Code: public static int getStatusCode(HttpsURLConnection conn) { try { return conn.getResponseCode(); } catch (IOException e) { throw ErrorUtil .createCommandException("connection to the remote repository host failed: " + e.getMessage()); } }
[ "CWE-306" ]
CVE-2021-32700
MEDIUM
5.8
ballerina-platform/ballerina-lang
getStatusCode
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
4609ffee1744ecd16aac09303b1783bf0a525816
1
Analyze the following code function for security vulnerabilities
public boolean isFeedbackEnabled() { return CONF.feedbackEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFeedbackEnabled File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
isFeedbackEnabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private static UserConfiguration getUserConfiguration() { return Utils.getComponent(UserConfiguration.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserConfiguration File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getUserConfiguration
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
protected @Nullable String transformResponse(String response, String transformation) { String transformedResponse; try { String[] parts = splitTransformationConfig(transformation); String transformationType = parts[0]; String transformationFunction = parts[1]; TransformationService transformationService = TransformationHelper.getTransformationService(bundleContext, transformationType); if (transformationService != null) { transformedResponse = transformationService.transform(transformationFunction, response); } else { transformedResponse = response; logger.warn("Couldn't transform response because transformationService of type '{}' is unavailable", transformationType); } } catch (TransformationException te) { logger.warn("An exception occurred while transforming '{}' with '{}' : '{}'", response, transformation, te.getMessage()); // in case of an error we return the response without any transformation transformedResponse = response; } logger.debug("Transformed response is '{}'", transformedResponse); return transformedResponse; }
Vulnerability Classification: - CWE: CWE-863 - CVE: CVE-2020-5242 - Severity: HIGH - CVSS Score: 9.3 Description: Merge pull request from GHSA-w698-693g-23hv * fix arbitrary code execution vulnerability Signed-off-by: Jan N. Klug <jan.n.klug@rub.de> * Update bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de> * address review comments Signed-off-by: Jan N. Klug <jan.n.klug@rub.de> Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de> Function: transformResponse File: bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java Repository: openhab/openhab-addons Fixed Code: protected @Nullable String transformResponse(String response, String transformation) { String transformedResponse; try { String[] parts = splitTransformationConfig(transformation); String transformationType = parts[0]; String transformationFunction = parts[1]; TransformationService transformationService = TransformationHelper .getTransformationService(bundleContext, transformationType); if (transformationService != null) { transformedResponse = transformationService.transform(transformationFunction, response); } else { transformedResponse = response; logger.warn("Couldn't transform response because transformationService of type '{}' is unavailable", transformationType); } } catch (TransformationException te) { logger.warn("An exception occurred while transforming '{}' with '{}' : '{}'", response, transformation, te.getMessage()); // in case of an error we return the response without any transformation transformedResponse = response; } logger.debug("Transformed response is '{}'", transformedResponse); return transformedResponse; }
[ "CWE-863" ]
CVE-2020-5242
HIGH
9.3
openhab/openhab-addons
transformResponse
bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
1
Analyze the following code function for security vulnerabilities
@Nullable public String getSynchronousMode() { return mSyncMode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSynchronousMode File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
getSynchronousMode
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public static ActionOnCreate valueOfAction(String action) { return BY_ACTION.get(action); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: valueOfAction File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2022-23617
MEDIUM
4
xwiki/xwiki-platform
valueOfAction
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
30c52b01559b8ef5ed1035dac7c34aaf805764d5
0
Analyze the following code function for security vulnerabilities
private void updateSpeedBumpIndex() { int speedBumpIndex = 0; int currentIndex = 0; final int N = mStackScroller.getChildCount(); for (int i = 0; i < N; i++) { View view = mStackScroller.getChildAt(i); if (view.getVisibility() == View.GONE || !(view instanceof ExpandableNotificationRow)) { continue; } ExpandableNotificationRow row = (ExpandableNotificationRow) view; currentIndex++; if (!mNotificationData.isAmbient(row.getStatusBarNotification().getKey())) { speedBumpIndex = currentIndex; } } boolean noAmbient = speedBumpIndex == N; mStackScroller.updateSpeedBumpIndex(speedBumpIndex, noAmbient); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateSpeedBumpIndex 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
updateSpeedBumpIndex
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static final String formatDateToUIString(final Date date) { if (date != null) { return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(date); } return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formatDateToUIString File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-0869
MEDIUM
6.1
OpenNMS/opennms
formatDateToUIString
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
66b4ba96a18b9952f25a350bbccc2a7e206238d1
0
Analyze the following code function for security vulnerabilities
@CriticalNative private static final native int nativeGetNamespace(long state);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetNamespace 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
nativeGetNamespace
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public @ColorInt int getErrorColor() { return mErrorColor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getErrorColor File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getErrorColor
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private ModelAndView addDutySchedules(HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession userSession = request.getSession(true); if (userSession != null) { //group.modifyGroup.jsp WebGroup group = (WebGroup) userSession.getAttribute("group.modifyGroup.jsp"); updateGroup(request, group); Vector<Object> newSchedule = new Vector<>(); int dutyAddCount = WebSecurityUtils.safeParseInt(request.getParameter("numSchedules")); for (int j = 0; j < dutyAddCount; j++) { // add 7 false boolean values for each day of the week for (int i = 0; i < 7; i++) { newSchedule.addElement(Boolean.FALSE); } // add two strings for the begin and end time newSchedule.addElement("0"); newSchedule.addElement("0"); group.addDutySchedule((new DutySchedule(newSchedule)).toString()); } userSession.setAttribute("group.modifyGroup.jsp", group); } return new ModelAndView("admin/userGroupView/groups/modifyGroup"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDutySchedules File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352", "CWE-79" ]
CVE-2021-25929
LOW
3.5
OpenNMS/opennms
addDutySchedules
opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c
0
Analyze the following code function for security vulnerabilities
@Override public void crashApplication(int uid, int initialPid, String packageName, String message) { if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES) != PackageManager.PERMISSION_GRANTED) { String msg = "Permission Denial: crashApplication() from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES; Slog.w(TAG, msg); throw new SecurityException(msg); } synchronized(this) { mAppErrors.scheduleAppCrashLocked(uid, initialPid, packageName, message); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: crashApplication 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
crashApplication
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public void setCaCertificateAlias(String alias) { setFieldValue(CA_CERT_KEY, alias, CA_CERT_PREFIX); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCaCertificateAlias File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
setCaCertificateAlias
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
81be4e3aac55305cbb5c9d523cf5c96c66604b39
0
Analyze the following code function for security vulnerabilities
@Override public void finishAndRemoveTask() { checkCaller(); synchronized (ActivityManagerService.this) { long origId = Binder.clearCallingIdentity(); try { // We remove the task from recents to preserve backwards if (!removeTaskByIdLocked(mTaskId, false, REMOVE_FROM_RECENTS)) { throw new IllegalArgumentException("Unable to find task ID " + mTaskId); } } finally { Binder.restoreCallingIdentity(origId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishAndRemoveTask 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
finishAndRemoveTask
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private void advancedNetworkConfigXmlGenerator(XmlGenerator gen, Config config) { AdvancedNetworkConfig netCfg = config.getAdvancedNetworkConfig(); if (!netCfg.isEnabled()) { return; } gen.open("advanced-network", "enabled", netCfg.isEnabled()); JoinConfig join = netCfg.getJoin(); gen.open("join"); autoDetectionConfigXmlGenerator(gen, join); multicastConfigXmlGenerator(gen, join); tcpIpConfigXmlGenerator(gen, join); aliasedDiscoveryConfigsGenerator(gen, aliasedDiscoveryConfigsFrom(join)); discoveryStrategyConfigXmlGenerator(gen, join.getDiscoveryConfig()); gen.close(); failureDetectorConfigXmlGenerator(gen, netCfg.getIcmpFailureDetectorConfig()); memberAddressProviderConfigXmlGenerator(gen, netCfg.getMemberAddressProviderConfig()); for (EndpointConfig endpointConfig : netCfg.getEndpointConfigs().values()) { endpointConfigXmlGenerator(gen, endpointConfig); } gen.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: advancedNetworkConfigXmlGenerator File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-522" ]
CVE-2023-33264
MEDIUM
4.3
hazelcast
advancedNetworkConfigXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
80a502d53cc48bf895711ab55f95e3a51e344ac1
0
Analyze the following code function for security vulnerabilities
private void resetFields() { localFileHeader = null; crc32.reset(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetFields File: src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
resetFields
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
public static int getTypeOfObject(Object obj) { if (obj == null) { return Cursor.FIELD_TYPE_NULL; } else if (obj instanceof byte[]) { return Cursor.FIELD_TYPE_BLOB; } else if (obj instanceof Float || obj instanceof Double) { return Cursor.FIELD_TYPE_FLOAT; } else if (obj instanceof Long || obj instanceof Integer || obj instanceof Short || obj instanceof Byte) { return Cursor.FIELD_TYPE_INTEGER; } else { return Cursor.FIELD_TYPE_STRING; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTypeOfObject File: src/com/android/providers/media/util/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-35683
MEDIUM
5.5
android
getTypeOfObject
src/com/android/providers/media/util/DatabaseUtils.java
23d156ed1bed6d2c2b325f0be540d0afca510c49
0
Analyze the following code function for security vulnerabilities
public static String renderNav(HttpServletRequest request, String activeNav) { try { return renderNav2(request, activeNav); } catch (Exception ex) { log.error("Error on `renderNav`", ex); return "<!-- ERROR : " + ThrowableUtils.getRootCause(ex).getLocalizedMessage() + " -->"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: renderNav File: src/main/java/com/rebuild/core/configuration/NavBuilder.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
renderNav
src/main/java/com/rebuild/core/configuration/NavBuilder.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
protected void visibilityChanged(boolean visible) { if (mVisible != visible) { mVisible = visible; if (!visible) { closeAndSaveGuts(true /* removeLeavebehind */, true /* force */, true /* removeControls */, -1 /* x */, -1 /* y */, true /* resetMenu */); } } updateVisibleToUser(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: visibilityChanged 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
visibilityChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
boolean moveFocusableActivityToTop(String reason) { if (!isFocusable()) { ProtoLog.d(WM_DEBUG_FOCUS, "moveFocusableActivityToTop: unfocusable " + "activity=%s", this); return false; } final Task rootTask = getRootTask(); if (rootTask == null) { Slog.w(TAG, "moveFocusableActivityToTop: invalid root task: activity=" + this + " task=" + task); return false; } if (mRootWindowContainer.getTopResumedActivity() == this && getDisplayContent().mFocusedApp == this) { ProtoLog.d(WM_DEBUG_FOCUS, "moveFocusableActivityToTop: already on top, " + "activity=%s", this); return !isState(RESUMED); } ProtoLog.d(WM_DEBUG_FOCUS, "moveFocusableActivityToTop: activity=%s", this); rootTask.moveToFront(reason, task); // Report top activity change to tracking services and WM if (mRootWindowContainer.getTopResumedActivity() == this) { mAtmService.setResumedActivityUncheckLocked(this, reason); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveFocusableActivityToTop File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
moveFocusableActivityToTop
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public <T> T getOption(Option<T> option) throws IOException { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOption 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
getOption
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
private boolean checkPolicyAccess(String pkg) { try { int uid = getContext().getPackageManager().getPackageUidAsUser( pkg, UserHandle.getCallingUserId()); if (PackageManager.PERMISSION_GRANTED == ActivityManager.checkComponentPermission( android.Manifest.permission.MANAGE_NOTIFICATIONS, uid, -1, true)) { return true; } } catch (NameNotFoundException e) { return false; } return checkPackagePolicyAccess(pkg) || mListeners.isComponentEnabledForPackage(pkg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPolicyAccess File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
checkPolicyAccess
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@CalledByNative private int getLocationInWindowY() { return mLocationInWindowY; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLocationInWindowY 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
getLocationInWindowY
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void checkBroadcastFromSystem(Intent intent, ProcessRecord callerApp, String callerPackage, int callingUid, boolean isProtectedBroadcast, List receivers) { if ((intent.getFlags() & Intent.FLAG_RECEIVER_FROM_SHELL) != 0) { // Don't yell about broadcasts sent via shell return; } final String action = intent.getAction(); if (isProtectedBroadcast || Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action) || Intent.ACTION_DISMISS_KEYBOARD_SHORTCUTS.equals(action) || Intent.ACTION_MEDIA_BUTTON.equals(action) || Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action) || Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS.equals(action) || Intent.ACTION_MASTER_CLEAR.equals(action) || Intent.ACTION_FACTORY_RESET.equals(action) || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) || TelephonyManager.ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE.equals(action) || SuggestionSpan.ACTION_SUGGESTION_PICKED.equals(action) || AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION.equals(action) || AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION.equals(action)) { // Broadcast is either protected, or it's a public action that // we've relaxed, so it's fine for system internals to send. return; } // This broadcast may be a problem... but there are often system components that // want to send an internal broadcast to themselves, which is annoying to have to // explicitly list each action as a protected broadcast, so we will check for that // one safe case and allow it: an explicit broadcast, only being received by something // that has protected itself. if (intent.getPackage() != null || intent.getComponent() != null) { if (receivers == null || receivers.size() == 0) { // Intent is explicit and there's no receivers. // This happens, e.g. , when a system component sends a broadcast to // its own runtime receiver, and there's no manifest receivers for it, // because this method is called twice for each broadcast, // for runtime receivers and manifest receivers and the later check would find // no receivers. return; } boolean allProtected = true; for (int i = receivers.size()-1; i >= 0; i--) { Object target = receivers.get(i); if (target instanceof ResolveInfo) { ResolveInfo ri = (ResolveInfo)target; if (ri.activityInfo.exported && ri.activityInfo.permission == null) { allProtected = false; break; } } else { BroadcastFilter bf = (BroadcastFilter)target; if (bf.requiredPermission == null) { allProtected = false; break; } } } if (allProtected) { // All safe! return; } } // The vast majority of broadcasts sent from system internals // should be protected to avoid security holes, so yell loudly // to ensure we examine these cases. if (callerApp != null) { Log.wtf(TAG, "Sending non-protected broadcast " + action + " from system " + callerApp.toShortString() + " pkg " + callerPackage, new Throwable()); } else { Log.wtf(TAG, "Sending non-protected broadcast " + action + " from system uid " + UserHandle.formatUid(callingUid) + " pkg " + callerPackage, new Throwable()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkBroadcastFromSystem 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
checkBroadcastFromSystem
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public static Class<?> getClassForElement(final String elementName) { if (elementName == null) return null; final Class<?> existing = m_elementClasses.get(elementName); if (existing != null) return existing; final ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false); scanner.addIncludeFilter(new AnnotationTypeFilter(XmlRootElement.class)); for (final BeanDefinition bd : scanner.findCandidateComponents("org.opennms")) { final String className = bd.getBeanClassName(); try { final Class<?> clazz = Class.forName(className); final XmlRootElement annotation = clazz.getAnnotation(XmlRootElement.class); if (annotation == null) { LOG.warn("Somehow found class {} but it has no @XmlRootElement annotation! Skipping.", className); continue; } if (elementName.equalsIgnoreCase(annotation.name())) { LOG.trace("Found class {} for element name {}", className, elementName); m_elementClasses.put(elementName, clazz); return clazz; } } catch (final ClassNotFoundException e) { LOG.warn("Unable to get class object from class name {}. Skipping.", className, e); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClassForElement File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-0871
MEDIUM
6.1
OpenNMS/opennms
getClassForElement
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
3c17231714e3d55809efc580a05734ed530f9ad4
0
Analyze the following code function for security vulnerabilities
public List<ProfileInput> getInputs() { return inputs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInputs File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getInputs
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private void checkRemoteInputOutside(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_OUTSIDE // touch outside the source bar && event.getX() == 0 && event.getY() == 0 // a touch outside both bars && mRemoteInputController.isRemoteInputActive()) { mRemoteInputController.closeRemoteInputs(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkRemoteInputOutside 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
checkRemoteInputOutside
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public boolean isNone() { return owner == null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isNone File: src/net/sourceforge/plantuml/version/LicenseInfo.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
isNone
src/net/sourceforge/plantuml/version/LicenseInfo.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public String[] getAlias() { return new String[] { "reddit", "reditnotifier" }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAlias File: src/main/java/de/presti/ree6/commands/impl/community/RedditNotifier.java Repository: Ree6-Applications/Ree6 The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-39302
MEDIUM
5.4
Ree6-Applications/Ree6
getAlias
src/main/java/de/presti/ree6/commands/impl/community/RedditNotifier.java
459b5bc24f0ea27e50031f563373926e94b9aa0a
0
Analyze the following code function for security vulnerabilities
public void setNodes(List<? extends Node> nodes) throws IOException { this.slaves = new NodeList(nodes); updateComputerList(); trimLabels(); save(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNodes File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
setNodes
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
protected BeanDefinitionBuilder createAndFillBeanBuilder(Node node, Class clazz, String propertyName, BeanDefinitionBuilder parent, String... exceptPropertyNames) { BeanDefinitionBuilder builder = createBeanBuilder(clazz); AbstractBeanDefinition beanDefinition = builder.getBeanDefinition(); fillValues(node, builder, exceptPropertyNames); parent.addPropertyValue(propertyName, beanDefinition); return builder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createAndFillBeanBuilder File: hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
createAndFillBeanBuilder
hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
private static String toLuceneDate(String dateString) { String format = "MM/dd/yyyy"; return toLuceneDateWithFormat(dateString, format); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toLuceneDate File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
toLuceneDate
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public boolean isExplicitNull() { return explicitNull; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isExplicitNull File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
isExplicitNull
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public static Policy getInstance() throws PolicyException { return getInstance(DEFAULT_POLICY_URI); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInstance File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
getInstance
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
protected Exception _creatorReturnedNullException() { if (_nullFromCreator == null) { _nullFromCreator = new NullPointerException("JSON Creator returned null"); } return _nullFromCreator; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _creatorReturnedNullException File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42004
HIGH
7.5
FasterXML/jackson-databind
_creatorReturnedNullException
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
063183589218fec19a9293ed2f17ec53ea80ba88
0
Analyze the following code function for security vulnerabilities
public abstract String urlForCommandLine();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: urlForCommandLine File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
urlForCommandLine
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
public boolean profileControl(String process, int userId, boolean start, ProfilerInfo profilerInfo, int profileType) throws RemoteException { try { synchronized (this) { // note: hijacking SET_ACTIVITY_WATCHER, but should be changed to // its own permission. if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER); } if (start && (profilerInfo == null || profilerInfo.profileFd == null)) { throw new IllegalArgumentException("null profile info or fd"); } ProcessRecord proc = null; if (process != null) { proc = findProcessLocked(process, userId, "profileControl"); } if (start && (proc == null || proc.thread == null)) { throw new IllegalArgumentException("Unknown process: " + process); } if (start) { stopProfilerLocked(null, 0); setProfileApp(proc.info, proc.processName, profilerInfo); mProfileProc = proc; mProfileType = profileType; ParcelFileDescriptor fd = profilerInfo.profileFd; try { fd = fd.dup(); } catch (IOException e) { fd = null; } profilerInfo.profileFd = fd; proc.thread.profilerControl(start, profilerInfo, profileType); fd = null; mProfileFd = null; } else { stopProfilerLocked(proc, profileType); if (profilerInfo != null && profilerInfo.profileFd != null) { try { profilerInfo.profileFd.close(); } catch (IOException e) { } } } return true; } } catch (RemoteException e) { throw new IllegalStateException("Process disappeared"); } finally { if (profilerInfo != null && profilerInfo.profileFd != null) { try { profilerInfo.profileFd.close(); } catch (IOException e) { } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: profileControl 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
profileControl
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override protected int getOutputSizeForUpdate(int inputLen) { return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOutputSizeForUpdate File: src/main/java/org/conscrypt/OpenSSLCipher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2461
HIGH
7.6
android
getOutputSizeForUpdate
src/main/java/org/conscrypt/OpenSSLCipher.java
1638945d4ed9403790962ec7abed1b7a232a9ff8
0
Analyze the following code function for security vulnerabilities
private String format(String input, int indent) { if (!formatted) { return input; } StreamResult xmlOutput = null; try { Source xmlInput = new StreamSource(new StringReader(input)); xmlOutput = new StreamResult(new StringWriter()); TransformerFactory transformerFactory = TransformerFactory.newInstance(); /* * Older versions of Xalan still use this method of setting indent values. * Attempt to make this work but don't completely fail if it's a problem. */ try { transformerFactory.setAttribute("indent-number", indent); } catch (IllegalArgumentException e) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Failed to set indent-number attribute; cause: " + e.getMessage()); } } Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); /* * Newer versions of Xalan will look for a fully-qualified output property in order to specify amount of * indentation to use. Attempt to make this work as well but again don't completely fail if it's a problem. */ try { transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", Integer.toString(indent)); } catch (IllegalArgumentException e) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Failed to set indent-amount property; cause: " + e.getMessage()); } } transformer.transform(xmlInput, xmlOutput); return xmlOutput.getWriter().toString(); } catch (Exception e) { LOGGER.warning(e); return input; } finally { if (xmlOutput != null) { closeResource(xmlOutput.getWriter()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: format File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
format
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); session.invalidate(); RequestDispatcher rd = request.getRequestDispatcher("adminlogin.jsp"); request.setAttribute("loggedOutMsg", "Log Out Successful"); rd.include(request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doGet File: src/com/bijay/onlinevotingsystem/controller/AdminLoginController.java Repository: bijaythapaa/OnlineVotingSystem The code follows secure coding practices.
[ "CWE-916" ]
CVE-2021-21253
MEDIUM
5
bijaythapaa/OnlineVotingSystem
doGet
src/com/bijay/onlinevotingsystem/controller/AdminLoginController.java
0181cb0272857696c8eb3e44fcf6cb014ff90f09
0
Analyze the following code function for security vulnerabilities
public static void removeChildren(Node e) { NodeList list = e.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node n = list.item(i); e.removeChild(n); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeChildren File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
removeChildren
src/edu/stanford/nlp/util/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings({ "unchecked", "rawtypes" }) private static int compareComparables(Object a, Object b) { return ((Comparator) Comparator .nullsLast(Comparator.naturalOrder())).compare(a, b); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareComparables File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
compareComparables
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private void insertRequestHeaders(SQLiteDatabase db, long downloadId, ContentValues values) { ContentValues rowValues = new ContentValues(); rowValues.put(Downloads.Impl.RequestHeaders.COLUMN_DOWNLOAD_ID, downloadId); for (Map.Entry<String, Object> entry : values.valueSet()) { String key = entry.getKey(); if (key.startsWith(Downloads.Impl.RequestHeaders.INSERT_KEY_PREFIX)) { String headerLine = entry.getValue().toString(); if (!headerLine.contains(":")) { throw new IllegalArgumentException("Invalid HTTP header line: " + headerLine); } String[] parts = headerLine.split(":", 2); rowValues.put(Downloads.Impl.RequestHeaders.COLUMN_HEADER, parts[0].trim()); rowValues.put(Downloads.Impl.RequestHeaders.COLUMN_VALUE, parts[1].trim()); db.insert(Downloads.Impl.RequestHeaders.HEADERS_DB_TABLE, null, rowValues); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insertRequestHeaders File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
insertRequestHeaders
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public boolean isSmResumptionPossible() { // There is no resumable stream available if (smSessionId == null) return false; final Long shutdownTimestamp = packetWriter.shutdownTimestamp; // Seems like we are already reconnected, report true if (shutdownTimestamp == null) { return true; } // See if resumption time is over long current = System.currentTimeMillis(); long maxResumptionMillies = ((long) getMaxSmResumptionTime()) * 1000; if (current > shutdownTimestamp + maxResumptionMillies) { // Stream resumption is *not* possible if the current timestamp is greater then the greatest timestamp where // resumption is possible return false; } else { return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSmResumptionPossible File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
isSmResumptionPossible
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void showDisambiguationPopup(Rect targetRect, Bitmap zoomedBitmap) { mPopupZoomer.setBitmap(zoomedBitmap); mPopupZoomer.show(targetRect); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showDisambiguationPopup 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
showDisambiguationPopup
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
private ResolveInfo chooseBestActivity(Intent intent, String resolvedType, int flags, List<ResolveInfo> query, int userId) { if (query != null) { final int N = query.size(); if (N == 1) { return query.get(0); } else if (N > 1) { final boolean debug = ((intent.getFlags() & Intent.FLAG_DEBUG_LOG_RESOLUTION) != 0); // If there is more than one activity with the same priority, // then let the user decide between them. ResolveInfo r0 = query.get(0); ResolveInfo r1 = query.get(1); if (DEBUG_INTENT_MATCHING || debug) { Slog.v(TAG, r0.activityInfo.name + "=" + r0.priority + " vs " + r1.activityInfo.name + "=" + r1.priority); } // If the first activity has a higher priority, or a different // default, then it is always desireable to pick it. if (r0.priority != r1.priority || r0.preferredOrder != r1.preferredOrder || r0.isDefault != r1.isDefault) { return query.get(0); } // If we have saved a preference for a preferred activity for // this Intent, use that. ResolveInfo ri = findPreferredActivity(intent, resolvedType, flags, query, r0.priority, true, false, debug, userId); if (ri != null) { return ri; } ri = new ResolveInfo(mResolveInfo); ri.activityInfo = new ActivityInfo(ri.activityInfo); ri.activityInfo.applicationInfo = new ApplicationInfo( ri.activityInfo.applicationInfo); if (userId != 0) { ri.activityInfo.applicationInfo.uid = UserHandle.getUid(userId, UserHandle.getAppId(ri.activityInfo.applicationInfo.uid)); } // Make sure that the resolver is displayable in car mode if (ri.activityInfo.metaData == null) ri.activityInfo.metaData = new Bundle(); ri.activityInfo.metaData.putBoolean(Intent.METADATA_DOCK_HOME, true); return ri; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: chooseBestActivity File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
chooseBestActivity
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public String getMessage() { return description.getExpressionString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMessage File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getMessage
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
@Override public Collection<String> getHeaderNames() { return this.response.getHeaderNames(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHeaderNames File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
getHeaderNames
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
public Shell getShell() { return shell; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShell File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getShell
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0