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 String getEatPrefix() { return this.eatPrefix; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEatPrefix File: src/main/java/emissary/pickup/WorkBundle.java Repository: NationalSecurityAgency/emissary The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-32634
MEDIUM
6.5
NationalSecurityAgency/emissary
getEatPrefix
src/main/java/emissary/pickup/WorkBundle.java
40260b1ec1f76cc92361702cc14fa1e4388e19d7
0
Analyze the following code function for security vulnerabilities
private void clearUserKeyProtection(int userId) throws RemoteException { addUserKeyAuth(userId, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearUserKeyProtection File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
clearUserKeyProtection
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@Override public void endProcessing() { try { super.endProcessing(); } catch (final LoggedException e) { throw e; } catch (final Throwable e) { throw ProcessException.wrap(e); } finally { // Return the parser factory to the pool if we have used one. if (poolItem != null && parserFactoryPool != null) { parserFactoryPool.returnObject(poolItem, usePool); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endProcessing File: stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java Repository: gchq/stroom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
endProcessing
stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
0
Analyze the following code function for security vulnerabilities
private boolean accessPlugin(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, InstantiationException { CloseResponseHandle handle = getContext(uri, request.getMethod(), request, true); try { if (handle.getT() != null && handle.getT().getEntity() != null) { response.setStatus(handle.getT().getStatusLine().getStatusCode()); //防止多次被Transfer-Encoding handle.getT().removeHeaders("Transfer-Encoding"); for (Header header : handle.getT().getAllHeaders()) { response.addHeader(header.getName(), header.getValue()); } //将插件服务的HTTP的body返回给调用者 byte[] bytes = IOUtil.getByteByInputStream(handle.getT().getEntity().getContent()); response.addHeader("Content-Length", Integer.valueOf(bytes.length).toString()); response.getOutputStream().write(bytes); response.getOutputStream().close(); return true; } else { return false; } } finally { handle.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: accessPlugin File: web/src/main/java/com/zrlog/web/handler/PluginHandler.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-19005
LOW
3.5
94fzb/zrlog
accessPlugin
web/src/main/java/com/zrlog/web/handler/PluginHandler.java
b2b4415e2e59b6f18b0a62b633e71c96d63c43ba
0
Analyze the following code function for security vulnerabilities
public boolean convertXmlFile(Path inputFile, Path outputFile) { try { boolean validated = true; QTI21Infos fileInfos = scanFile(inputFile); //inherit from test if needed if(fileInfos.getEditor() == null && infos.getEditor() != null) { fileInfos.setEditor(infos.getEditor()); fileInfos.setVersion(infos.getVersion()); } if(onyx38Family(fileInfos)) { validated = convertXmlFile(inputFile, outputFile, fileInfos.getType(), Onyx38ToQtiWorksHandler::new); } else if(onyxWebFamily(fileInfos)) { validated = convertXmlFile(inputFile, outputFile, fileInfos.getType(), xtw -> new OnyxToQtiWorksHandler(xtw, infos)); if(validated && fileInfos.getType() == InputType.assessmentItem) { //check templateVariables checkAssessmentItem(outputFile); } } else { Files.copy(inputFile, outputFile, StandardCopyOption.REPLACE_EXISTING); } return validated; } catch (IOException | FactoryConfigurationError e) { log.error("", e); return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertXmlFile File: src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
convertXmlFile
src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
public String[] getAPIds() { if (apIds == null) { apIds = new HashMap(); NetworkInfo[] aps = ((ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE)).getAllNetworkInfo(); for (int i = 0; i < aps.length; i++) { String apName = aps[i].getTypeName() + "_" + aps[i].getSubtypeName(); if (aps[i].getExtraInfo() != null) { apName += "_" + aps[i].getExtraInfo(); } apIds.put(apName, aps[i]); } } if (apIds.isEmpty()) { return null; } String[] ret = new String[apIds.size()]; Iterator iter = apIds.keySet().iterator(); for (int i = 0; iter.hasNext(); i++) { ret[i] = iter.next().toString(); } return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAPIds 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
getAPIds
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override protected boolean allowFilterResult( PackageParser.ActivityIntentInfo filter, List<ResolveInfo> dest) { ActivityInfo filterAi = filter.activity.info; for (int i=dest.size()-1; i>=0; i--) { ActivityInfo destAi = dest.get(i).activityInfo; if (destAi.name == filterAi.name && destAi.packageName == filterAi.packageName) { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: allowFilterResult 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
allowFilterResult
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public JSONArray toJSONArray(JSONArray names) throws JSONException { if (names == null || names.isEmpty()) { return null; } JSONArray ja = new JSONArray(); for (int i = 0; i < names.length(); i += 1) { ja.put(this.opt(names.getString(i))); } return ja; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toJSONArray File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
toJSONArray
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public User getUser(String username) { return this.xwiki.getUser(username, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUser File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getUser
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
@Override public void onChildrenChanged(Call call) { // parent-child relationship affects which call should be foreground, so do an update. updateCallsManagerState(); for (CallsManagerListener listener : mListeners) { listener.onIsConferencedChanged(call); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onChildrenChanged File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
onChildrenChanged
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
private static boolean isDcim(@NonNull File dir) { while (dir != null) { if (Objects.equals("DCIM", dir.getName())) { return true; } dir = dir.getParentFile(); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDcim File: src/com/android/providers/media/util/FileUtils.java Repository: android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35670
HIGH
7.8
android
isDcim
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
private void enforceIndividualAttestationSupportedIfRequested(int[] attestationUtilsFlags) { for (int attestationFlag : attestationUtilsFlags) { if (attestationFlag == USE_INDIVIDUAL_ATTESTATION && !mInjector.getPackageManager().hasSystemFeature( PackageManager.FEATURE_DEVICE_UNIQUE_ATTESTATION)) { throw new UnsupportedOperationException("Device Individual attestation is not " + "supported on this device."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceIndividualAttestationSupportedIfRequested 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
enforceIndividualAttestationSupportedIfRequested
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public List<FileAsset> fromContentlets(List<Contentlet> cons) { List<FileAsset> fas = new ArrayList<FileAsset>(); for (Contentlet con : cons) { fas.add(fromContentlet(con)); } return fas; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromContentlets File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-434" ]
CVE-2017-11466
HIGH
9
dotCMS/core
fromContentlets
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
ab2bb2e00b841d131b8734227f9106e3ac31bb99
0
Analyze the following code function for security vulnerabilities
protected boolean getWantClientAuth() { return want_client_auth; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWantClientAuth File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
getWantClientAuth
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
@Override public String encode(SessionData sessionData) { try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream)) { objectOutputStream.writeObject(sessionData); byte[] bytes = outputStream.toByteArray(); return Base64.getEncoder().encodeToString(bytes); } catch (IOException e) { throw new PippoRuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encode File: pippo-session-parent/pippo-session/src/main/java/ro/pippo/session/SerializationSessionDataTranscoder.java Repository: pippo-java/pippo The code follows secure coding practices.
[ "CWE-502" ]
CVE-2018-18628
HIGH
10
pippo-java/pippo
encode
pippo-session-parent/pippo-session/src/main/java/ro/pippo/session/SerializationSessionDataTranscoder.java
a82347d9d3358e98c89b48579d4285d807a57cc0
0
Analyze the following code function for security vulnerabilities
public Void call() { deserializers.put(java.sql.Timestamp.class, SqlDateDeserializer.instance_timestamp); deserializers.put(java.sql.Date.class, SqlDateDeserializer.instance); deserializers.put(java.sql.Time.class, TimeDeserializer.instance); deserializers.put(java.util.Date.class, DateCodec.instance); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: call File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
call
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
@Override public java.sql.@Nullable Date getDate( int i, java.util.@Nullable Calendar cal) throws SQLException { byte[] value = getRawValue(i); if (value == null) { return null; } if (cal == null) { cal = getDefaultCalendar(); } if (isBinary(i)) { int col = i - 1; int oid = fields[col].getOID(); TimeZone tz = cal.getTimeZone(); if (oid == Oid.DATE) { return getTimestampUtils().toDateBin(tz, value); } else if (oid == Oid.TIMESTAMP || oid == Oid.TIMESTAMPTZ) { // If backend provides just TIMESTAMP, we use "cal" timezone // If backend provides TIMESTAMPTZ, we ignore "cal" as we know true instant value Timestamp timestamp = castNonNull(getTimestamp(i, cal)); // Here we just truncate date to 00:00 in a given time zone return getTimestampUtils().convertToDate(timestamp.getTime(), tz); } else { throw new PSQLException( GT.tr("Cannot convert the column of type {0} to requested type {1}.", Oid.toString(oid), "date"), PSQLState.DATA_TYPE_MISMATCH); } } return getTimestampUtils().toDate(cal, castNonNull(getString(i))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDate File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getDate
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private void parseConnections(final List<Element> connections) throws GameParseException { final GameMap map = data.getMap(); for (final Element current : connections) { final Territory t1 = getTerritory(current, "t1", true); final Territory t2 = getTerritory(current, "t2", true); map.addConnection(t1, t2); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseConnections File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
parseConnections
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
@Override public String getContentType() { return "application/zip"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentType File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
getContentType
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return internal.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/net/sourceforge/plantuml/security/SURL.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
toString
src/net/sourceforge/plantuml/security/SURL.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public void removeItemClickListener(ItemClickListener listener) { removeListener(GridConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeItemClickListener 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
removeItemClickListener
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
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) || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action) || TelephonyIntents.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-863" ]
CVE-2018-9492
HIGH
7.2
android
checkBroadcastFromSystem
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Test public void selectStreamTrans(TestContext context) { postgresClient = createNumbers(context, 21, 22, 23); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.selectStream(trans, "SELECT i FROM numbers WHERE i IN (21, 23, 25) ORDER BY i", context.asyncAssertSuccess(select -> { intsAsString(select, context.asyncAssertSuccess(string -> { postgresClient.endTx(trans, context.asyncAssertSuccess()); context.assertEquals("21, 23", string); })); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectStreamTrans 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
selectStreamTrans
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void installShutdownHooks() { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { /* * Delete only the native dir created by this classloader (if * there is one). Other classloaders (parent, peers) will all * cleanup things they created */ nativeLibraryStorage.cleanupTemporaryFolder(); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: installShutdownHooks File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
installShutdownHooks
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M2") public void renameProperties(String className, Map<String, String> fieldsToRename) { renameProperties(resolveClassReference(className), fieldsToRename); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: renameProperties 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
renameProperties
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
@Override public String loadTextResource(final File file, final String encoding) { final ByteBuffer data = load(file); return data == null ? null : new String(data.array(), getCharset(encoding)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadTextResource File: src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java Repository: jlangch/venice The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-36007
LOW
3.3
jlangch/venice
loadTextResource
src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
c942c73136333bc493050910f171a48e6f575b23
0
Analyze the following code function for security vulnerabilities
public void setAvatarUrl(@Nullable String avatarUrl) { this.avatarUrl = avatarUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAvatarUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setAvatarUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
private void handleExtensions(final DeploymentInfo deploymentInfo, final ServletContextImpl servletContext) { Set<String> loadedExtensions = new HashSet<>(); for (ServletExtension extension : ServiceLoader.load(ServletExtension.class, deploymentInfo.getClassLoader())) { loadedExtensions.add(extension.getClass().getName()); extension.handleDeployment(deploymentInfo, servletContext); } if (ServletExtension.class.getClassLoader() != null && !ServletExtension.class.getClassLoader().equals(deploymentInfo.getClassLoader())) { for (ServletExtension extension : ServiceLoader.load(ServletExtension.class)) { // Note: If the CLs are different, but can the see the same extensions and extension might get loaded // and thus instantiated twice, but the handleDeployment() is executed only once. if (!loadedExtensions.contains(extension.getClass().getName())) { extension.handleDeployment(deploymentInfo, servletContext); } } } for (ServletExtension extension : ServletExtensionHolder.getServletExtensions()) { if (!loadedExtensions.contains(extension.getClass().getName())) { extension.handleDeployment(deploymentInfo, servletContext); } } for(ServletExtension extension : deploymentInfo.getServletExtensions()) { extension.handleDeployment(deploymentInfo, servletContext); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleExtensions File: servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
handleExtensions
servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
private String getOriginOrReferer(HttpServletRequest pReq) { String origin = pReq.getHeader("Origin"); if (origin == null) { origin = pReq.getHeader("Referer"); } return origin != null ? origin.replaceAll("[\\n\\r]*","") : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOriginOrReferer File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
getOriginOrReferer
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
private static SchemaFactory createSchemaFactoryInstance() throws SAXNotRecognizedException, SAXNotSupportedException { final SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); return factory; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSchemaFactoryInstance File: vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java Repository: vert-x3/vertx-web The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-12544
HIGH
7.5
vert-x3/vertx-web
createSchemaFactoryInstance
vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java
26db16c7b32e655b489d1a71605f9a785f788e41
0
Analyze the following code function for security vulnerabilities
private static void entryListenerConfigXmlGenerator(XmlGenerator gen, MapConfig m) { entryListenerConfigXmlGenerator(gen, m.getEntryListenerConfigs()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: entryListenerConfigXmlGenerator 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
entryListenerConfigXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
private @DpcType int getDpcType(CallerIdentity caller) { // Check the permissions of DPCs if (isDefaultDeviceOwner(caller)) { return DEFAULT_DEVICE_OWNER; } if (isFinancedDeviceOwner(caller)) { return FINANCED_DEVICE_OWNER; } if (isProfileOwner(caller)) { if (isProfileOwnerOfOrganizationOwnedDevice(caller)) { return PROFILE_OWNER_OF_ORGANIZATION_OWNED_DEVICE; } if (isManagedProfile(caller.getUserId())) { return PROFILE_OWNER; } if (isProfileOwnerOnUser0(caller)) { return PROFILE_OWNER_ON_USER_0; } if (isUserAffiliatedWithDevice(caller.getUserId())) { return AFFILIATED_PROFILE_OWNER_ON_USER; } return PROFILE_OWNER_ON_USER; } return NOT_A_DPC; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDpcType 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
getDpcType
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void onAccept(@NonNull String ssid) {}
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21242 - Severity: CRITICAL - CVSS Score: 9.8 Description: [TOFU] Validate full cert chains before displaying dialog When a full chain including a Root CA is provided by the server, perform a full validation of the chain before displaying the TOFU dialog. If validation passes: Display a TOFU dialog and ask the user if they trust this network. Saying yes means that the Root can be installed safely for that network. They might say no - this is possible if an attacker creates a full chain they control which results in a different SHA-256 (everything else looks correct). If they say no, we stop the connection. If validation fails: Display an error message saying that the validation failed, we stop the connection and won't display the TOFU dialog. Use server certificate pinning for servers that send only a leaf or a partial chain with no Root CA. Additionally: clean up the debug logs to reduce the noise and focus only on the important details. Bug: 277824547 Test: atest InsecureEapNetworkHandler Test: Connect to various Enterprise networks Negative test: Confirm verification fails for invalid chains (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b0ee00ddf38bb677876a6cffb876e6f511e2c139) Merged-In: I224c80e2787497634d3e68760122dac5f177585a Change-Id: I224c80e2787497634d3e68760122dac5f177585a Function: onAccept File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java Repository: android Fixed Code: public void onAccept(@NonNull String ssid, int networkId) {}
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
onAccept
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
72e903f258b5040b8f492cf18edd124b5a1ac770
1
Analyze the following code function for security vulnerabilities
public String getBaseUri() { return this.baseUri; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseUri File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
getBaseUri
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
public List<SyncInfo> getCurrentSyncs() { return getCurrentSyncsAsUser(UserHandle.getCallingUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentSyncs 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
getCurrentSyncs
services/core/java/com/android/server/content/ContentService.java
63363af721650e426db5b0bdfb8b2d4fe36abdb0
0
Analyze the following code function for security vulnerabilities
public String displayDocument(boolean restricted) throws XWikiException { return this.doc.displayDocument(restricted, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: displayDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
displayDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public boolean killPids(int[] pids, String reason, boolean secure) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killPids File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
killPids
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public int getUserSessionsCount(RealmModel realm, ClientModel clientModel, boolean offline) { String offlineStr = offlineToString(offline); Query query; StorageId clientStorageId = new StorageId(clientModel.getId()); if (clientStorageId.isLocal()) { query = em.createNamedQuery("findClientSessionsCountByClient"); query.setParameter("clientId", clientModel.getId()); } else { query = em.createNamedQuery("findClientSessionsCountByExternalClient"); query.setParameter("clientStorageProvider", clientStorageId.getProviderId()); query.setParameter("externalClientId", clientStorageId.getExternalId()); } // Note, that realm is unused here, since the clientModel id already determines the offline user-sessions bound to an owning realm. query.setParameter("offline", offlineStr); Number n = (Number) query.getSingleResult(); return n.intValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserSessionsCount File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java Repository: keycloak The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-6563
HIGH
7.7
keycloak
getUserSessionsCount
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
11eb952e1df7cbb95b1e2c101dfd4839a2375695
0
Analyze the following code function for security vulnerabilities
public void setRegistryLogins(List<RegistryLogin> registryLogins) { this.registryLogins = registryLogins; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRegistryLogins File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-610" ]
CVE-2022-39206
CRITICAL
9.9
theonedev/onedev
setRegistryLogins
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
0052047a5b5095ac6a6b4a73a522d0272fec3a22
0
Analyze the following code function for security vulnerabilities
@Override public Charset getDefaultCharset() { return Charset.defaultCharset(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultCharset 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
getDefaultCharset
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void sendPendingBroadcasts() { String[] packages; ArrayList<String>[] components; int numBroadcasts = 0, numUsers; int[] uids; synchronized (mPm.mLock) { final SparseArray<ArrayMap<String, ArrayList<String>>> userIdToPackagesToComponents = mPm.mPendingBroadcasts.copiedMap(); numUsers = userIdToPackagesToComponents.size(); for (int n = 0; n < numUsers; n++) { numBroadcasts += userIdToPackagesToComponents.valueAt(n).size(); } if (numBroadcasts == 0) { // Nothing to be done. Just return return; } packages = new String[numBroadcasts]; components = new ArrayList[numBroadcasts]; uids = new int[numBroadcasts]; int i = 0; // filling out the above arrays for (int n = 0; n < numUsers; n++) { final int packageUserId = userIdToPackagesToComponents.keyAt(n); final ArrayMap<String, ArrayList<String>> componentsToBroadcast = userIdToPackagesToComponents.valueAt(n); final int numComponents = CollectionUtils.size(componentsToBroadcast); for (int index = 0; index < numComponents; index++) { packages[i] = componentsToBroadcast.keyAt(index); components[i] = componentsToBroadcast.valueAt(index); final PackageSetting ps = mPm.mSettings.getPackageLPr(packages[i]); uids[i] = (ps != null) ? UserHandle.getUid(packageUserId, ps.getAppId()) : -1; i++; } } numBroadcasts = i; mPm.mPendingBroadcasts.clear(); } final Computer snapshot = mPm.snapshotComputer(); // Send broadcasts for (int i = 0; i < numBroadcasts; i++) { mPm.sendPackageChangedBroadcast(snapshot, packages[i], true /* dontKillApp */, components[i], uids[i], null /* reason */); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendPendingBroadcasts File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
sendPendingBroadcasts
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
public File certificate() { return certificate; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: certificate File: handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java Repository: netty The code follows secure coding practices.
[ "CWE-378", "CWE-379" ]
CVE-2021-21290
LOW
1.9
netty
certificate
handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java
c735357bf29d07856ad171c6611a2e1a0e0000ec
0
Analyze the following code function for security vulnerabilities
@Override boolean hasSizeCompatBounds() { return mSizeCompatBounds != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasSizeCompatBounds 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
hasSizeCompatBounds
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
void requestUpdateWallpaperIfNeeded() { for (int i = mChildren.size() - 1; i >= 0; i--) { final WindowState w = mChildren.get(i); w.requestUpdateWallpaperIfNeeded(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestUpdateWallpaperIfNeeded 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
requestUpdateWallpaperIfNeeded
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private boolean isAnotherAppExistsWithUpdatedName(ServiceProvider updatedApp, String tenantDomain) throws IdentityApplicationManagementException { ServiceProvider appWithUpdatedName = getServiceProvider(updatedApp.getApplicationName(), tenantDomain); return appWithUpdatedName != null && appWithUpdatedName.getApplicationID() != updatedApp.getApplicationID(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAnotherAppExistsWithUpdatedName File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
isAnotherAppExistsWithUpdatedName
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
public void addClassProperty(EntityReference reference, String propertyName, String propertyType) { gotoPage(reference, "propadd", "propname", propertyName, "proptype", propertyType); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addClassProperty File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
addClassProperty
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
@Pure public int getInt(String columnName) throws SQLException { return getInt(findColumn(columnName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInt File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getInt
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private void adminPermission(String target, HttpServletRequest request, HttpServletResponse response) throws IOException, InstantiationException { if (AdminTokenThreadLocal.getUser() != null) { accessPlugin(target.replace("/admin/plugins", ""), request, response); } else { response.sendRedirect(request.getContextPath() + "/admin/login?redirectFrom=" + request.getRequestURL() + (request.getQueryString() != null ? "?" + request.getQueryString() : "")); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adminPermission File: web/src/main/java/com/zrlog/web/handler/PluginHandler.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-19005
LOW
3.5
94fzb/zrlog
adminPermission
web/src/main/java/com/zrlog/web/handler/PluginHandler.java
b2b4415e2e59b6f18b0a62b633e71c96d63c43ba
0
Analyze the following code function for security vulnerabilities
@Override public void onGuildMemberJoin(@Nonnull GuildMemberJoinEvent event) { SQLResponse sqlResponse = Main.getInstance().getSqlConnector().getSqlWorker().getEntity(ChannelStats.class, "SELECT * FROM ChannelStats WHERE GID=?", event.getGuild().getId()); if (sqlResponse.isSuccess()) { ChannelStats channelStats = (ChannelStats) sqlResponse.getEntity(); if (channelStats.getMemberStatsChannelId() != null) { GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getMemberStatsChannelId()); if (guildChannel != null) { guildChannel.getManager().setName("Overall Members: " + event.getGuild().getMemberCount()).queue(); } } event.getGuild().loadMembers().onSuccess(members -> { if (channelStats.getRealMemberStatsChannelId() != null) { GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getRealMemberStatsChannelId()); if (guildChannel != null) { guildChannel.getManager().setName("Real Members: " + members.stream().filter(member -> !member.getUser().isBot()).count()).queue(); } } if (channelStats.getBotMemberStatsChannelId() != null) { GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getBotMemberStatsChannelId()); if (guildChannel != null) { guildChannel.getManager().setName("Bot Members: " + members.stream().filter(member -> member.getUser().isBot()).count()).queue(); } } }); } AutoRoleHandler.handleMemberJoin(event.getGuild(), event.getMember()); if (!Main.getInstance().getSqlConnector().getSqlWorker().isWelcomeSetup(event.getGuild().getId())) return; WebhookMessageBuilder wmb = new WebhookMessageBuilder(); wmb.setAvatarUrl(event.getJDA().getSelfUser().getAvatarUrl()); wmb.setUsername("Welcome!"); wmb.setContent((Main.getInstance().getSqlConnector().getSqlWorker().getMessage(event.getGuild().getId())).replace("%user_name%", event.getMember().getUser().getName()).replace("%user_mention%", event.getMember().getUser().getAsMention()).replace("%guild_name%", event.getGuild().getName())); WebhookUtil.sendWebhook(null, wmb.build(), Main.getInstance().getSqlConnector().getSqlWorker().getWelcomeWebhook(event.getGuild().getId()), false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onGuildMemberJoin File: src/main/java/de/presti/ree6/events/OtherEvents.java Repository: Ree6-Applications/Ree6 The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-39302
MEDIUM
5.4
Ree6-Applications/Ree6
onGuildMemberJoin
src/main/java/de/presti/ree6/events/OtherEvents.java
459b5bc24f0ea27e50031f563373926e94b9aa0a
0
Analyze the following code function for security vulnerabilities
protected PdfDictionary readXrefSection() throws IOException { tokens.nextValidToken(); if (!tokens.getStringValue().equals("xref")) tokens.throwError("xref subsection not found"); int start = 0; int end = 0; int pos = 0; int gen = 0; while (true) { tokens.nextValidToken(); if (tokens.getStringValue().equals("trailer")) break; if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) tokens.throwError("Object number of the first object in this xref subsection not found"); start = tokens.intValue(); tokens.nextValidToken(); if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) tokens.throwError("Number of entries in this xref subsection not found"); end = tokens.intValue() + start; if (start == 1) { // fix incorrect start number int back = tokens.getFilePointer(); tokens.nextValidToken(); pos = tokens.intValue(); tokens.nextValidToken(); gen = tokens.intValue(); if (pos == 0 && gen == PdfWriter.GENERATION_MAX) { --start; --end; } tokens.seek(back); } ensureXrefSize(end * 2); for (int k = start; k < end; ++k) { tokens.nextValidToken(); pos = tokens.intValue(); tokens.nextValidToken(); gen = tokens.intValue(); tokens.nextValidToken(); int p = k * 2; if (tokens.getStringValue().equals("n")) { if (xref[p] == 0 && xref[p + 1] == 0) { // if (pos == 0) // tokens.throwError("File position 0 cross-reference entry in this xref subsection"); xref[p] = pos; } } else if (tokens.getStringValue().equals("f")) { if (xref[p] == 0 && xref[p + 1] == 0) xref[p] = -1; } else tokens.throwError("Invalid cross-reference entry in this xref subsection"); } } PdfDictionary trailer = (PdfDictionary)readPRObject(); PdfNumber xrefSize = (PdfNumber)trailer.get(PdfName.SIZE); ensureXrefSize(xrefSize.intValue() * 2); PdfObject xrs = trailer.get(PdfName.XREFSTM); if (xrs != null && xrs.isNumber()) { int loc = ((PdfNumber)xrs).intValue(); try { readXRefStream(loc); newXrefType = true; hybridXref = true; } catch (IOException e) { xref = null; throw e; } } return trailer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readXrefSection 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
readXrefSection
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public void browserDestroy(PeerComponent browserPeer) { ((AndroidImplementation.AndroidBrowserComponent) browserPeer).destroy(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: browserDestroy 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
browserDestroy
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void resetStrings(@NonNull List<String> stringIds) { Preconditions.checkCallAuthorization(hasCallingOrSelfPermission( android.Manifest.permission.UPDATE_DEVICE_MANAGEMENT_RESOURCES)); mInjector.binderWithCleanCallingIdentity(() -> { if (mDeviceManagementResourcesProvider.removeStrings(stringIds)) { sendStringsUpdatedBroadcast(stringIds); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetStrings 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
resetStrings
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override protected void onPause() { super.onPause(); LocalBroadcastManager.getInstance(this).unregisterReceiver(mDevelopmentSettingsListener); mDevelopmentSettingsListener = null; unregisterReceiver(mBatteryInfoReceiver); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPause File: src/com/android/settings/SettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
onPause
src/com/android/settings/SettingsActivity.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
protected String escape(String string) { String escaped = JavaEscape.escapeJava(string); // escape $ character since it has special meaning in groovy string escaped = escaped.replace("$", "\\$"); return escaped; }
Vulnerability Classification: - CWE: CWE-94 - CVE: CVE-2021-21248 - Severity: MEDIUM - CVSS Score: 6.5 Description: Escape pattern field of build job param to prevent security vulnerability Function: escape File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java Repository: theonedev/onedev Fixed Code: public static String escape(String string) { String escaped = JavaEscape.escapeJava(string); // escape $ character since it has special meaning in groovy string escaped = escaped.replace("$", "\\$"); return escaped; }
[ "CWE-94" ]
CVE-2021-21248
MEDIUM
6.5
theonedev/onedev
escape
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
39d95ab8122c5d9ed18e69dc024870cae08d2d60
1
Analyze the following code function for security vulnerabilities
@Override public final boolean containsLong(CharSequence name, long value) { return contains(name, String.valueOf(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsLong File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
containsLong
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public long getMaximumTimeToLock(@Nullable ComponentName admin, int userHandle) { if (mService != null) { try { return mService.getMaximumTimeToLock(admin, userHandle, mParentInstance); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaximumTimeToLock 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
getMaximumTimeToLock
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private ObjectNode parseInlineTable(int nextState) throws IOException { // inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close // inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] pollExpected(TomlToken.INLINE_TABLE_OPEN, Lexer.EXPECT_INLINE_KEY); TomlObjectNode node = (TomlObjectNode) factory.objectNode(); while (true) { TomlToken token = peek(); if (token == TomlToken.INLINE_TABLE_CLOSE) { if (node.isEmpty()) { break; } else { // "A terminating comma (also called trailing comma) is not permitted after the last key/value pair // in an inline table." throw errorContext.atPosition(lexer).generic("Trailing comma not permitted for inline tables"); } } parseKeyVal(node, Lexer.EXPECT_TABLE_SEP); TomlToken sepToken = peek(); if (sepToken == TomlToken.INLINE_TABLE_CLOSE) { break; } else if (sepToken == TomlToken.COMMA) { pollExpected(TomlToken.COMMA, Lexer.EXPECT_INLINE_KEY); } else { throw errorContext.atPosition(lexer).unexpectedToken(sepToken, "comma or table end"); } } pollExpected(TomlToken.INLINE_TABLE_CLOSE, nextState); node.closed = true; node.defined = true; return node; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseInlineTable File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java Repository: FasterXML/jackson-dataformats-text The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-3894
HIGH
7.5
FasterXML/jackson-dataformats-text
parseInlineTable
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
20a209387931dba31e1a027b74976911c3df39fe
0
Analyze the following code function for security vulnerabilities
private String addFile(String s) { // I explicitly don't create a "proper URL" since code might rely on the fact that the file isn't encoded if(s != null && s.startsWith("/")) { return "file://" + s; } return s; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addFile 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
addFile
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void onHeadsUpStateChanged(NotificationData.Entry entry, boolean isHeadsUp) { mNotificationStackScroller.generateHeadsUpAnimation(entry.row, isHeadsUp); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onHeadsUpStateChanged File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onHeadsUpStateChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
boolean viewServerListWindows(Socket client) { if (isSystemSecure()) { return false; } boolean result = true; WindowList windows = new WindowList(); synchronized (mWindowMap) { //noinspection unchecked final int numDisplays = mDisplayContents.size(); for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx); windows.addAll(displayContent.getWindowList()); } } BufferedWriter out = null; // Any uncaught exception will crash the system process try { OutputStream clientStream = client.getOutputStream(); out = new BufferedWriter(new OutputStreamWriter(clientStream), 8 * 1024); final int count = windows.size(); for (int i = 0; i < count; i++) { final WindowState w = windows.get(i); out.write(Integer.toHexString(System.identityHashCode(w))); out.write(' '); out.append(w.mAttrs.getTitle()); out.write('\n'); } out.write("DONE.\n"); out.flush(); } catch (Exception e) { result = false; } finally { if (out != null) { try { out.close(); } catch (IOException e) { result = false; } } } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: viewServerListWindows 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
viewServerListWindows
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public Builder assureDeletion() { this.assureDeletion = true; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assureDeletion File: src/main/java/org/junit/rules/TemporaryFolder.java Repository: junit-team/junit4 The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-15250
LOW
1.9
junit-team/junit4
assureDeletion
src/main/java/org/junit/rules/TemporaryFolder.java
610155b8c22138329f0723eec22521627dbc52ae
0
Analyze the following code function for security vulnerabilities
@Override public void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } // Get the dispatching timeout here while we are not holding any locks so that it // can be cached by the AppWindowToken. The timeout value is used later by the // input dispatcher in code that does hold locks. If we did not cache the value // here we would run the chance of introducing a deadlock between the window manager // (which holds locks while updating the input dispatcher state) and the activity manager // (which holds locks while querying the application token). long inputDispatchingTimeoutNanos; try { inputDispatchingTimeoutNanos = token.getKeyDispatchingTimeout() * 1000000L; } catch (RemoteException ex) { Slog.w(TAG, "Could not get dispatching timeout.", ex); inputDispatchingTimeoutNanos = DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS; } synchronized(mWindowMap) { AppWindowToken atoken = findAppWindowToken(token.asBinder()); if (atoken != null) { Slog.w(TAG, "Attempted to add existing app token: " + token); return; } atoken = new AppWindowToken(this, token, voiceInteraction); atoken.inputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos; atoken.appFullscreen = fullscreen; atoken.showForAllUsers = showForAllUsers; atoken.requestedOrientation = requestedOrientation; atoken.layoutConfigChanges = (configChanges & (ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION)) != 0; atoken.mLaunchTaskBehind = launchTaskBehind; if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + atoken + " to stack=" + stackId + " task=" + taskId + " at " + addPos); Task task = mTaskIdToTask.get(taskId); if (task == null) { task = createTaskLocked(taskId, stackId, userId, atoken); } task.addAppToken(addPos, atoken); mTokenMap.put(token.asBinder(), atoken); // Application tokens start out hidden. atoken.hidden = true; atoken.hiddenRequested = true; //dump(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAppToken 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
addAppToken
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public void setSystemMessagesProvider( SystemMessagesProvider systemMessagesProvider) { if (systemMessagesProvider == null) { throw new IllegalArgumentException( "SystemMessagesProvider can not be null."); } this.systemMessagesProvider = systemMessagesProvider; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSystemMessagesProvider File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
setSystemMessagesProvider
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
private void populateMap(Object bean, Set<Object> objectsRecord) { Class<?> klass = bean.getClass(); // If klass is a System class then set includeSuperClass to false. boolean includeSuperClass = klass.getClassLoader() != null; Method[] methods = includeSuperClass ? klass.getMethods() : klass.getDeclaredMethods(); for (final Method method : methods) { final int modifiers = method.getModifiers(); if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers) && method.getParameterTypes().length == 0 && !method.isBridge() && method.getReturnType() != Void.TYPE && isValidMethodName(method.getName())) { final String key = getKeyNameFromMethod(method); if (key != null && !key.isEmpty()) { try { final Object result = method.invoke(bean); if (result != null) { // check cyclic dependency and throw error if needed // the wrap and populateMap combination method is // itself DFS recursive if (objectsRecord.contains(result)) { throw recursivelyDefinedObjectException(key); } objectsRecord.add(result); this.map.put(key, wrap(result, objectsRecord)); objectsRecord.remove(result); // we don't use the result anywhere outside of wrap // if it's a resource we should be sure to close it // after calling toString if (result instanceof Closeable) { try { ((Closeable) result).close(); } catch (IOException ignore) { } } } } catch (IllegalAccessException ignore) { } catch (IllegalArgumentException ignore) { } catch (InvocationTargetException ignore) { } } } } }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2023-5072 - Severity: HIGH - CVSS Score: 7.5 Description: Generalize the logic to disallow nested objects and arrays as keys in objects. Fixes #771. Function: populateMap File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java Fixed Code: private void populateMap(Object bean, Set<Object> objectsRecord) { Class<?> klass = bean.getClass(); // If klass is a System class then set includeSuperClass to false. boolean includeSuperClass = klass.getClassLoader() != null; Method[] methods = includeSuperClass ? klass.getMethods() : klass.getDeclaredMethods(); for (final Method method : methods) { final int modifiers = method.getModifiers(); if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers) && method.getParameterTypes().length == 0 && !method.isBridge() && method.getReturnType() != Void.TYPE && isValidMethodName(method.getName())) { final String key = getKeyNameFromMethod(method); if (key != null && !key.isEmpty()) { try { final Object result = method.invoke(bean); if (result != null) { // check cyclic dependency and throw error if needed // the wrap and populateMap combination method is // itself DFS recursive if (objectsRecord.contains(result)) { throw recursivelyDefinedObjectException(key); } objectsRecord.add(result); this.map.put(key, wrap(result, objectsRecord)); objectsRecord.remove(result); // we don't use the result anywhere outside of wrap // if it's a resource we should be sure to close it // after calling toString if (result instanceof Closeable) { try { ((Closeable) result).close(); } catch (IOException ignore) { } } } } catch (IllegalAccessException ignore) { } catch (IllegalArgumentException ignore) { } catch (InvocationTargetException ignore) { } } } } }
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
populateMap
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
1
Analyze the following code function for security vulnerabilities
@SuppressLint("NewApi") private static int getBand(WifiNetworkSpecifier s) { return s.getBand(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBand File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
getBand
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
public static String getUploadsAddedMessage() { return FileUploader.class.getName() + UPLOADS_ADDED_MESSAGE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUploadsAddedMessage File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
getUploadsAddedMessage
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
@Override public DefaultJpaInstanceConfiguration description(final I18NKey description) { this.description = description; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: description File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java Repository: KrailOrg/krail-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
description
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
0
Analyze the following code function for security vulnerabilities
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app) { List<ProviderInfo> providers = null; try { providers = AppGlobals.getPackageManager(). queryContentProviders(app.processName, app.uid, STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS); } catch (RemoteException ex) { } if (DEBUG_MU) Slog.v(TAG_MU, "generateApplicationProvidersLocked, app.info.uid = " + app.uid); int userId = app.userId; if (providers != null) { int N = providers.size(); app.pubProviders.ensureCapacity(N + app.pubProviders.size()); for (int i=0; i<N; i++) { ProviderInfo cpi = (ProviderInfo)providers.get(i); boolean singleton = isSingleton(cpi.processName, cpi.applicationInfo, cpi.name, cpi.flags); if (singleton && UserHandle.getUserId(app.uid) != 0) { // This is a singleton provider, but a user besides the // default user is asking to initialize a process it runs // in... well, no, it doesn't actually run in this process, // it runs in the process of the default user. Get rid of it. providers.remove(i); N--; i--; continue; } ComponentName comp = new ComponentName(cpi.packageName, cpi.name); ContentProviderRecord cpr = mProviderMap.getProviderByClass(comp, userId); if (cpr == null) { cpr = new ContentProviderRecord(this, cpi, app.info, comp, singleton); mProviderMap.putProviderByClass(comp, cpr); } if (DEBUG_MU) Slog.v(TAG_MU, "generateApplicationProvidersLocked, cpi.uid = " + cpr.uid); app.pubProviders.put(cpi.name, cpr); if (!cpi.multiprocess || !"android".equals(cpi.packageName)) { // Don't add this if it is a platform component that is marked // to run in multiple processes, because this is actually // part of the framework so doesn't make sense to track as a // separate apk in the process. app.addPackage(cpi.applicationInfo.packageName, cpi.applicationInfo.versionCode, mProcessStats); } ensurePackageDexOpt(cpi.applicationInfo.packageName); } } return providers; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateApplicationProvidersLocked 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
generateApplicationProvidersLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public void enableNativeMenu(boolean enable) { nativeMenu = enable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableNativeMenu File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
enableNativeMenu
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public String[] getPackagesRequestingNotificationPolicyAccess() throws RemoteException { enforceSystemOrSystemUI("request policy access packages"); final long identity = Binder.clearCallingIdentity(); try { return mPolicyAccess.getRequestingPackages(); } finally { Binder.restoreCallingIdentity(identity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackagesRequestingNotificationPolicyAccess 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
getPackagesRequestingNotificationPolicyAccess
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public byte[] getURLContentAsBytes(String surl, int timeout, String userAgent) throws IOException { HttpClient client = getHttpClient(timeout, userAgent); // create a GET method that reads a file over HTTPS, we're assuming // that this file requires basic authentication using the realm above. GetMethod get = new GetMethod(surl); try { // execute the GET client.executeMethod(get); // print the status and response return get.getResponseBody(); } finally { // release any connection resources used by the method get.releaseConnection(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURLContentAsBytes 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
getURLContentAsBytes
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public void setEmptyDragAmount(float amount) { mNotificationPanel.setEmptyDragAmount(amount); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEmptyDragAmount 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
setEmptyDragAmount
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private String getWorkProfileDeletedTitle() { return getUpdatableString(WORK_PROFILE_DELETED_TITLE, R.string.work_profile_deleted); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWorkProfileDeletedTitle 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
getWorkProfileDeletedTitle
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@LargeTest @Test public void testOutgoingVideoCallRejectedCheckVideoHistory() throws Exception { IdPair ids = startOutgoingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA, Process.myUserHandle(), VideoProfile.STATE_BIDIRECTIONAL); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.REMOTE); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21283 - Severity: MEDIUM - CVSS Score: 5.5 Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15) Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Function: testOutgoingVideoCallRejectedCheckVideoHistory File: tests/src/com/android/server/telecom/tests/VideoCallTests.java Repository: android Fixed Code: @LargeTest @Test public void testOutgoingVideoCallRejectedCheckVideoHistory() throws Exception { IdPair ids = startOutgoingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA, Process.myUserHandle(), VideoProfile.STATE_BIDIRECTIONAL, null); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.REMOTE); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); }
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testOutgoingVideoCallRejectedCheckVideoHistory
tests/src/com/android/server/telecom/tests/VideoCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
1
Analyze the following code function for security vulnerabilities
@Override public void stopTextEditing(final Runnable onFinish) { final Form f = Display.getInstance().getCurrent(); f.addSizeChangedListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { f.removeSizeChangedListener(this); Display.getInstance().callSerially(new Runnable() { @Override public void run() { onFinish.run(); } }); } }); stopEditing(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopTextEditing 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
stopTextEditing
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void add(long delta) { addAndGet(delta); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: add File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
add
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public boolean isAutoCreatePlaceholderReferenceTargets() { return myAutoCreatePlaceholderReferenceTargets; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAutoCreatePlaceholderReferenceTargets File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isAutoCreatePlaceholderReferenceTargets
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
boolean isExitAnimationRunningSelfOrChild() { return isAnimating(CHILDREN, ANIMATION_TYPE_WINDOW_ANIMATION); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isExitAnimationRunningSelfOrChild File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
isExitAnimationRunningSelfOrChild
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private void migrateBackGestureSensitivity(String side, int userId, SettingsState secureSettings) { final Setting currentScale = secureSettings.getSettingLocked(side); if (currentScale.isNull()) { return; } float current = 1.0f; try { current = Float.parseFloat(currentScale.getValue()); } catch (NumberFormatException e) { // Do nothing. Overwrite with default value. } // Inset scale migration across all devices // Old(24dp): 0.66 0.75 0.83 1.00 1.08 1.33 1.66 // New(30dp): 0.60 0.60 1.00 1.00 1.00 1.00 1.33 final float low = 0.76f; // Values smaller than this will map to 0.6 final float high = 1.65f; // Values larger than this will map to 1.33 float newScale; if (current < low) { newScale = 0.6f; } else if (current < high) { newScale = 1.0f; } else { newScale = 1.33f; } secureSettings.insertSettingLocked(side, Float.toString(newScale), null /* tag */, false /* makeDefault */, SettingsState.SYSTEM_PACKAGE_NAME); if (DEBUG) { Slog.v(LOG_TAG, "Changed back sensitivity from " + current + " to " + newScale + " for user " + userId + " on " + side); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateBackGestureSensitivity File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
migrateBackGestureSensitivity
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
public File[] readFolder(final Item item) throws CloudsyncException { final String currentPath = localPath + (StringUtils.isEmpty(item.getPath()) ? "" : Item.SEPARATOR + item.getPath()); final File folder = new File(currentPath); if (!Files.exists(folder.toPath(), LinkOption.NOFOLLOW_LINKS)) { LOGGER.log(Level.WARNING, "skip '" + currentPath + "'. does not exists anymore."); return new File[] {}; } File[] files = folder.listFiles(); if( files == null ) { throw new CloudsyncException("Path '" + currentPath + "' is not readable. Check your permissions"); } return files; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFolder File: src/main/java/cloudsync/connector/LocalFilesystemConnector.java Repository: HolgerHees/cloudsync The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4773
LOW
3.3
HolgerHees/cloudsync
readFolder
src/main/java/cloudsync/connector/LocalFilesystemConnector.java
3ad796833398af257c28e0ebeade68518e0e612a
0
Analyze the following code function for security vulnerabilities
public void denyTypesByRegExp(String[] regexps) { denyPermission(new RegExpTypePermission(regexps)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: denyTypesByRegExp File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
denyTypesByRegExp
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
private native void nativeLoadIfNecessary(long nativeContentViewCoreImpl);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeLoadIfNecessary 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
nativeLoadIfNecessary
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void updateListeners() { if (mListening) { mNextAlarmController.addStateChangedCallback(this); } else { mNextAlarmController.removeStateChangedCallback(this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateListeners File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3886
HIGH
7.2
android
updateListeners
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
0
Analyze the following code function for security vulnerabilities
@Override public void beginFigureCaption(Map<String, String> parameters) { getXHTMLWikiPrinter().printXMLStartElement(FIGURE_CAPTION_TAG, parameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginFigureCaption File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java Repository: xwiki/xwiki-rendering The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
beginFigureCaption
xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
0
Analyze the following code function for security vulnerabilities
@Override public RemoteViews makeHeadsUpContentView(boolean increasedHeight) { RemoteViews customContent = mBuilder.mN.headsUpContentView != null ? mBuilder.mN.headsUpContentView : mBuilder.mN.contentView; return makeMediaBigContentView(customContent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeHeadsUpContentView File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
makeHeadsUpContentView
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void removeAttachListener(Command attachListener) { assert attachListener != null; attachListeners.remove(attachListener); if (attachListeners.isEmpty()) { attachListeners = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAttachListener File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
removeAttachListener
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Override public Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain) { boolean originHeaderPresent = request.getHeaders().getOrigin().isPresent(); if (originHeaderPresent) { Optional<MutableHttpResponse<?>> response = handleRequest(request); if (response.isPresent()) { return Publishers.just(response.get()); } else { return Publishers.map(chain.proceed(request), mutableHttpResponse -> { handleResponse(request, mutableHttpResponse); return mutableHttpResponse; }); } } else { return chain.proceed(request); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doFilter File: http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
doFilter
http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
static void rankFormats(ImportingJob job, final String bestFormat, ArrayNode rankedFormats) { final Map<String, String[]> formatToSegments = new HashMap<String, String[]>(); boolean download = bestFormat == null ? true : ImportingManager.formatToRecord.get(bestFormat).download; List<String> formats = new ArrayList<String>(ImportingManager.formatToRecord.keySet().size()); for (String format : ImportingManager.formatToRecord.keySet()) { Format record = ImportingManager.formatToRecord.get(format); if (record.uiClass != null && record.parser != null && record.download == download) { formats.add(format); formatToSegments.put(format, format.split("/")); } } if (bestFormat == null) { Collections.sort(formats); } else { Collections.sort(formats, new Comparator<String>() { @Override public int compare(String format1, String format2) { if (format1.equals(bestFormat)) { return -1; } else if (format2.equals(bestFormat)) { return 1; } else { return compareBySegments(format1, format2); } } int compareBySegments(String format1, String format2) { int c = commonSegments(format2) - commonSegments(format1); return c != 0 ? c : format1.compareTo(format2); } int commonSegments(String format) { String[] bestSegments = formatToSegments.get(bestFormat); String[] segments = formatToSegments.get(format); if (bestSegments == null || segments == null) { return 0; } else { int i; for (i = 0; i < bestSegments.length && i < segments.length; i++) { if (!bestSegments[i].equals(segments[i])) { break; } } return i; } } }); } for (String format : formats) { rankedFormats.add(format); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rankFormats File: main/src/com/google/refine/importing/ImportingUtilities.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-19859
MEDIUM
4
OpenRefine
rankFormats
main/src/com/google/refine/importing/ImportingUtilities.java
e243e73e4064de87a913946bd320fbbe246da656
0
Analyze the following code function for security vulnerabilities
public static Map processArtifact(String[] artifact, String target) throws SAMLException { List assts = null; Subject assertionSubject = null; AssertionArtifact firstArtifact = null; Map sessMap = null; // Call SAMLClient to do the Single-sign-on try { assts = SAMLClient.artifactQueryHandler(artifact, (String) null); //exam the SAML response if ((assertionSubject = examAssertions(assts)) == null) { return null; } firstArtifact = new AssertionArtifact(artifact[0]); String sid = firstArtifact.getSourceID(); Map partner = (Map) SAMLServiceManager.getAttribute( SAMLConstants.PARTNER_URLS); if (partner == null) { throw new SAMLException(bundle.getString ("nullPartnerUrl")); } SAMLServiceManager.SOAPEntry partnerdest = (SAMLServiceManager.SOAPEntry) partner.get(sid); if (partnerdest == null) { throw new SAMLException(bundle.getString ("failedAccountMapping")); } sessMap = getAttributeMap(partnerdest, assts, assertionSubject, target); } catch (Exception se) { debug.error("SAMLUtils.processArtifact :" , se); throw new SAMLException( bundle.getString("failProcessArtifact")); } return sessMap; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processArtifact File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java Repository: OpenIdentityPlatform/OpenAM The code follows secure coding practices.
[ "CWE-287" ]
CVE-2023-37471
CRITICAL
9.8
OpenIdentityPlatform/OpenAM
processArtifact
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
7c18543d126e8a567b83bb4535631825aaa9d742
0
Analyze the following code function for security vulnerabilities
public int getThreshold() { return threshold; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getThreshold File: src/main/java/org/codehaus/jettison/json/JSONTokener.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getThreshold
src/main/java/org/codehaus/jettison/json/JSONTokener.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public List<List<ObjectDiff>> getObjectDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) { List<List<ObjectDiff>> difflist = new ArrayList<List<ObjectDiff>>(); // Since objects could have been deleted or added, we iterate on both the old and the new // object collections. // First, iterate over the old objects. for (List<BaseObject> objects : fromDoc.getXObjects().values()) { for (BaseObject originalObj : objects) { // This happens when objects are deleted, and the document is still in the cache // storage. if (originalObj != null) { BaseObject newObj = toDoc.getXObject(originalObj.getXClassReference(), originalObj.getNumber()); List<ObjectDiff> dlist; if (newObj == null) { // The object was deleted. dlist = new BaseObject().getDiff(originalObj, context); ObjectDiff deleteMarker = new ObjectDiff(originalObj.getXClassReference(), originalObj.getNumber(), originalObj.getGuid(), ObjectDiff.ACTION_OBJECTREMOVED, "", "", "", ""); dlist.add(0, deleteMarker); } else { // The object exists in both versions, but might have been changed. dlist = newObj.getDiff(originalObj, context); } if (!dlist.isEmpty()) { difflist.add(dlist); } } } } // Second, iterate over the objects which are only in the new version. for (List<BaseObject> objects : toDoc.getXObjects().values()) { for (BaseObject newObj : objects) { // This happens when objects are deleted, and the document is still in the cache // storage. if (newObj != null) { BaseObject originalObj = fromDoc.getXObject(newObj.getXClassReference(), newObj.getNumber()); if (originalObj == null) { // TODO: Refactor this so that getDiff() accepts null Object as input. // Only consider added objects, the other case was treated above. originalObj = new BaseObject(); originalObj.setXClassReference(newObj.getRelativeXClassReference()); originalObj.setNumber(newObj.getNumber()); originalObj.setGuid(newObj.getGuid()); List<ObjectDiff> dlist = newObj.getDiff(originalObj, context); ObjectDiff addMarker = new ObjectDiff(newObj.getXClassReference(), newObj.getNumber(), newObj.getGuid(), ObjectDiff.ACTION_OBJECTADDED, "", "", "", ""); dlist.add(0, addMarker); if (!dlist.isEmpty()) { difflist.add(dlist); } } } } } return difflist; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObjectDiff 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
getObjectDiff
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 int[] getRunningUserIds() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); mRemote.transact(GET_RUNNING_USER_IDS_TRANSACTION, data, reply, 0); reply.readException(); int[] result = reply.createIntArray(); reply.recycle(); data.recycle(); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRunningUserIds File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getRunningUserIds
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
int checkAllowBackgroundLocked(int uid, String packageName, int callingPid, boolean allowWhenForeground) { UidRecord uidRec = mActiveUids.get(uid); if (!mLenientBackgroundCheck) { if (!allowWhenForeground || uidRec == null || uidRec.curProcState >= ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND) { if (mAppOpsService.noteOperation(AppOpsManager.OP_RUN_IN_BACKGROUND, uid, packageName) != AppOpsManager.MODE_ALLOWED) { return ActivityManager.APP_START_MODE_DELAYED; } } } else if (uidRec == null || uidRec.idle) { if (callingPid >= 0) { ProcessRecord proc; synchronized (mPidsSelfLocked) { proc = mPidsSelfLocked.get(callingPid); } if (proc != null && proc.curProcState < ActivityManager.PROCESS_STATE_RECEIVER) { // Whoever is instigating this is in the foreground, so we will allow it // to go through. return ActivityManager.APP_START_MODE_NORMAL; } } if (mAppOpsService.noteOperation(AppOpsManager.OP_RUN_IN_BACKGROUND, uid, packageName) != AppOpsManager.MODE_ALLOWED) { return ActivityManager.APP_START_MODE_DELAYED; } } return ActivityManager.APP_START_MODE_NORMAL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkAllowBackgroundLocked 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
checkAllowBackgroundLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@CriticalNative private static final native int nativeGetLineNumber(long state);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetLineNumber 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
nativeGetLineNumber
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
private void executeReactor(final InitStrategy is, TaskBuilder... builders) throws IOException, InterruptedException, ReactorException { Reactor reactor = new Reactor(builders) { /** * Sets the thread name to the task for better diagnostics. */ @Override protected void runTask(Task task) throws Exception { if (is!=null && is.skipInitTask(task)) return; ACL.impersonate(ACL.SYSTEM); // full access in the initialization thread String taskName = task.getDisplayName(); Thread t = Thread.currentThread(); String name = t.getName(); if (taskName !=null) t.setName(taskName); try { long start = System.currentTimeMillis(); super.runTask(task); if(LOG_STARTUP_PERFORMANCE) LOGGER.info(String.format("Took %dms for %s by %s", System.currentTimeMillis()-start, taskName, name)); } finally { t.setName(name); SecurityContextHolder.clearContext(); } } }; new InitReactorRunner() { @Override protected void onInitMilestoneAttained(InitMilestone milestone) { initLevel = milestone; } }.run(reactor); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeReactor 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
executeReactor
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public String getClassName() { return getClass().getName(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClassName File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4859
MEDIUM
4
jogetworkflow/jw-community
getClassName
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
0
Analyze the following code function for security vulnerabilities
public ClientConfig getClientConfig() { return clientConfig; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClientConfig File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getClientConfig
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Nullable OnBackInvokedCallbackInfo getOnBackInvokedCallbackInfo() { return mOnBackInvokedCallbackInfo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOnBackInvokedCallbackInfo File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getOnBackInvokedCallbackInfo
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public void validate(Object value) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validate File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
validate
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public void addXObject(BaseObject object) { object.setOwnerDocument(this); List<BaseObject> vobj = this.xObjects.get(object.getXClassReference()); if (vobj == null) { setXObject(0, object); } else { setXObject(vobj.size(), object); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addXObject 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
addXObject
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0