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
protected List<RequestHandler> createRequestHandlers() throws ServiceException { List<RequestHandler> handlers = new ArrayList<>(); handlers.add(new JavaScriptBootstrapHandler()); handlers.add(new SessionRequestHandler()); handlers.add(new HeartbeatHandler()); handlers.add(new UidlRequestHandler()); handlers.add(new UnsupportedBrowserHandler()); handlers.add(new StreamRequestHandler()); PwaRegistry pwaRegistry = getPwaRegistry(); if (pwaRegistry != null && pwaRegistry.getPwaConfiguration().isEnabled()) { handlers.add(new PwaHandler(pwaRegistry)); } if (hasWebComponentConfigurations()) { handlers.add(new WebComponentProvider()); handlers.add(new WebComponentBootstrapHandler()); } return handlers; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createRequestHandlers File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
createRequestHandlers
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public void showWaitingForDebugger(IApplicationThread who, boolean waiting) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showWaitingForDebugger File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
showWaitingForDebugger
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void setEverythingIncludesFetchPageSize(int theEverythingIncludesFetchPageSize) { Validate.inclusiveBetween(1, Integer.MAX_VALUE, theEverythingIncludesFetchPageSize); myEverythingIncludesFetchPageSize = theEverythingIncludesFetchPageSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEverythingIncludesFetchPageSize 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
setEverythingIncludesFetchPageSize
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
private boolean onyx38Family(QTI21Infos fileInfos) { if(fileInfos == null || fileInfos.getEditor() == null) return false; String version = fileInfos.getVersion(); return "Onyx Editor".equals(fileInfos.getEditor()) && version != null && (version.startsWith("2.") || version.startsWith("3.")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onyx38Family 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
onyx38Family
src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
protected String getFilterPath(final String s) { if (s.startsWith("#")) { return StringUtil.EMPTY; } else if (s.startsWith(CONTAINS)) { final String v = s.substring(CONTAINS.length()); final StringBuilder buf = new StringBuilder(100); return ".*" + appendFileterPath(buf, escape(v)) + ".*"; } else if (s.startsWith(REGEXP_IGNORE_CASE)) { final String v = s.substring(REGEXP_IGNORE_CASE.length()); final StringBuilder buf = new StringBuilder(100); buf.append("(?i)"); return appendFileterPath(buf, unescape(v)); } else if (s.startsWith(REGEXP_CASE)) { final String v = s.substring(REGEXP_CASE.length()); final StringBuilder buf = new StringBuilder(100); return appendFileterPath(buf, unescape(v)); } else if (s.startsWith(REGEXP)) { final String v = s.substring(REGEXP.length()); final StringBuilder buf = new StringBuilder(100); return appendFileterPath(buf, unescape(v)); } else if (Arrays.stream(webProtocols).anyMatch(p -> s.startsWith(p))) { return escape(s) + ".*"; } else if (Arrays.stream(fileProtocols).anyMatch(p -> s.startsWith(p))) { return escape(s) + ".*"; } else { final StringBuilder buf = new StringBuilder(100); return appendFileterPath(buf, escape(s)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFilterPath File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java Repository: codelibs/fess The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000822
HIGH
7.5
codelibs/fess
getFilterPath
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
0
Analyze the following code function for security vulnerabilities
public static String registerServlet(PluginManager pluginManager, Plugin plugin, GenericServlet servlet, String relativeUrl) throws ServletException { String pluginName = pluginManager.getPluginPath(plugin).getFileName().toString(); PluginServlet.pluginManager = pluginManager; if (servlet == null) { throw new ServletException("Servlet is missing"); } String pluginServletUrl = pluginName + relativeUrl; servlets.put((pluginName + relativeUrl).toLowerCase(), servlet); return PLUGINS_WEBROOT + pluginServletUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerServlet File: xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java Repository: igniterealtime/Openfire The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-18393
MEDIUM
5
igniterealtime/Openfire
registerServlet
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java
5af6e03c25b121d01e752927c401124a4da569f7
0
Analyze the following code function for security vulnerabilities
@JsonProperty("Value") public String getValue() { return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValue File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getValue
base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void close() { if (file != null) { try { Files.deleteIfExists(file.toPath()); } catch (IOException e) { log.error("", e); } } fields.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: close File: src/main/java/org/olat/restapi/support/MultipartReader.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
close
src/main/java/org/olat/restapi/support/MultipartReader.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
@Override public StompServer writingFrameHandler(Handler<ServerFrame> handler) { synchronized (this) { this.writingFrameHandler = handler; } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writingFrameHandler File: src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java Repository: vert-x3/vertx-stomp The code follows secure coding practices.
[ "CWE-287" ]
CVE-2023-32081
MEDIUM
6.5
vert-x3/vertx-stomp
writingFrameHandler
src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
0de4bc5a44ddb57e74d92c445f16456fa03f265b
0
Analyze the following code function for security vulnerabilities
public boolean isVisiblePatternEnabled(int userId) { return getBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE, false, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isVisiblePatternEnabled File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
isVisiblePatternEnabled
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private boolean simpleObject(Object obj) { return obj instanceof Number || obj instanceof String || obj instanceof Date || obj instanceof File || obj instanceof Boolean || obj instanceof Enum; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: simpleObject File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
simpleObject
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
@Nullable @VisibleForTesting ApplicationInfo injectApplicationInfoWithUninstalled( String packageName, @UserIdInt int userId) { final long start = getStatStartTime(); final long token = injectClearCallingIdentity(); try { return mIPackageManager.getApplicationInfo(packageName, PACKAGE_MATCH_FLAGS, userId); } catch (RemoteException e) { // Shouldn't happen. Slog.wtf(TAG, "RemoteException", e); return null; } finally { injectRestoreCallingIdentity(token); logDurationStat(Stats.GET_APPLICATION_INFO, start); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectApplicationInfoWithUninstalled File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
injectApplicationInfoWithUninstalled
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
ActivityStarter setCaller(IApplicationThread caller) { mRequest.caller = caller; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCaller File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
setCaller
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
private void registerRosterListener() { // flush roster on connecting. mRoster = mXMPPConnection.getRoster(); mRoster.setSubscriptionMode(Roster.SubscriptionMode.manual); if (mRosterListener != null) mRoster.removeRosterListener(mRosterListener); mRosterListener = new RosterListener() { private boolean first_roster = true; public void entriesAdded(Collection<String> entries) { debugLog("entriesAdded(" + entries + ")"); ContentValues[] cvs = new ContentValues[entries.size()]; int i = 0; for (String entry : entries) { RosterEntry rosterEntry = mRoster.getEntry(entry); cvs[i++] = getContentValuesForRosterEntry(rosterEntry); } mContentResolver.bulkInsert(RosterProvider.CONTENT_URI, cvs); // when getting the roster in the beginning, remove remains of old one if (first_roster) { removeOldRosterEntries(); first_roster = false; } debugLog("entriesAdded() done"); } public void entriesDeleted(Collection<String> entries) { debugLog("entriesDeleted(" + entries + ")"); for (String entry : entries) { deleteRosterEntryFromDB(entry); } } public void entriesUpdated(Collection<String> entries) { debugLog("entriesUpdated(" + entries + ")"); for (String entry : entries) { RosterEntry rosterEntry = mRoster.getEntry(entry); updateRosterEntryInDB(rosterEntry); } } public void presenceChanged(Presence presence) { debugLog("presenceChanged(" + presence.getFrom() + "): " + presence); String jabberID = getBareJID(presence.getFrom()); RosterEntry rosterEntry = mRoster.getEntry(jabberID); if (rosterEntry != null) upsertRoster(getContentValuesForRosterEntry(rosterEntry, presence), rosterEntry.getUser()); } }; mRoster.addRosterListener(mRosterListener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerRosterListener File: src/org/yaxim/androidclient/service/SmackableImp.java Repository: ge0rg/yaxim The code follows secure coding practices.
[ "CWE-20", "CWE-346" ]
CVE-2017-5589
MEDIUM
4.3
ge0rg/yaxim
registerRosterListener
src/org/yaxim/androidclient/service/SmackableImp.java
65a38dc77545d9568732189e86089390f0ceaf9f
0
Analyze the following code function for security vulnerabilities
public IntentBuilder setPasswordType(int passwordType) { mIntent.putExtra(LockPatternUtils.PASSWORD_TYPE_KEY, passwordType); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPasswordType File: src/com/android/settings/password/ChooseLockPassword.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
setPasswordType
src/com/android/settings/password/ChooseLockPassword.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
@Override protected void decodeLast(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { super.decodeLast(ctx, in, out); if (resetRequested) { // If a reset was requested by decodeLast() we need to do it now otherwise we may produce a // LastHttpContent while there was already one. resetNow(); } // Handle the last unfinished message. if (message != null) { boolean chunked = HttpUtil.isTransferEncodingChunked(message); if (currentState == State.READ_VARIABLE_LENGTH_CONTENT && !in.isReadable() && !chunked) { // End of connection. out.add(LastHttpContent.EMPTY_LAST_CONTENT); resetNow(); return; } if (currentState == State.READ_HEADER) { // If we are still in the state of reading headers we need to create a new invalid message that // signals that the connection was closed before we received the headers. out.add(invalidMessage(Unpooled.EMPTY_BUFFER, new PrematureChannelClosureException("Connection closed before received headers"))); resetNow(); return; } // Check if the closure of the connection signifies the end of the content. boolean prematureClosure; if (isDecodingRequest() || chunked) { // The last request did not wait for a response. prematureClosure = true; } else { // Compare the length of the received content and the 'Content-Length' header. // If the 'Content-Length' header is absent, the length of the content is determined by the end of the // connection, so it is perfectly fine. prematureClosure = contentLength() > 0; } if (!prematureClosure) { out.add(LastHttpContent.EMPTY_LAST_CONTENT); } resetNow(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decodeLast File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2019-16869
MEDIUM
5
netty
decodeLast
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
0
Analyze the following code function for security vulnerabilities
@Override protected int engineGetBlockSize() { return blockSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineGetBlockSize File: src/main/java/org/conscrypt/OpenSSLCipher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2461
HIGH
7.6
android
engineGetBlockSize
src/main/java/org/conscrypt/OpenSSLCipher.java
1638945d4ed9403790962ec7abed1b7a232a9ff8
0
Analyze the following code function for security vulnerabilities
public boolean isInObjectEditMode() { return getDriver().getCurrentUrl().contains("editor=object"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInObjectEditMode 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
isInObjectEditMode
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
public Iterable<DataPoints> getDataPoints() { return datapoints; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDataPoints File: src/graph/Plot.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2020-35476
HIGH
7.5
OpenTSDB/opentsdb
getDataPoints
src/graph/Plot.java
b762338664c3ee6e3f773bc04da2a8af24a5c486
0
Analyze the following code function for security vulnerabilities
public ComponentName getCallingActivity(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); mRemote.transact(GET_CALLING_ACTIVITY_TRANSACTION, data, reply, 0); reply.readException(); ComponentName res = ComponentName.readFromParcel(reply); data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallingActivity File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getCallingActivity
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@NonNull @Override public Map<String, Set<String>> getAllAppOpPermissionPackages() { return mPermissionManagerServiceImpl.getAllAppOpPermissionPackages(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllAppOpPermissionPackages File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
getAllAppOpPermissionPackages
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
public void run() { try { execute(); } catch (BadRequestException e) { query.badRequest(e.getMessage()); } catch (GnuplotException e) { query.badRequest("<pre>" + e.getMessage() + "</pre>"); } catch (RuntimeException e) { query.internalError(e); } catch (IOException e) { query.internalError(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2023-25826
CRITICAL
9.8
OpenTSDB/opentsdb
run
src/tsd/GraphHandler.java
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
0
Analyze the following code function for security vulnerabilities
private void enableRestrictedSettings(String pkgName, int appId) { final AppOpsManager appOpsManager = mPm.mContext.getSystemService(AppOpsManager.class); final int[] allUsersList = mPm.mUserManager.getUserIds(); for (int userId : allUsersList) { final int uid = UserHandle.getUid(userId, appId); appOpsManager.setMode(AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, uid, pkgName, AppOpsManager.MODE_ERRORED); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableRestrictedSettings 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
enableRestrictedSettings
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
public long getOpId() { return mCrypto != null ? AndroidKeyStoreProvider.getKeyStoreOperationHandle(mCrypto) : 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOpId File: core/java/android/hardware/fingerprint/FingerprintManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
getOpId
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public boolean isCommonCriteriaModeEnabled(ComponentName who) { if (who != null) { final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller), "Common Criteria mode can only be controlled by a device owner or " + "a profile owner on an organization-owned device."); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller); return admin.mCommonCriteriaMode; } } // Return aggregated state if caller is not admin (who == null). synchronized (getLockObject()) { // Only DO or COPE PO can turn on CC mode, so take a shortcut here and only look at // their ActiveAdmin, instead of iterating through all admins. final ActiveAdmin admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked( UserHandle.USER_SYSTEM); return admin != null ? admin.mCommonCriteriaMode : false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCommonCriteriaModeEnabled 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
isCommonCriteriaModeEnabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void prepareFromMediaId(String packageName, int pid, int uid, String mediaId, Bundle extras) { try { final String reason = TAG + ":prepareFromMediaId"; mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(), pid, uid, packageName, reason); mCb.onPrepareFromMediaId(packageName, pid, uid, mediaId, extras); } catch (RemoteException e) { Log.e(TAG, "Remote failure in prepareFromMediaId.", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareFromMediaId File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
prepareFromMediaId
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
private PackageInfo generatePackageInfoFromSettingsLPw(String packageName, int flags, int userId) { if (!sUserManager.exists(userId)) return null; PackageSetting ps = mSettings.mPackages.get(packageName); if (ps != null) { PackageParser.Package pkg = ps.pkg; if (pkg == null) { if ((flags & PackageManager.GET_UNINSTALLED_PACKAGES) == 0) { return null; } // Only data remains, so we aren't worried about code paths pkg = new PackageParser.Package(packageName); pkg.applicationInfo.packageName = packageName; pkg.applicationInfo.flags = ps.pkgFlags | ApplicationInfo.FLAG_IS_DATA_ONLY; pkg.applicationInfo.privateFlags = ps.pkgPrivateFlags; pkg.applicationInfo.dataDir = Environment .getDataUserPackageDirectory(ps.volumeUuid, userId, packageName) .getAbsolutePath(); pkg.applicationInfo.primaryCpuAbi = ps.primaryCpuAbiString; pkg.applicationInfo.secondaryCpuAbi = ps.secondaryCpuAbiString; } return generatePackageInfo(pkg, flags, userId); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generatePackageInfoFromSettingsLPw 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
generatePackageInfoFromSettingsLPw
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public String getDefaultPage(XWikiContext context) { String defaultPage = getXWikiPreference("defaultpage", "", context); if (StringUtils.isEmpty(defaultPage)) { return getConfiguration().getProperty("xwiki.defaultpage", DEFAULT_SPACE_HOMEPAGE); } return defaultPage; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultPage 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
getDefaultPage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public static boolean isConfigForPskNetwork(WifiConfiguration config) { return config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isConfigForPskNetwork 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
isConfigForPskNetwork
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
@Override public TtyExecErrorChannelable<String, OutputStream, PipedInputStream, ExecWatch> redirectingError() { return readingError(new PipedInputStream()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: redirectingError File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java Repository: fabric8io/kubernetes-client The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-20218
MEDIUM
5.8
fabric8io/kubernetes-client
redirectingError
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
325d67cc80b73f049a5d0cea4917c1f2709a8d86
0
Analyze the following code function for security vulnerabilities
@Override public void setPlaybackToRemote(int control, int max, String controlId) throws RemoteException { boolean typeChanged; synchronized (mLock) { typeChanged = mVolumeType == PlaybackInfo.PLAYBACK_TYPE_LOCAL; mVolumeType = PlaybackInfo.PLAYBACK_TYPE_REMOTE; mVolumeControlType = control; mMaxVolume = max; mVolumeControlId = controlId; } if (typeChanged) { final long token = Binder.clearCallingIdentity(); try { mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this); } finally { Binder.restoreCallingIdentity(token); } mHandler.post(MessageHandler.MSG_UPDATE_VOLUME); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPlaybackToRemote File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
setPlaybackToRemote
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
public List<IssuesDao> listByWorkspaceId(IssuesRequest request) { request.setOrders(ServiceUtils.getDefaultOrderByField(request.getOrders(), "create_time")); return extIssuesMapper.getIssues(request); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listByWorkspaceId File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
listByWorkspaceId
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public void setMinRoamingUplinkBandwidth(long minRoamingUplinkBandwidth) { mMinRoamingUplinkBandwidth = minRoamingUplinkBandwidth; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMinRoamingUplinkBandwidth File: framework/java/android/net/wifi/hotspot2/pps/Policy.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21240
MEDIUM
5.5
android
setMinRoamingUplinkBandwidth
framework/java/android/net/wifi/hotspot2/pps/Policy.java
69119d1d3102e27b6473c785125696881bce9563
0
Analyze the following code function for security vulnerabilities
private boolean isConnectionEstablished() { return (currentCallStatus.equals(CallStatus.JOINED) || currentCallStatus.equals(CallStatus.IN_CONVERSATION)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isConnectionEstablished File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
isConnectionEstablished
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public String loadHeaderAppName() { CharSequence name = null; final PackageManager pm = mContext.getPackageManager(); if (mN.extras.containsKey(EXTRA_SUBSTITUTE_APP_NAME)) { // only system packages which lump together a bunch of unrelated stuff // may substitute a different name to make the purpose of the // notification more clear. the correct package label should always // be accessible via SystemUI. final String pkg = mContext.getPackageName(); final String subName = mN.extras.getString(EXTRA_SUBSTITUTE_APP_NAME); if (PackageManager.PERMISSION_GRANTED == pm.checkPermission( android.Manifest.permission.SUBSTITUTE_NOTIFICATION_APP_NAME, pkg)) { name = subName; } else { Log.w(TAG, "warning: pkg " + pkg + " attempting to substitute app name '" + subName + "' without holding perm " + android.Manifest.permission.SUBSTITUTE_NOTIFICATION_APP_NAME); } } if (TextUtils.isEmpty(name)) { name = pm.getApplicationLabel(mContext.getApplicationInfo()); } if (TextUtils.isEmpty(name)) { // still nothing? return null; } return String.valueOf(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadHeaderAppName File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
loadHeaderAppName
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public IndexPattern setDlsQuery(String dlsQuery) { if (dlsQuery != null) { this.dlsQuery = dlsQuery; } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDlsQuery File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
setDlsQuery
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0
Analyze the following code function for security vulnerabilities
public ApiClient setServers(List<ServerConfiguration> servers) { this.servers = servers; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServers File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/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
setServers
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void userAuth(AuthUserIssueRequest authUserIssueRequest) { IssuesRequest issuesRequest = new IssuesRequest(); issuesRequest.setWorkspaceId(authUserIssueRequest.getWorkspaceId()); IssuesPlatform abstractPlatform = IssueFactory.createPlatform(authUserIssueRequest.getPlatform(), issuesRequest); abstractPlatform.userAuth(authUserIssueRequest); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userAuth File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
userAuth
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private static Map<String, String> parseSelectionNamespaces(final String selectionNS) { final Map<String, String> result = new HashMap<>(); final String[] toks = selectionNS.split("\\s"); for (final String tok : toks) { if (tok.startsWith("xmlns=")) { result.put("", tok.substring(7, tok.length() - 7)); } else if (tok.startsWith("xmlns:")) { final String[] prefix = tok.substring(6).split("="); result.put(prefix[0], prefix[1].substring(1, prefix[1].length() - 1)); } } return result.isEmpty() ? null : result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseSelectionNamespaces File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
parseSelectionNamespaces
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
private static void respondAsciiQuery(final HttpQuery query, final int max_age, final String basepath, final Plot plot) { final String path = basepath + ".txt"; PrintWriter asciifile; try { asciifile = new PrintWriter(path); } catch (IOException e) { query.internalError(e); return; } try { final StringBuilder tagbuf = new StringBuilder(); for (final DataPoints dp : plot.getDataPoints()) { final String metric = dp.metricName(); tagbuf.setLength(0); for (final Map.Entry<String, String> tag : dp.getTags().entrySet()) { tagbuf.append(' ').append(tag.getKey()) .append('=').append(tag.getValue()); } for (final DataPoint d : dp) { if (d.isInteger()) { printMetricHeader(asciifile, metric, d.timestamp()); asciifile.print(d.longValue()); } else { // Doubles require extra processing. final double value = d.doubleValue(); // Value might be NaN or infinity. if (Double.isInfinite(value)) { // Infinity is invalid. throw new IllegalStateException("Infinity:" + value + " d=" + d + ", query=" + query); } else if (Double.isNaN(value)) { // NaNs should be skipped. continue; } printMetricHeader(asciifile, metric, d.timestamp()); asciifile.print(value); } asciifile.print(tagbuf); asciifile.print('\n'); } } } finally { asciifile.close(); } try { query.sendFile(path, max_age); } catch (IOException e) { query.internalError(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: respondAsciiQuery File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2023-25826
CRITICAL
9.8
OpenTSDB/opentsdb
respondAsciiQuery
src/tsd/GraphHandler.java
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
0
Analyze the following code function for security vulnerabilities
@RequestMapping(value = { "/conformance" }) public String actionConformance(HttpServletRequest theServletRequest, final HomeRequest theRequest, final BindingResult theBindingResult, final ModelMap theModel) { addCommonParams(theServletRequest, theRequest, theModel); CaptureInterceptor interceptor = new CaptureInterceptor(); GenericClient client = theRequest.newClient(theServletRequest, getContext(theRequest), myConfig, interceptor); ResultType returnsResource = ResultType.RESOURCE; long start = System.currentTimeMillis(); try { Class<? extends IBaseConformance> type; switch (getContext(theRequest).getVersion().getVersion()) { default: case DSTU2: type = ca.uhn.fhir.model.dstu2.resource.Conformance.class; break; case DSTU3: type = org.hl7.fhir.dstu3.model.CapabilityStatement.class; break; case R4: type = org.hl7.fhir.r4.model.CapabilityStatement.class; break; } client.fetchConformance().ofType(type).execute(); } catch (Exception e) { returnsResource = handleClientException(client, e, theModel); } long delay = System.currentTimeMillis() - start; processAndAddLastClientInvocation(client, returnsResource, theModel, delay, "Loaded conformance", interceptor, theRequest); ourLog.info(logPrefix(theModel) + "Displayed conformance profile"); return "result"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: actionConformance File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-24301
MEDIUM
4.3
hapifhir/hapi-fhir
actionConformance
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
0
Analyze the following code function for security vulnerabilities
private void redirectService(HttpServletRequest request, HttpServletResponse response, String destination) { // Open the destination page try { if (destination.startsWith(MANUAL_JSON_RESPONSE_PREFIX)) { response.setHeader("Content-Type", MediaType.APPLICATION_JSON + "; charset=UTF-8"); response.setHeader("Cache-Control", "no-store"); //HTTP 1.1 response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", -1); response.getWriter().append(destination.substring(MANUAL_JSON_RESPONSE_PREFIX.length())); response.flushBuffer(); } else if (destination.startsWith("PRODUCES_")) { response.flushBuffer(); } else if (destination.startsWith("http") || destination.startsWith("ftp")) { response.sendRedirect(destination); } else { request.setAttribute("org.silverpeas.servlets.ComponentRequestRouter.requestURI", request.getRequestURI()); // set the session token so that is can be available for all JSPs in the case some of them // require it for some specific protected actions. Token token = getSynchronizerTokenService().getSessionToken(request); request.setAttribute(SynchronizerTokenService.SESSION_TOKEN_KEY, token.getValue()); RequestDispatcher requestDispatcher = getServletConfig().getServletContext().getRequestDispatcher(destination); if (requestDispatcher != null) { requestDispatcher.forward(request, response); } else { SilverLogger.getLogger(this) .warn("Web page dispatching failure: destination {0} not found!", destination); } } } catch (Exception e) { try { request.setAttribute("javax.servlet.jsp.jspException", new PeasCoreException("ComponentRequestRouter.redirectService", "peasCore.EX_REDIRECT_SERVICE_FAILED", "Destination=" + destination, e)); getServletConfig().getServletContext().getRequestDispatcher("/admin/jsp/errorpageMain.jsp") .forward(request, response); } catch (Exception ex) { SilverLogger.getLogger(this) .error("Web page dispatching to {0} failed: {1}", new String[]{destination, e.getMessage()}, e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: redirectService File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
redirectService
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
public void setLatlng(String latlng) { this.latlng = latlng; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLatlng File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setLatlng
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override protected List<Module> getCommandBindings(FeatureFlags featureFlags) { final ImmutableList.Builder<Module> modules = ImmutableList.builder(); modules.add( new VersionAwareStorageModule(), new ConfigurationModule(configuration), new MongoDBModule(), new ServerBindings(configuration, isMigrationCommand()), new ElasticsearchModule(), new PersistenceServicesBindings(), new MessageFilterBindings(), new MessageProcessorModule(), new AlarmCallbackBindings(), new InitializerBindings(), new MessageInputBindings(), new MessageOutputBindings(configuration, chainingClassLoader), new RotationStrategyBindings(elasticsearchConfiguration), new RetentionStrategyBindings(elasticsearchConfiguration), new PeriodicalBindings(), new ObjectMapperModule(chainingClassLoader), new RestApiBindings(configuration), new PasswordAlgorithmBindings(), new DecoratorBindings(), new AuditBindings(), new AlertConditionBindings(), new IndexerBindings(), new MigrationsModule(), new NetFlowPluginModule(), new CEFInputModule(), new SidecarModule(), new ContentPacksModule(), new ViewsBindings(), new JobSchedulerModule(), new EventsModule(), new EnterpriseModule(), new GRNTypesModule(), new SecurityModule(), new PrometheusMetricsModule(), new ClusterConfigValidatorModule(), new MapWidgetModule(), new SearchFiltersModule(), new ScopedEntitiesModule(), new ScriptingApiModule(featureFlags), new StreamsModule(), new TracingModule() ); return modules.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCommandBindings File: graylog2-server/src/main/java/org/graylog2/commands/Server.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
getCommandBindings
graylog2-server/src/main/java/org/graylog2/commands/Server.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
private void unwrapNonAppData(ChannelHandlerContext ctx, Channel channel) throws SSLException { unwrap(ctx, channel, ChannelBuffers.EMPTY_BUFFER, EMPTY_BUFFER, -1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unwrapNonAppData File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java Repository: netty The code follows secure coding practices.
[ "CWE-119" ]
CVE-2014-3488
MEDIUM
5
netty
unwrapNonAppData
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
2fa9400a59d0563a66908aba55c41e7285a04994
0
Analyze the following code function for security vulnerabilities
public void printPlace(Writer writer, SysSite site, String templatePath, CmsPlaceMetadata metadata) throws IOException, TemplateException { if (CommonUtils.notEmpty(templatePath)) { Map<String, Object> model = new HashMap<>(); exposePlace(site, templatePath, metadata, model); String templateFullPath = SiteComponent.getFullTemplatePath(site, INCLUDE_DIRECTORY + templatePath); FreeMarkerUtils.generateStringByFile(writer, templateFullPath, webConfiguration, model); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: printPlace File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-20914
CRITICAL
9.8
sanluan/PublicCMS
printPlace
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
0
Analyze the following code function for security vulnerabilities
public String remoteBranch() { return RefSpecHelper.remoteBranch(RefSpecHelper.expandRefSpec(branch)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remoteBranch File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
remoteBranch
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public static void jsFunction_updateAccessAllowDomains(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws APIManagementException, AxisFault { String accessToken = (String) args[0]; NativeArray accessAllowDomainsArr = (NativeArray) args[1]; String[] accessAllowDomainsArray = new String[(int) accessAllowDomainsArr.getLength()]; for (Object domain : accessAllowDomainsArr.getIds()) { int index = (Integer) domain; accessAllowDomainsArray[index] = (String) accessAllowDomainsArr.get(index, null); } // try { // APIConsumer apiConsumer = getAPIConsumer(thisObj); // apiConsumer.updateAccessAllowDomains(accessToken, accessAllowDomainsArray); // } catch (Exception e) { // handleException(e.getMessage(), e); // } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_updateAccessAllowDomains File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_updateAccessAllowDomains
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
public void failStage(Stage stage, Date completionDate) { for (JobInstance job : stage.getJobInstances()) { job.completing(Failed, completionDate); job.completed(completionDate); jobInstanceDao.updateStateAndResult(job); } stage.calculateResult(); updateResultInTransaction(stage, StageResult.Failed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: failStage File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
failStage
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
private boolean isDir(final Path path) { return Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDir 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
isDir
src/main/java/cloudsync/connector/LocalFilesystemConnector.java
3ad796833398af257c28e0ebeade68518e0e612a
0
Analyze the following code function for security vulnerabilities
public static String generateSecretKey() { SecureRandom random = new SecureRandom(); byte[] bytes = new byte[20]; random.nextBytes(bytes); Base32 base32 = new Base32(); return base32.encodeToString(bytes); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateSecretKey File: server-core/src/main/java/io/onedev/server/web/component/user/twofactorauthentication/TwoFactorAuthenticationSetupPanel.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
generateSecretKey
server-core/src/main/java/io/onedev/server/web/component/user/twofactorauthentication/TwoFactorAuthenticationSetupPanel.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
@Override public void setDeviceOwnerLockScreenInfo(ComponentName who, CharSequence info) { if (!mHasFeature) { return; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller)); mInjector.binderWithCleanCallingIdentity(() -> mLockPatternUtils.setDeviceOwnerInfo(info != null ? info.toString() : null)); DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_DEVICE_OWNER_LOCK_SCREEN_INFO) .setAdmin(caller.getComponentName()) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDeviceOwnerLockScreenInfo 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
setDeviceOwnerLockScreenInfo
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@TestOnly public void commit(String message) { String[] args = new String[]{"commit", "-m", message}; CommandLine gitCommit = gitWd().withArgs(args); runOrBomb(gitCommit); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: commit File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
commit
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private UserAccountBean getCurrentUser(HttpServletRequest request) { UserAccountBean ub = (UserAccountBean) request.getSession().getAttribute("userBean"); return ub; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentUser File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-24830
HIGH
7.5
OpenClinica
getCurrentUser
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
6f864e86543f903bd20d6f9fc7056115106441f3
0
Analyze the following code function for security vulnerabilities
private void showAskForPresenceDialog(final Contact contact) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(contact.getJid().toString()); builder.setMessage(R.string.request_presence_updates); builder.setNegativeButton(R.string.cancel, null); builder.setPositiveButton(R.string.request_now, (dialog, which) -> { if (xmppConnectionServiceBound) { xmppConnectionService.sendPresencePacket(contact .getAccount(), xmppConnectionService .getPresenceGenerator() .requestPresenceUpdatesFrom(contact)); } }); builder.create().show(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showAskForPresenceDialog File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
showAskForPresenceDialog
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public Jooby executor(final String name, final ExecutorService executor) { executor(name, (Executor) executor); onStop(r -> executor.shutdown()); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executor File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
executor
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public static Document parse(String input) throws InvalidSyntaxException { return new Parser().parseDocument(input); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse File: src/main/java/graphql/parser/Parser.java Repository: graphql-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-28867
HIGH
7.5
graphql-java
parse
src/main/java/graphql/parser/Parser.java
8a1c884c81c0b656db201cfd95881feb0f430a55
0
Analyze the following code function for security vulnerabilities
@Override public void killApplication(String pkg, int appId, int userId, String reason) { if (pkg == null) { return; } // Make sure the uid is valid. if (appId < 0) { Slog.w(TAG, "Invalid appid specified for pkg : " + pkg); return; } int callerUid = Binder.getCallingUid(); // Only the system server can kill an application if (UserHandle.getAppId(callerUid) == SYSTEM_UID) { // Post an aysnc message to kill the application Message msg = mHandler.obtainMessage(KILL_APPLICATION_MSG); msg.arg1 = appId; msg.arg2 = userId; Bundle bundle = new Bundle(); bundle.putString("pkg", pkg); bundle.putString("reason", reason); msg.obj = bundle; mHandler.sendMessage(msg); } else { throw new SecurityException(callerUid + " cannot kill pkg: " + pkg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killApplication 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
killApplication
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public FileResourceManager get() { String workDir = createTmpDir(); boolean urlEncodePath = false; final ByteArrayOutputStream stream = new ByteArrayOutputStream(1024); PrintWriter printWriter = new PrintWriter(stream) { @Override public void flush() { super.flush(); log.logFileResourceMessage(stream.toString()); } }; LoggerFacade logger = new PrintWriterLogger(printWriter, "", debug); return new FileResourceManager(storeDir, workDir, urlEncodePath, logger); }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2018-25068 - Severity: MEDIUM - CVSS Score: 6.5 Description: Feature #4100 Fix critical Vulnerability "File.createTempFile" should not be used to create a directory Function: get File: globalpomutils-fileresources/src/main/java/com/anrisoftware/globalpom/fileresourcemanager/FileResourceManagerProvider.java Repository: devent/globalpom-utils Fixed Code: @Override public FileResourceManager get() { String workDir = createTmpDir(); boolean urlEncodePath = false; final ByteArrayOutputStream stream = new ByteArrayOutputStream(1024); PrintWriter printWriter = new PrintWriter(stream) { @Override public void flush() { super.flush(); log.logFileResourceMessage(stream.toString()); } }; LoggerFacade logger = new PrintWriterLogger(printWriter, "", debug); return new FileResourceManager(storeDir, workDir, urlEncodePath, logger); }
[ "CWE-668" ]
CVE-2018-25068
MEDIUM
6.5
devent/globalpom-utils
get
globalpomutils-fileresources/src/main/java/com/anrisoftware/globalpom/fileresourcemanager/FileResourceManagerProvider.java
77a820bac2f68e662ce261ecb050c643bd7ee560
1
Analyze the following code function for security vulnerabilities
protected abstract String getFormat();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFormat File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
getFormat
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
public void setBundleTypesAllowedForStorage(Set<String> theBundleTypesAllowedForStorage) { Validate.notNull(theBundleTypesAllowedForStorage, "theBundleTypesAllowedForStorage must not be null"); myBundleTypesAllowedForStorage = theBundleTypesAllowedForStorage; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBundleTypesAllowedForStorage 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
setBundleTypesAllowedForStorage
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
public String getCallingPackage(IBinder token) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallingPackage File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getCallingPackage
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void registerPushResources(String contextPath) { ResourceBundleTracker resourceBoundleTracker = new PushResourceBundleTracker( webAppBundle, contextPath); resourceBoundleTracker.open(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerPushResources File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java Repository: vaadin/osgi The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
registerPushResources
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
0
Analyze the following code function for security vulnerabilities
final void compareWithInterface(InterfaceHandle left, Comparator c) { super.compareWithIndirect(left, c); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareWithInterface File: jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java Repository: eclipse-openj9/openj9 The code follows secure coding practices.
[ "CWE-440", "CWE-250" ]
CVE-2021-41035
HIGH
7.5
eclipse-openj9/openj9
compareWithInterface
jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java
c6e0d9296ff9a3084965d83e207403de373c0bad
0
Analyze the following code function for security vulnerabilities
public Boolean getReplyEmailsEnabled() { return replyEmailsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReplyEmailsEnabled File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getReplyEmailsEnabled
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private Jooby executor(final String name, final Class<? extends Provider<Executor>> provider) { this.executors.add(binder -> { binder.bind(Key.get(Executor.class, Names.named(name))).toProvider(provider) .in(Singleton.class); }); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executor File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
executor
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private void initAndSaveDocument(XWikiContext context, XWikiDocument newDocument, String title, String template, String parent) throws XWikiException { XWiki xwiki = context.getWiki(); DocumentReferenceResolver<String> resolver = getCurrentMixedDocumentReferenceResolver(); // Set the locale and default locale, considering that we're creating the original version of the document // (not a translation). newDocument.setLocale(Locale.ROOT); if (newDocument.getDefaultLocale() == Locale.ROOT) { newDocument.setDefaultLocale(xwiki.getLocalePreference(context)); } // Copy the template. DocumentReference templateReference = resolver.resolve(template); newDocument.readFromTemplate(templateReference, context); // Set the parent field. if (!StringUtils.isEmpty(parent)) { DocumentReference parentReference = resolver.resolve(parent); newDocument.setParentReference(parentReference); } // Set the document title if (title != null) { newDocument.setTitle(title); } // Set the author and creator. DocumentReference currentUserReference = context.getUserReference(); newDocument.setAuthorReference(currentUserReference); newDocument.setCreatorReference(currentUserReference); // Make sure the user is allowed to make this modification xwiki.checkSavingDocument(currentUserReference, newDocument, context); xwiki.saveDocument(newDocument, context); }
Vulnerability Classification: - CWE: CWE-862 - CVE: CVE-2022-23617 - Severity: MEDIUM - CVSS Score: 4.0 Description: XWIKI-18430: Page content is revealed to users that don't have rights if used as a template for the creation of another page Function: initAndSaveDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java Repository: xwiki/xwiki-platform Fixed Code: private void initAndSaveDocument(XWikiContext context, XWikiDocument newDocument, String title, String template, String parent) throws XWikiException { XWiki xwiki = context.getWiki(); // Set the locale and default locale, considering that we're creating the original version of the document // (not a translation). newDocument.setLocale(Locale.ROOT); if (newDocument.getDefaultLocale() == Locale.ROOT) { newDocument.setDefaultLocale(xwiki.getLocalePreference(context)); } // Copy the template. readFromTemplate(newDocument, template, context); // Set the parent field. if (!StringUtils.isEmpty(parent)) { DocumentReference parentReference = this.currentmixedReferenceResolver.resolve(parent); newDocument.setParentReference(parentReference); } // Set the document title if (title != null) { newDocument.setTitle(title); } // Set the author and creator. DocumentReference currentUserReference = context.getUserReference(); newDocument.setAuthorReference(currentUserReference); newDocument.setCreatorReference(currentUserReference); // Make sure the user is allowed to make this modification xwiki.checkSavingDocument(currentUserReference, newDocument, context); xwiki.saveDocument(newDocument, context); }
[ "CWE-862" ]
CVE-2022-23617
MEDIUM
4
xwiki/xwiki-platform
initAndSaveDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
30c52b01559b8ef5ed1035dac7c34aaf805764d5
1
Analyze the following code function for security vulnerabilities
public Builder setLookasideConfig(@IntRange(from = 0) final int slotSize, @IntRange(from = 0) final int slotCount) { Preconditions.checkArgument(slotSize >= 0, "lookasideSlotCount cannot be negative"); Preconditions.checkArgument(slotCount >= 0, "lookasideSlotSize cannot be negative"); Preconditions.checkArgument( (slotSize > 0 && slotCount > 0) || (slotCount == 0 && slotSize == 0), "Invalid configuration: " + slotSize + ", " + slotCount); mLookasideSlotSize = slotSize; mLookasideSlotCount = slotCount; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLookasideConfig File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
setLookasideConfig
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
Intent getHomeIntent() { Intent intent = new Intent(mTopAction, mTopData != null ? Uri.parse(mTopData) : null); intent.setComponent(mTopComponent); if (mFactoryTest != FactoryTest.FACTORY_TEST_LOW_LEVEL) { intent.addCategory(Intent.CATEGORY_HOME); } return intent; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHomeIntent 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
getHomeIntent
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public static Unmarshaller getUnmarshallerFor(final Object obj, final JAXBContext jaxbContext, boolean validate) { final Class<?> clazz = (Class<?>)(obj instanceof Class<?> ? obj : obj.getClass()); Unmarshaller unmarshaller = null; Map<Class<?>, Unmarshaller> unmarshallers = m_unMarshallers.get(); if (jaxbContext == null) { if (unmarshallers == null) { unmarshallers = new WeakHashMap<Class<?>, Unmarshaller>(); m_unMarshallers.set(unmarshallers); } if (unmarshallers.containsKey(clazz)) { LOG.trace("found unmarshaller for {}", clazz); unmarshaller = unmarshallers.get(clazz); } } if (unmarshaller == null) { try { if (jaxbContext == null) { unmarshaller = getContextFor(clazz).createUnmarshaller(); } else { unmarshaller = jaxbContext.createUnmarshaller(); } } catch (final JAXBException e) { throw EXCEPTION_TRANSLATOR.translate("creating XML marshaller", e); } } LOG.trace("created unmarshaller for {}", clazz); if (validate) { final Schema schema = getValidatorFor(clazz); if (schema == null) { LOG.trace("Validation is enabled, but no XSD found for class {}", clazz.getSimpleName()); } unmarshaller.setSchema(schema); } if (jaxbContext == null) unmarshallers.put(clazz, unmarshaller); return unmarshaller; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUnmarshallerFor File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-0871
MEDIUM
6.1
OpenNMS/opennms
getUnmarshallerFor
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
3c17231714e3d55809efc580a05734ed530f9ad4
0
Analyze the following code function for security vulnerabilities
private void setCurrentMacToFactoryMac(WifiConfiguration config) { MacAddress factoryMac = retrieveFactoryMacAddressAndStoreIfNecessary(); if (factoryMac == null) { Log.e(getTag(), "Fail to set factory MAC address. Factory MAC is null."); return; } String currentMacStr = mWifiNative.getMacAddress(mInterfaceName); if (!TextUtils.equals(currentMacStr, factoryMac.toString())) { if (mWifiNative.setStaMacAddress(mInterfaceName, factoryMac)) { mWifiNative.removeNetworkCachedDataIfNeeded(config.networkId, factoryMac); mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_MAC_CHANGE, config); } else { Log.e(getTag(), "Failed to set MAC address to " + "'" + factoryMac.toString() + "'"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCurrentMacToFactoryMac File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
setCurrentMacToFactoryMac
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private void enforcePhoneAccountIsRegisteredEnabled(PhoneAccountHandle phoneAccountHandle, UserHandle callingUserHandle) { PhoneAccount phoneAccount = mPhoneAccountRegistrar.getPhoneAccount(phoneAccountHandle, callingUserHandle); if(phoneAccount == null) { EventLog.writeEvent(0x534e4554, "26864502", Binder.getCallingUid(), "R"); throw new SecurityException("This PhoneAccountHandle is not registered for this user!"); } if(!phoneAccount.isEnabled()) { EventLog.writeEvent(0x534e4554, "26864502", Binder.getCallingUid(), "E"); throw new SecurityException("This PhoneAccountHandle is not enabled for this user!"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforcePhoneAccountIsRegisteredEnabled File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
enforcePhoneAccountIsRegisteredEnabled
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
@Override protected boolean isClearAllVisible() { return mNotificationStackScroller.isDismissViewVisible(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isClearAllVisible 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
isClearAllVisible
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
void dispatchOomAdjObserver(String msg) { OomAdjObserver observer; synchronized (mOomAdjObserverLock) { observer = mCurOomAdjObserver; } if (observer != null) { observer.onOomAdjMessage(msg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchOomAdjObserver File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
dispatchOomAdjObserver
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public CharSequence getTileLabel() { CharSequence label = mController.getWalletClient().getServiceLabel(); return label == null ? mLabel : label; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTileLabel File: packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21289
MEDIUM
5.5
android
getTileLabel
packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
7a5e51c918b7097be3c7e669e1825a4d159c4185
0
Analyze the following code function for security vulnerabilities
private void merge(JNLPClassLoader extLoader) { try { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AllPermission()); } } catch (SecurityException se) { throw new SecurityException("JNLPClassLoader() may only be called from trusted sources!"); } // jars for (URL u : extLoader.getURLs()) { addURL(u); } // Codebase addToCodeBaseLoader(extLoader.file.getCodeBase()); // native search paths for (File nativeDirectory : extLoader.nativeLibraryStorage.getSearchDirectories()) { nativeLibraryStorage.addSearchDirectory(nativeDirectory); } // security descriptors synchronized (jarLocationSecurityMap) { for (URL key : extLoader.jarLocationSecurityMap.keySet()) { jarLocationSecurityMap.put(key, extLoader.jarLocationSecurityMap.get(key)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: merge 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
merge
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
private JsonArray readArray(int depth) throws IOException { read(); JsonArray array=new JsonArray(); skipWhiteSpace(); if (readIf(']')) { return array; } do { skipWhiteSpace(); array.add(readValue(depth)); skipWhiteSpace(); } while (readIf(',')); if (!readIf(']')) { throw expected("',' or ']'"); } return array; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readArray File: src/main/org/hjson/JsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
readArray
src/main/org/hjson/JsonParser.java
91bef056d56bf968451887421c89a44af1d692ff
0
Analyze the following code function for security vulnerabilities
static Path cn1ShapeToAndroidPath(com.codename1.ui.geom.Shape shape, Path p) { //Path p = new Path(); p.rewind(); com.codename1.ui.geom.PathIterator it = shape.getPathIterator(); switch (it.getWindingRule()) { case GeneralPath.WIND_EVEN_ODD: p.setFillType(Path.FillType.EVEN_ODD); break; case GeneralPath.WIND_NON_ZERO: p.setFillType(Path.FillType.WINDING); break; } //p.setWindingRule(it.getWindingRule() == com.codename1.ui.geom.PathIterator.WIND_EVEN_ODD ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO); float[] buf = new float[6]; while (!it.isDone()) { int type = it.currentSegment(buf); switch (type) { case com.codename1.ui.geom.PathIterator.SEG_MOVETO: p.moveTo(buf[0], buf[1]); break; case com.codename1.ui.geom.PathIterator.SEG_LINETO: p.lineTo(buf[0], buf[1]); break; case com.codename1.ui.geom.PathIterator.SEG_QUADTO: p.quadTo(buf[0], buf[1], buf[2], buf[3]); break; case com.codename1.ui.geom.PathIterator.SEG_CUBICTO: p.cubicTo(buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); break; case com.codename1.ui.geom.PathIterator.SEG_CLOSE: p.close(); break; } it.next(); } return p; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cn1ShapeToAndroidPath 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
cn1ShapeToAndroidPath
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void interceptRequest(IHttpRequest theRequest) { assert myLastRequest == null; myLastRequest = theRequest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: interceptRequest File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-24301
MEDIUM
4.3
hapifhir/hapi-fhir
interceptRequest
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
0
Analyze the following code function for security vulnerabilities
public int getDocLength() { return vi[vi.length - 1] - vi[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDocLength File: core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
getDocLength
core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
@Override public void buildContextMenu(ContextMenu menu, Context context, ContextMenuParams params) { super.buildContextMenu(menu, context, params); for (TabObserver observer : mObservers) observer.onContextMenuShown(Tab.this, menu); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildContextMenu File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
buildContextMenu
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private String[] getParts(String encodedJWT) { String[] parts = encodedJWT.split("\\."); // Secured JWT XXXXX.YYYYY.ZZZZZ, Unsecured JWT XXXXX.YYYYY. if (parts.length == 3 || (parts.length == 2 && encodedJWT.endsWith("."))) { return parts; } throw new InvalidJWTException("The encoded JWT is not properly formatted. Expected a three part dot separated string."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParts File: src/main/java/org/primeframework/jwt/JWTDecoder.java Repository: FusionAuth/fusionauth-jwt The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000125
HIGH
7.5
FusionAuth/fusionauth-jwt
getParts
src/main/java/org/primeframework/jwt/JWTDecoder.java
0d94dcef0133d699f21d217e922564adbb83a227
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting String injectGetHomeRoleHolderAsUser(int userId) { List<String> roleHolders = mRoleManager.getRoleHoldersAsUser( RoleManager.ROLE_HOME, UserHandle.of(userId)); return roleHolders.isEmpty() ? null : roleHolders.get(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectGetHomeRoleHolderAsUser File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
injectGetHomeRoleHolderAsUser
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
private void createSession( final AuthenticationInfo authInfo ) { final Session session = this.context.get().getLocalScope().getSession(); if ( session != null ) { session.setAttribute( authInfo ); } if ( this.sessionTimeout != null ) { setSessionTimeout(); } }
Vulnerability Classification: - CWE: CWE-384 - CVE: CVE-2024-23679 - Severity: CRITICAL - CVSS Score: 9.8 Description: Invalidate old session after login #9253 (cherry picked from commit 0189975691e9e6407a9fee87006f730e84f734ff) Function: createSession File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp Fixed Code: private void createSession( final AuthenticationInfo authInfo ) { final LocalScope localScope = this.context.get().getLocalScope(); final Session session = localScope.getSession(); if ( session != null ) { final var attributes = session.getAttributes(); session.invalidate(); final Session newSession = localScope.getSession(); if ( newSession != null ) { attributes.forEach( newSession::setAttribute ); session.setAttribute( authInfo ); if ( this.sessionTimeout != null ) { setSessionTimeout(); } } } }
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
createSession
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
1f44674eb9ab3fbab7103e8d08067846e88bace4
1
Analyze the following code function for security vulnerabilities
public Boolean validateTextTrackSingleUseToken(String recordId, String caption, String token) { return recordingServiceHelper.validateTextTrackSingleUseToken(recordId, caption, token); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateTextTrackSingleUseToken File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java Repository: bigbluebutton The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-12443
HIGH
7.5
bigbluebutton
validateTextTrackSingleUseToken
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
b21ca8355a57286a1e6df96984b3a4c57679a463
0
Analyze the following code function for security vulnerabilities
public static void showThreads() { // Find the root thread group ThreadGroup root = Thread.currentThread().getThreadGroup(); while (root.getParent() != null) { root = root.getParent(); } // Visit each thread group visit(root, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showThreads File: src/main/java/org/lemsml/jlems/io/util/JUtil.java Repository: LEMS/jLEMS The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4583
HIGH
8.8
LEMS/jLEMS
showThreads
src/main/java/org/lemsml/jlems/io/util/JUtil.java
8c224637d7d561076364a9e3c2c375daeaf463dc
0
Analyze the following code function for security vulnerabilities
@Override public String render(XWikiContext context) throws XWikiException { try { return render(context.getRequest().getPathInfo(), context); } catch (IOException e) { context.getResponse().setStatus(404); return "docdoesnotexist"; } }
Vulnerability Classification: - CWE: CWE-287 - CVE: CVE-2022-36092 - Severity: HIGH - CVSS Score: 7.5 Description: XWIKI-19549: Disallow template override for login, register and skin * Also do not put a document without view rights into the context. Function: render File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java Repository: xwiki/xwiki-platform Fixed Code: @Override public String render(XWikiContext context) throws XWikiException { try { return render(context.getRequest().getPathInfo(), context); } catch (IOException e) { context.getResponse().setStatus(404); return DOCDOESNOTEXIST; } }
[ "CWE-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
render
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
1
Analyze the following code function for security vulnerabilities
protected void processFile(String fileName, String systemId) throws ValidationException, ParserConfigurationException, SAXException, IOException, SchedulerException, ClassNotFoundException, ParseException, XPathException { prepForProcessing(); log.info("Parsing XML file: " + fileName + " with systemId: " + systemId); InputSource is = new InputSource(getInputStream(fileName)); is.setSystemId(systemId); process(is); maybeThrowValidationException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processFile File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
processFile
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
private static String getActionString(int action) { final String msgType; switch (action) { case COMPOSE: msgType = "new_message"; break; case REPLY: msgType = "reply"; break; case REPLY_ALL: msgType = "reply_all"; break; case FORWARD: msgType = "forward"; break; default: msgType = "unknown"; break; } return msgType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActionString File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
getActionString
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public static void longToBigEndian(long value, byte[] in, int offset) { if (in == null) { throw new NullPointerException("in == null"); } if ((in.length - offset) < 8) { throw new IllegalArgumentException("not enough space in array"); } in[offset] = (byte)((value >> 56) & 0xff); in[offset + 1] = (byte)((value >> 48) & 0xff); in[offset + 2] = (byte)((value >> 40) & 0xff); in[offset + 3] = (byte)((value >> 32) & 0xff); in[offset + 4] = (byte)((value >> 24) & 0xff); in[offset + 5] = (byte)((value >> 16) & 0xff); in[offset + 6] = (byte)((value >> 8) & 0xff); in[offset + 7] = (byte)((value) & 0xff); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: longToBigEndian File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
longToBigEndian
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
public SearchCacheStatusEnum getCacheStatus() { return myCacheStatus; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCacheStatus File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getCacheStatus
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
public void clearRecentFailureReason(int netId) { WifiConfiguration config = getInternalConfiguredNetwork(netId); if (config == null) { return; } config.recentFailure.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearRecentFailureReason File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
clearRecentFailureReason
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public static List<CentralDirectoryRecord> parseZipCentralDirectory( DataSource apk, ApkUtils.ZipSections apkSections) throws IOException, ApkFormatException { return ZipUtils.parseZipCentralDirectory(apk, apkSections); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseZipCentralDirectory File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
parseZipCentralDirectory
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
@Override public ParceledListSlice<PhoneAccountHandle> getPhoneAccountsSupportingScheme( String uriScheme, String callingPackage) { try { Log.startSession("TSI.gPASS", Log.getPackageAbbreviation(callingPackage)); try { enforceModifyPermission( "getPhoneAccountsSupportingScheme requires MODIFY_PHONE_STATE"); } catch (SecurityException e) { EventLog.writeEvent(0x534e4554, "62347125", Binder.getCallingUid(), "getPhoneAccountsSupportingScheme: " + callingPackage); return ParceledListSlice.emptyList(); } synchronized (mLock) { final UserHandle callingUserHandle = Binder.getCallingUserHandle(); long token = Binder.clearCallingIdentity(); try { return new ParceledListSlice<>(mPhoneAccountRegistrar .getCallCapablePhoneAccounts(uriScheme, false, callingUserHandle)); } catch (Exception e) { Log.e(this, e, "getPhoneAccountsSupportingScheme %s", uriScheme); throw e; } finally { Binder.restoreCallingIdentity(token); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPhoneAccountsSupportingScheme File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
getPhoneAccountsSupportingScheme
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
@Override public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err, String[] args, ShellCallback callback, ResultReceiver resultReceiver) { new AccountManagerServiceShellCommand(this).exec(this, in, out, err, args, callback, resultReceiver); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onShellCommand File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
onShellCommand
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
private static void collectApkContentDigests( List<ApkSigningBlockUtils.Result.SignerInfo.ContentDigest> contentDigests, Map<ContentDigestAlgorithm, byte[]> apkContentDigests) { for (ApkSigningBlockUtils.Result.SignerInfo.ContentDigest contentDigest : contentDigests) { SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.findById(contentDigest.getSignatureAlgorithmId()); if (signatureAlgorithm == null) { continue; } ContentDigestAlgorithm contentDigestAlgorithm = signatureAlgorithm.getContentDigestAlgorithm(); apkContentDigests.put(contentDigestAlgorithm, contentDigest.getValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: collectApkContentDigests File: src/main/java/com/android/apksig/ApkVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
collectApkContentDigests
src/main/java/com/android/apksig/ApkVerifier.java
039f815895f62c9f8af23df66622b66246f3f61e
0
Analyze the following code function for security vulnerabilities
private ServletRequestHandler newGetHttpRequestHandler() { return new ServletRequestHandler() { /** {@inheritDoc} */ public JSONAware handleRequest(HttpServletRequest pReq, HttpServletResponse pResp) { return requestHandler.handleGetRequest(pReq.getRequestURI(),pReq.getPathInfo(), getParameterMap(pReq)); } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newGetHttpRequestHandler File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0168
MEDIUM
6.8
jolokia
newGetHttpRequestHandler
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationWithTypeInfo01() throws Exception { Duration duration = Duration.ofSeconds(13498L, 8374); String prefix = "[\"" + Duration.class.getName() + "\","; ObjectMapper mapper = newMapper(); mapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false); mapper.addMixIn(TemporalAmount.class, MockObjectConfiguration.class); TemporalAmount value = mapper.readValue(prefix + "13498.000008374]", TemporalAmount.class); assertNotNull("The value should not be null.", value); assertTrue("The value should be a Duration.", value instanceof Duration); assertEquals("The value is not correct.", duration, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationWithTypeInfo01 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationWithTypeInfo01
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
private void insertServiceTarget(ChooserTargetInfo chooserTargetInfo) { final float newScore = chooserTargetInfo.getModifiedScore(); for (int i = 0, N = mServiceTargets.size(); i < N; i++) { final ChooserTargetInfo serviceTarget = mServiceTargets.get(i); if (newScore > serviceTarget.getModifiedScore()) { mServiceTargets.add(i, chooserTargetInfo); return; } } mServiceTargets.add(chooserTargetInfo); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insertServiceTarget File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
insertServiceTarget
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
private static boolean isSystem(@Nullable ApplicationInfo ai) { return (ai != null) && (ai.flags & SYSTEM_APP_MASK) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSystem File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
isSystem
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0