instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public static void cursorIntToContentValues(Cursor cursor, String field, ContentValues values,
String key) {
int colIndex = cursor.getColumnIndex(field);
if (!cursor.isNull(colIndex)) {
values.put(key, cursor.getInt(colIndex));
} else {
values.put(key, (Integer) null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cursorIntToContentValues
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
cursorIntToContentValues
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void acknowledgeDeviceCompliant() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
enforceUserUnlocked(caller.getUserId());
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerLocked(caller);
if (admin.mProfileOffDeadline > 0) {
admin.mProfileOffDeadline = 0;
saveSettingsLocked(caller.getUserId());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: acknowledgeDeviceCompliant
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
|
acknowledgeDeviceCompliant
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void answerJSON(XWikiContext context, int status, Map<String, String> answer) throws XWikiException
{
ObjectMapper mapper = new ObjectMapper();
try {
String jsonAnswerAsString = mapper.writeValueAsString(answer);
context.getResponse().setContentType("application/json");
context.getResponse().setContentLength(jsonAnswerAsString.length());
context.getResponse().setStatus(status);
context.getResponse().setCharacterEncoding(context.getWiki().getEncoding());
context.getResponse().getWriter().print(jsonAnswerAsString);
} catch (IOException e) {
throw new XWikiException("Error while sending JSON answer.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: answerJSON
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
answerJSON
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeUserSession(String userSessionId, boolean offline) {
String offlineStr = offlineToString(offline);
em.createNamedQuery("deleteClientSessionsByUserSession")
.setParameter("userSessionId", userSessionId)
.setParameter("offline", offlineStr)
.executeUpdate();
PersistentUserSessionEntity sessionEntity = em.find(PersistentUserSessionEntity.class, new PersistentUserSessionEntity.Key(userSessionId, offlineStr), LockModeType.PESSIMISTIC_WRITE);
if (sessionEntity != null) {
em.remove(sessionEntity);
em.flush();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUserSession
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
removeUserSession
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
private AbstractAuthorityFactory createBackingStore0() throws FactoryException, SQLException {
/*
* We are locking on ReferencingFactoryFinder to avoid deadlocks.
* @see DeferredAuthorityFactory#getBackingStore()
*/
assert Thread.holdsLock(ReferencingFactoryFinder.class);
final Hints sourceHints = new Hints(hints);
sourceHints.putAll(factories.getImplementationHints());
if (datasource != null) {
return createBackingStore(sourceHints);
}
/*
* Try to gets the DataSource from JNDI. In case of success, it will be tried
* for a connection before any DataSource declared in META-INF/services/.
*/
DataSource source;
final InitialContext context;
try {
source = createDataSource();
context = registerInto;
} finally {
registerInto = null;
}
if (source == null) {
throw new FactoryNotFoundException(Errors.format(ErrorKeys.NO_DATA_SOURCE));
}
final AbstractAuthorityFactory factory;
try {
datasource = source;
factory = createBackingStore(sourceHints);
} finally {
datasource = null;
}
/*
* We now have a working connection. If a naming directory is running but didn't contains
* the "jdbc/EPSG" entry, add it now. In such case, a message is prepared and logged.
*/
LogRecord record;
if (ALLOW_REGISTRATION && context != null) {
try {
context.bind(datasourceName, source);
record =
Loggings.format(
Level.FINE,
LoggingKeys.CREATED_DATASOURCE_ENTRY_$1,
datasourceName);
} catch (NamingException exception) {
record =
Loggings.format(
Level.WARNING, LoggingKeys.CANT_BIND_DATASOURCE_$1, datasourceName);
record.setThrown(exception);
}
log(record);
}
this.datasource = source; // Stores the data source only after success.
return factory;
}
|
Vulnerability Classification:
- CWE: CWE-917
- CVE: CVE-2022-24818
- Severity: HIGH
- CVSS Score: 7.5
Description: [GEOT-7115] Streamline JNDI lookups
Function: createBackingStore0
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
Repository: geotools
Fixed Code:
private AbstractAuthorityFactory createBackingStore0() throws FactoryException, SQLException {
/*
* We are locking on ReferencingFactoryFinder to avoid deadlocks.
* @see DeferredAuthorityFactory#getBackingStore()
*/
assert Thread.holdsLock(ReferencingFactoryFinder.class);
final Hints sourceHints = new Hints(hints);
sourceHints.putAll(factories.getImplementationHints());
if (datasource != null) {
return createBackingStore(sourceHints);
}
/*
* Try to gets the DataSource from JNDI. In case of success, it will be tried
* for a connection before any DataSource declared in META-INF/services/.
*/
DataSource source = createDataSource();
if (source == null) {
throw new FactoryNotFoundException(Errors.format(ErrorKeys.NO_DATA_SOURCE));
}
final AbstractAuthorityFactory factory;
try {
datasource = source;
factory = createBackingStore(sourceHints);
} finally {
datasource = null;
}
this.datasource = source; // Stores the data source only after success.
return factory;
}
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
createBackingStore0
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 1
|
Analyze the following code function for security vulnerabilities
|
protected int getSubId() {
return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhone.mPhoneId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubId
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
|
getSubId
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParams(final Map<String, String> params) {
// check "format y" and "format y2"
String[] y_format_keys = {"format y", "format y2"};
for(String k : y_format_keys){
if(params.containsKey(k)){
params.put(k, URLDecoder.decode(params.get(k)));
}
}
this.params = params;
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2020-35476
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix remote code execution #2051 by adding regex validators for the
Gnuplot params and introducting the tsd.gnuplot.options.allowlist
setting that is a strict matching allow list of o= values from the
query string that will be allowed through. By default tihs is empty
so if folks are using this query param, they'll different graphs
until they add the options they need.
Function: setParams
File: src/graph/Plot.java
Repository: OpenTSDB/opentsdb
Fixed Code:
public void setParams(final Map<String, String> params) {
// check "format y" and "format y2"
String[] y_format_keys = {"format y", "format y2"};
for(String k : y_format_keys){
if(params.containsKey(k)){
params.put(k, params.get(k));
}
}
this.params = params;
}
|
[
"CWE-78"
] |
CVE-2020-35476
|
HIGH
| 7.5
|
OpenTSDB/opentsdb
|
setParams
|
src/graph/Plot.java
|
b762338664c3ee6e3f773bc04da2a8af24a5c486
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean updateCaCertificate(int networkId, @NonNull X509Certificate caCert,
@NonNull X509Certificate serverCert) {
WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
if (internalConfig == null) {
Log.e(TAG, "No network for network ID " + networkId);
return false;
}
if (!internalConfig.isEnterprise()) {
Log.e(TAG, "Network " + networkId + " is not an Enterprise network");
return false;
}
if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) {
Log.e(TAG, "Network " + networkId + " does not need verifying server cert");
return false;
}
if (null == caCert) {
Log.e(TAG, "Root CA cert is null");
return false;
}
if (null == serverCert) {
Log.e(TAG, "Server cert is null");
return false;
}
CertificateSubjectInfo serverCertInfo = CertificateSubjectInfo.parse(
serverCert.getSubjectDN().getName());
if (null == serverCertInfo) {
Log.e(TAG, "Invalid Server CA cert subject");
return false;
}
WifiConfiguration newConfig = new WifiConfiguration(internalConfig);
try {
if (newConfig.enterpriseConfig.isTrustOnFirstUseEnabled()) {
newConfig.enterpriseConfig.setCaCertificateForTrustOnFirstUse(caCert);
// setCaCertificate will mark that this CA certificate should be removed on
// removing this configuration.
newConfig.enterpriseConfig.enableTrustOnFirstUse(false);
} else {
newConfig.enterpriseConfig.setCaCertificate(caCert);
}
} catch (IllegalArgumentException ex) {
Log.e(TAG, "Failed to set CA cert: " + caCert);
return false;
}
// If there is a subject alternative name, it should be matched first.
String altSubjectNames = getAltSubjectMatchFromAltSubjectName(serverCert);
if (!TextUtils.isEmpty(altSubjectNames)) {
if (mVerboseLoggingEnabled) {
Log.d(TAG, "Set altSubjectMatch to " + altSubjectNames);
}
newConfig.enterpriseConfig.setAltSubjectMatch(altSubjectNames);
} else {
if (mVerboseLoggingEnabled) {
Log.d(TAG, "Set domainSuffixMatch to " + serverCertInfo.commonName);
}
newConfig.enterpriseConfig.setDomainSuffixMatch(serverCertInfo.commonName);
}
newConfig.enterpriseConfig.setUserApproveNoCaCert(false);
// Trigger an update to install CA certifiate and the corresponding configuration.
NetworkUpdateResult result = addOrUpdateNetwork(newConfig, internalConfig.creatorUid);
if (!result.isSuccess()) {
Log.e(TAG, "Failed to install CA cert for network " + internalConfig.SSID);
mFrameworkFacade.showToast(mContext, mContext.getResources().getString(
R.string.wifi_ca_cert_failed_to_install_ca_cert));
return false;
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21242
- Severity: CRITICAL
- CVSS Score: 9.8
Description: [TOFU] Validate full cert chains before displaying dialog
When a full chain including a Root CA is provided by the server,
perform a full validation of the chain before displaying the
TOFU dialog.
If validation passes: Display a TOFU dialog and ask the user if
they trust this network. Saying yes means that the Root can be
installed safely for that network. They might say no - this is
possible if an attacker creates a full chain they control which
results in a different SHA-256 (everything else looks correct).
If they say no, we stop the connection.
If validation fails: Display an error message saying that the
validation failed, we stop the connection and won't display the
TOFU dialog.
Use server certificate pinning for servers that send only a leaf
or a partial chain with no Root CA.
Additionally: clean up the debug logs to reduce the noise and
focus only on the important details.
Bug: 277824547
Test: atest InsecureEapNetworkHandler
Test: Connect to various Enterprise networks
Negative test: Confirm verification fails for invalid chains
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b0ee00ddf38bb677876a6cffb876e6f511e2c139)
Merged-In: I224c80e2787497634d3e68760122dac5f177585a
Change-Id: I224c80e2787497634d3e68760122dac5f177585a
Function: updateCaCertificate
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
Fixed Code:
public boolean updateCaCertificate(int networkId, @NonNull X509Certificate caCert,
@NonNull X509Certificate serverCert, String certHash) {
WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
if (internalConfig == null) {
Log.e(TAG, "No network for network ID " + networkId);
return false;
}
if (!internalConfig.isEnterprise()) {
Log.e(TAG, "Network " + networkId + " is not an Enterprise network");
return false;
}
if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) {
Log.e(TAG, "Network " + networkId + " does not need verifying server cert");
return false;
}
if (null == caCert) {
Log.e(TAG, "Root CA cert is null");
return false;
}
if (null == serverCert) {
Log.e(TAG, "Server cert is null");
return false;
}
CertificateSubjectInfo serverCertInfo = CertificateSubjectInfo.parse(
serverCert.getSubjectDN().getName());
if (null == serverCertInfo) {
Log.e(TAG, "Invalid Server CA cert subject");
return false;
}
WifiConfiguration newConfig = new WifiConfiguration(internalConfig);
try {
if (newConfig.enterpriseConfig.isTrustOnFirstUseEnabled()) {
if (TextUtils.isEmpty(certHash)) {
newConfig.enterpriseConfig.setCaCertificateForTrustOnFirstUse(caCert);
} else {
newConfig.enterpriseConfig.setServerCertificateHash(certHash);
}
newConfig.enterpriseConfig.enableTrustOnFirstUse(false);
} else {
// setCaCertificate will mark that this CA certificate should be removed on
// removing this configuration.
newConfig.enterpriseConfig.setCaCertificate(caCert);
}
} catch (IllegalArgumentException ex) {
Log.e(TAG, "Failed to set CA cert: " + caCert);
return false;
}
// If there is a subject alternative name, it should be matched first.
String altSubjectNames = getAltSubjectMatchFromAltSubjectName(serverCert);
if (!TextUtils.isEmpty(altSubjectNames)) {
if (mVerboseLoggingEnabled) {
Log.d(TAG, "Set altSubjectMatch to " + altSubjectNames);
}
newConfig.enterpriseConfig.setAltSubjectMatch(altSubjectNames);
} else {
if (mVerboseLoggingEnabled) {
Log.d(TAG, "Set domainSuffixMatch to " + serverCertInfo.commonName);
}
newConfig.enterpriseConfig.setDomainSuffixMatch(serverCertInfo.commonName);
}
newConfig.enterpriseConfig.setUserApproveNoCaCert(false);
// Trigger an update to install CA certificate and the corresponding configuration.
NetworkUpdateResult result = addOrUpdateNetwork(newConfig, internalConfig.creatorUid);
if (!result.isSuccess()) {
Log.e(TAG, "Failed to install CA cert for network " + internalConfig.SSID);
mFrameworkFacade.showToast(mContext, mContext.getResources().getString(
R.string.wifi_ca_cert_failed_to_install_ca_cert));
return false;
}
return true;
}
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
updateCaCertificate
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 1
|
Analyze the following code function for security vulnerabilities
|
public void sort(Object propertyId) {
sort(propertyId, SortDirection.ASCENDING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sort
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
sort
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
void setWindowScale(int requestedWidth, int requestedHeight) {
final boolean scaledWindow = (mAttrs.flags & FLAG_SCALED) != 0;
if (scaledWindow) {
// requested{Width|Height} Surface's physical size
// attrs.{width|height} Size on screen
// TODO: We don't check if attrs != null here. Is it implicitly checked?
mHScale = (mAttrs.width != requestedWidth) ?
(mAttrs.width / (float)requestedWidth) : 1.0f;
mVScale = (mAttrs.height != requestedHeight) ?
(mAttrs.height / (float)requestedHeight) : 1.0f;
} else {
mHScale = mVScale = 1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWindowScale
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
setWindowScale
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasNativeTheme() {
if (!testedNativeTheme) {
testedNativeTheme = true;
try {
InputStream is;
if (android.os.Build.VERSION.SDK_INT < 14 && !isTablet()) {
is = getResourceAsStream(getClass(), "/androidTheme.res");
} else {
is = getResourceAsStream(getClass(), "/android_holo_light.res");
}
nativeThemeAvailable = is != null;
if (is != null) {
is.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return nativeThemeAvailable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasNativeTheme
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
|
hasNativeTheme
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void addToZip(ZipOutputStream zos, boolean withVersions, XWikiContext context)
throws XWikiException, IOException
{
String zipname =
getDocumentReference().getLastSpaceReference().getName() + "/" + getDocumentReference().getName();
String language = getLanguage();
if (!StringUtils.isEmpty(language)) {
zipname += "." + language;
}
addToZip(zos, zipname, withVersions, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToZip
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
addToZip
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
void onStartingWindowDrawn() {
boolean wasTaskVisible = false;
if (task != null) {
mSplashScreenStyleSolidColor = true;
wasTaskVisible = task.getHasBeenVisible();
task.setHasBeenVisible(true);
}
// The transition may not be executed if the starting process hasn't attached. But if the
// starting window is drawn, the transition can start earlier. Exclude finishing and bubble
// because it may be a trampoline.
if (!wasTaskVisible && mStartingData != null && !finishing && !mLaunchedFromBubble
&& mVisibleRequested && !mDisplayContent.mAppTransition.isReady()
&& !mDisplayContent.mAppTransition.isRunning()
&& mDisplayContent.isNextTransitionForward()) {
// The pending transition state will be cleared after the transition is started, so
// save the state for launching the client later (used by LaunchActivityItem).
mStartingData.mIsTransitionForward = true;
// Ensure that the transition can run with the latest orientation.
if (this != mDisplayContent.getLastOrientationSource()) {
mDisplayContent.updateOrientation();
}
mDisplayContent.executeAppTransition();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStartingWindowDrawn
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
onStartingWindowDrawn
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private GameParseException newGameParseException(final String message, final @Nullable Throwable cause) {
final String gameName = data.getGameName() != null ? data.getGameName() : "<unknown>";
return new GameParseException(
String.format("map name: '%s', game name: '%s', %s", mapName, gameName, message),
cause);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newGameParseException
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
newGameParseException
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addToCodeBaseLoader(URL u) {
if (u == null) {
return;
}
// Only paths may be added
if (!u.getFile().endsWith("/")) {
throw new IllegalArgumentException("addToPathLoader only accepts path based URLs");
}
// If there is no loader yet, create one, else add it to the
// existing one (happens when called from merge())
if (codeBaseLoader == null) {
codeBaseLoader = new CodeBaseClassLoader(new URL[]{u}, this);
} else {
codeBaseLoader.addURL(u);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToCodeBaseLoader
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
|
addToCodeBaseLoader
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAgentQuery(String agentQuery) {
this.agentQuery = agentQuery;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAgentQuery
File: server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
setAgentQuery
|
server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
public String buildLockAdditionalOptions() {
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildLockAdditionalOptions
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
buildLockAdditionalOptions
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void forceUpdateUserSetupComplete(@UserIdInt int userId) {
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
boolean isUserCompleted = mInjector.settingsSecureGetIntForUser(
Settings.Secure.USER_SETUP_COMPLETE, 0, userId) != 0;
DevicePolicyData policy = getUserData(userId);
policy.mUserSetupComplete = isUserCompleted;
mStateCache.setDeviceProvisioned(isUserCompleted);
synchronized (getLockObject()) {
saveSettingsLocked(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceUpdateUserSetupComplete
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
forceUpdateUserSetupComplete
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleCPing() {
if (sendMessages(CPONG)) {
AjpReadListener.this.handleEvent(connection.getChannel().getSourceChannel());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleCPing
File: core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-252"
] |
CVE-2022-1319
|
HIGH
| 7.5
|
undertow-io/undertow
|
handleCPing
|
core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
|
1443a1a2bbb8e32e56788109d8285db250d55c8b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void processZipStream(File dir, InputStream inputStream) throws IOException
{
ZipInputStream zip = new ZipInputStream(inputStream);
while (true)
{
ZipEntry entry = zip.getNextEntry();
if (entry == null)
{
break;
}
File file = new File(dir, entry.getName());
if (entry.isDirectory())
{
FileHelper.mkdirsQuietly(file);
continue;
}
File parent = file.getParentFile();
if (parent != null)
{
FileHelper.mkdirsQuietly(parent);
}
FileOutputStream fos = new FileOutputStream(file);
byte[] bytes = new byte[1024];
int length;
while ((length = zip.read(bytes)) >= 0)
{
fos.write(bytes, 0, length);
}
fos.close();
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-35460
- Severity: MEDIUM
- CVSS Score: 5.0
Description: zip slip fix
Function: processZipStream
File: src/main/java/net/sf/mpxj/common/InputStreamHelper.java
Repository: joniles/mpxj
Fixed Code:
private static void processZipStream(File dir, InputStream inputStream) throws IOException
{
String canonicalDestinationDirPath = dir.getCanonicalPath();
ZipInputStream zip = new ZipInputStream(inputStream);
while (true)
{
ZipEntry entry = zip.getNextEntry();
if (entry == null)
{
break;
}
File file = new File(dir, entry.getName());
// https://snyk.io/research/zip-slip-vulnerability
String canonicalDestinationFile = file.getCanonicalPath();
if (!canonicalDestinationFile.startsWith(canonicalDestinationDirPath + File.separator))
{
throw new IOException("Entry is outside of the target dir: " + entry.getName());
}
if (entry.isDirectory())
{
FileHelper.mkdirsQuietly(file);
continue;
}
File parent = file.getParentFile();
if (parent != null)
{
FileHelper.mkdirsQuietly(parent);
}
FileOutputStream fos = new FileOutputStream(file);
byte[] bytes = new byte[1024];
int length;
while ((length = zip.read(bytes)) >= 0)
{
fos.write(bytes, 0, length);
}
fos.close();
}
}
|
[
"CWE-22"
] |
CVE-2020-35460
|
MEDIUM
| 5
|
joniles/mpxj
|
processZipStream
|
src/main/java/net/sf/mpxj/common/InputStreamHelper.java
|
8eaf4225048ea5ba7e59ef4556dab2098fcc4a1d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveTaskToRootTask(int taskId, int rootTaskId, boolean toTop) {
mActivityTaskManager.moveTaskToRootTask(taskId, rootTaskId, toTop);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToRootTask
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
|
moveTaskToRootTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<Notification> getPages() {
return mPages;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPages
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getPages
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void controller(FragmentConfiguration config, UiSessionContext sessionContext, UiUtils ui,
@SpringBean("htmlFormEntryService") HtmlFormEntryService htmlFormEntryService,
@SpringBean("adtService") AdtService adtService, @SpringBean("formService") FormService formService,
@SpringBean("coreResourceFactory") ResourceFactory resourceFactory,
@SpringBean("featureToggles") FeatureToggleProperties featureToggles, @FragmentParam("patient") Patient patient,
@FragmentParam(value = "htmlForm", required = false) HtmlForm hf,
@FragmentParam(value = "htmlFormId", required = false) Integer htmlFormId,
@FragmentParam(value = "formId", required = false) Form form,
@FragmentParam(value = "formUuid", required = false) String formUuid,
@FragmentParam(value = "definitionUiResource", required = false) String definitionUiResource,
@FragmentParam(value = "encounter", required = false) Encounter encounter,
@FragmentParam(value = "encounterDate", required = false) Date defaultEncounterDate, // allows specifying a default encounter date when adding a new encounter; should not be used with encounter param
@FragmentParam(value = "visit", required = false) Visit visit,
@FragmentParam(value = "createVisit", required = false) Boolean createVisit,
@FragmentParam(value = "returnUrl", required = false) String returnUrl,
@FragmentParam(value = "automaticValidation", defaultValue = "true") boolean automaticValidation,
FragmentModel model, HttpSession httpSession) throws Exception {
config.require("patient", "htmlForm | htmlFormId | formId | formUuid | definitionUiResource | encounter");
if (hf == null) {
if (htmlFormId != null) {
hf = htmlFormEntryService.getHtmlForm(htmlFormId);
} else if (form != null) {
hf = htmlFormEntryService.getHtmlFormByForm(form);
} else if (formUuid != null) {
form = formService.getFormByUuid(formUuid);
hf = htmlFormEntryService.getHtmlFormByForm(form);
} else if (StringUtils.isNotBlank(definitionUiResource)) {
hf = HtmlFormUtil.getHtmlFormFromUiResource(resourceFactory, formService, htmlFormEntryService,
definitionUiResource, encounter);
}
}
if (hf == null && encounter != null) {
form = encounter.getForm();
if (form == null) {
throw new IllegalArgumentException("Cannot view a form-less encounter unless you specify which form to use");
}
hf = HtmlFormEntryUtil.getService().getHtmlFormByForm(encounter.getForm());
if (hf == null)
throw new IllegalArgumentException("The form for the specified encounter (" + encounter.getForm()
+ ") does not have an HtmlForm associated with it");
}
if (hf == null)
throw new RuntimeException("Could not find HTML Form");
// the code below doesn't handle the HFFS case where you might want to _add_ data to an existing encounter
FormEntrySession fes;
if (encounter != null) {
fes = new FormEntrySession(patient, encounter, FormEntryContext.Mode.EDIT, hf, null, httpSession,
automaticValidation, !automaticValidation);
} else {
fes = new FormEntrySession(patient, hf, FormEntryContext.Mode.ENTER, null, httpSession, automaticValidation,
!automaticValidation);
}
VisitDomainWrapper visitDomainWrapper = getVisitDomainWrapper(visit, encounter, adtService);
setupVelocityContext(fes, visitDomainWrapper, ui, sessionContext, featureToggles);
setupFormEntrySession(fes, visitDomainWrapper, defaultEncounterDate, ui, sessionContext, returnUrl);
setupModel(model, fes, visitDomainWrapper, createVisit);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: controller
File: omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
Repository: openmrs/openmrs-module-htmlformentryui
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-4284
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-htmlformentryui
|
controller
|
omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
|
811990972ea07649ae33c4b56c61c3b520895f07
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Response fileContents(final java.nio.file.Path path) {
if (!Files.exists(path)) {
return Response.noContent().build();
}
try {
final String mimeType = Files.probeContentType(path);
return Response.ok(Files.readString(path, StandardCharsets.UTF_8))
.type(mimeType)
.header(HttpHeaders.CONTENT_DISPOSITION, path.getFileName().toString())
.header(HttpHeaders.LAST_MODIFIED, new Date(Files.getLastModifiedTime(path).toMillis()))
.build();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fileContents
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40315
|
HIGH
| 8
|
OpenNMS/opennms
|
fileContents
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
|
201301e067329ababa3c0671ded5c4c43347d4a8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void powerPress(long eventTime, boolean interactive, int count) {
if (mScreenOnEarly && !mScreenOnFully) {
Slog.i(TAG, "Suppressed redundant power key press while "
+ "already in the process of turning the screen on.");
return;
}
if (count == 2) {
powerMultiPressAction(eventTime, interactive, mDoublePressOnPowerBehavior);
} else if (count == 3) {
powerMultiPressAction(eventTime, interactive, mTriplePressOnPowerBehavior);
} else if (interactive && !mBeganFromNonInteractive) {
switch (mShortPressOnPowerBehavior) {
case SHORT_PRESS_POWER_NOTHING:
break;
case SHORT_PRESS_POWER_GO_TO_SLEEP:
mPowerManager.goToSleep(eventTime,
PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON, 0);
break;
case SHORT_PRESS_POWER_REALLY_GO_TO_SLEEP:
mPowerManager.goToSleep(eventTime,
PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON,
PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE);
break;
case SHORT_PRESS_POWER_REALLY_GO_TO_SLEEP_AND_GO_HOME:
mPowerManager.goToSleep(eventTime,
PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON,
PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE);
launchHomeFromHotKey();
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: powerPress
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
powerPress
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isTitleInCompatibilityMode()
{
return this.xwiki.isTitleInCompatibilityMode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTitleInCompatibilityMode
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
isTitleInCompatibilityMode
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean shouldUpRecreateTask(IBinder token, String destAffinity)
throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldUpRecreateTask
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
shouldUpRecreateTask
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reloadDomainNavigation(final HttpRequest request) {
request.setAttribute("reloadDomainNavigationFrame", true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reloadDomainNavigation
File: core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
reloadDomainNavigation
|
core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
int getThreadDefaultConnectionFlags(boolean readOnly) {
int flags = readOnly ? SQLiteConnectionPool.CONNECTION_FLAG_READ_ONLY :
SQLiteConnectionPool.CONNECTION_FLAG_PRIMARY_CONNECTION_AFFINITY;
if (isMainThread()) {
flags |= SQLiteConnectionPool.CONNECTION_FLAG_INTERACTIVE;
}
return flags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThreadDefaultConnectionFlags
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
|
getThreadDefaultConnectionFlags
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Registration addSortListener(
SortListener<GridSortOrder<T>> listener) {
return addListener(SortEvent.class, listener, SORT_ORDER_CHANGE_METHOD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSortListener
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
addSortListener
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init(
boolean forSigning,
CipherParameters param)
{
SecureRandom providedRandom = null;
if (forSigning)
{
if (param instanceof ParametersWithRandom)
{
ParametersWithRandom rParam = (ParametersWithRandom)param;
this.key = (DSAPrivateKeyParameters)rParam.getParameters();
providedRandom = rParam.getRandom();
}
else
{
this.key = (DSAPrivateKeyParameters)param;
}
}
else
{
this.key = (DSAPublicKeyParameters)param;
}
this.random = initSecureRandom(forSigning && !kCalculator.isDeterministic(), providedRandom);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000341
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
init
|
core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
|
acaac81f96fec91ab45bd0412beaf9c3acd8defa
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOemPrivate(boolean isOemPrivate) {
mIsOemPrivate = isOemPrivate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOemPrivate
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setOemPrivate
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void enter() {
Log.i(getTag(), "disconnectedstate enter");
// We don't scan frequently if this is a temporary disconnect
// due to p2p
if (mWifiP2pConnection.shouldTemporarilyDisconnectWifi()) {
// TODO(b/161569371): P2P should wait for all ClientModeImpls to enter
// DisconnectedState, not just one instance.
// (Does P2P Service support STA+P2P concurrency?)
mWifiP2pConnection.sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_RESPONSE);
return;
}
if (mVerboseLoggingEnabled) {
logd(" Enter DisconnectedState screenOn=" + mScreenOn);
}
/** clear the roaming state, if we were roaming, we failed */
mIsAutoRoaming = false;
mTargetNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
mWifiConnectivityManager.handleConnectionStateChanged(
mClientModeManager,
WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enter
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
|
enter
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isConfigForPasspoint(WifiConfiguration config) {
return config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PASSPOINT_R1_R2)
|| config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isConfigForPasspoint
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
|
isConfigForPasspoint
|
service/java/com/android/server/wifi/WifiConfigurationUtil.java
|
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAuthenticationError(int errMsgId, CharSequence errString) {
Log.w(TAG, "Authentication error: " + errMsgId + " " + errString);
onAuthenticationFailed();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAuthenticationError
File: app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
Repository: oxen-io/session-android
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-1955
|
LOW
| 2.1
|
oxen-io/session-android
|
onAuthenticationError
|
app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
|
c69b49e676dd8f619418cf296d6fdad9ce5a9510
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Path getDeployedBasePath() {
String dir = System.getProperty(LSP4XML_WORKDIR_KEY);
if (dir != null) {
return Paths.get(dir);
}
if (cachePathSetting != null && !cachePathSetting.isEmpty()) {
return Paths.get(cachePathSetting);
}
dir = System.getProperty("user.home");
if (dir == null) {
dir = System.getProperty("user.dir");
}
if (dir == null) {
dir = "";
}
return Paths.get(dir, ".lsp4xml");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeployedBasePath
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
getDeployedBasePath
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateDeviceOwner(String packageName) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(packageName);
mRemote.transact(UPDATE_DEVICE_OWNER_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDeviceOwner
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
updateDeviceOwner
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(pid);
data.writeInt(aboveSystem ? 1 : 0);
data.writeString(reason);
mRemote.transact(INPUT_DISPATCHING_TIMED_OUT_TRANSACTION, data, reply, 0);
reply.readException();
long res = reply.readInt();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inputDispatchingTimedOut
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
inputDispatchingTimedOut
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setScreenCaptureDisabled(int userHandle) {
int current = mPolicyCache.getScreenCaptureDisallowedUser();
if (userHandle == current) {
return;
}
mPolicyCache.setScreenCaptureDisallowedUser(userHandle);
updateScreenCaptureDisabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScreenCaptureDisabled
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
|
setScreenCaptureDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] getFileMD5Sum(final File file, final String algorithm) throws NoSuchAlgorithmException, IOException {
final MessageDigest md5;
InputStream is = null;
DigestInputStream dis = null;
try {
md5 = MessageDigest.getInstance(algorithm);
is = new FileInputStream(file);
dis = new DigestInputStream(is, md5);
md5.update(BasicFileUtils.toByteArray(dis));
} finally {
if (is != null) {
is.close();
}
if (dis != null) {
dis.close();
}
}
return md5.digest();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileMD5Sum
File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getFileMD5Sum
|
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static MessageDigest getMessageDigest(String algorithm)
throws NoSuchAlgorithmException {
return MessageDigest.getInstance(algorithm);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessageDigest
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
|
getMessageDigest
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBackgroundOpaque(boolean opaque) {
if (mNativeContentViewCore != 0) {
nativeSetBackgroundOpaque(mNativeContentViewCore, opaque);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBackgroundOpaque
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
setBackgroundOpaque
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void hidePopupsAndPreserveSelection() {
mUnselectAllOnActionModeDismiss = false;
hidePopups();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hidePopupsAndPreserveSelection
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
hidePopupsAndPreserveSelection
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected synchronized void releaseNativeResources() {
clear();
}
|
Vulnerability Classification:
- CWE: CWE-401
- CVE: CVE-2021-4213
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix memory leak on each TLS connection
Each TLS connection is leaking a bunch of data that isn't in the heap
and so after 25k requests Tomcat uses about 2.5GB resident memory.
There are large number of relationships that point at each other and we
need to break the cycle so JSSEngineReferenceImpl's finalizer can run
and clear all the native resources these point at.
The lowest impact place to break the cycle was at SSLAlertEvent.engine.
This relationship doesn't seem to be used anywhere. Once the cycle is
broken, JSSEngineReferenceImpl can be garbage collected and the
finalizer can run.
Signed-off-by: Chris Kelley <ckelley@redhat.com>
Function: releaseNativeResources
File: src/main/java/org/mozilla/jss/util/GlobalRefProxy.java
Repository: dogtagpki/jss
Fixed Code:
@Override
protected native void releaseNativeResources();
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
releaseNativeResources
|
src/main/java/org/mozilla/jss/util/GlobalRefProxy.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 1
|
Analyze the following code function for security vulnerabilities
|
public void handle(final HttpServletRequest request, final HttpServletResponse response)
throws Exception
{
new ContextualHttpServletRequest(request)
{
@Override
public void process() throws Exception
{
ServletContexts.instance().setRequest(request);
if (request.getQueryString() == null)
{
throw new ServletException("Invalid request - no component specified");
}
Set<Component> components = new HashSet<Component>();
Set<Type> types = new HashSet<Type>();
response.setContentType("text/javascript");
Enumeration e = request.getParameterNames();
while (e.hasMoreElements())
{
String componentName = ((String) e.nextElement()).trim();
Component component = Component.forName(componentName);
if (component == null)
{
try
{
Class c = Reflections.classForName(componentName);
appendClassSource(response.getOutputStream(), c, types);
}
catch (ClassNotFoundException ex)
{
log.error(String.format("Component not found: [%s]", componentName));
throw new ServletException("Invalid request - component not found.");
}
}
else
{
components.add(component);
}
}
generateComponentInterface(components, response.getOutputStream(), types);
}
}.run();
}
|
Vulnerability Classification:
- CWE: CWE-264, CWE-200
- CVE: CVE-2013-6447
- Severity: MEDIUM
- CVSS Score: 5.0
Description: https://issues.jboss.org/browse/WFK2-375 enhanced fix
git-svn-id: https://svn.jboss.org/repos/seam/branches/enterprise/WFK-2_1@15651 a9c07ecc-ef43-0410-a306-c911db474e88
Function: handle
File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
Repository: seam2/jboss-seam
Fixed Code:
public void handle(final HttpServletRequest request, final HttpServletResponse response)
throws Exception
{
new ContextualHttpServletRequest(request)
{
@Override
public void process() throws Exception
{
ServletContexts.instance().setRequest(request);
if (request.getQueryString() == null)
{
throw new ServletException("Invalid request - no component specified");
}
Set<Component> components = new HashSet<Component>();
Set<Type> types = new HashSet<Type>();
response.setContentType("text/javascript");
Enumeration e = request.getParameterNames();
while (e.hasMoreElements())
{
String componentName = ((String) e.nextElement()).trim();
Component component = Component.forName(componentName);
if (component == null)
{
log.error(String.format("Component not found: [%s]", componentName));
throw new ServletException("Invalid request - component not found.");
}
else
{
components.add(component);
}
}
generateComponentInterface(components, response.getOutputStream(), types);
}
}.run();
}
|
[
"CWE-264",
"CWE-200"
] |
CVE-2013-6447
|
MEDIUM
| 5
|
seam2/jboss-seam
|
handle
|
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
|
090aa6252affc978a96c388e3fc2c1c2688d9bb5
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean same(XWikiDocument document)
{
return document == this.doc || document == this.initialDoc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: same
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
same
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public String encodePassword(String rawPass, Object salt) throws DataAccessException {
return JBCRYPT_HEADER+JBCRYPT_ENCODER.encodePassword(rawPass,salt);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodePassword
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
encodePassword
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendCommentNotifications(Post parentPost, Comment comment, Profile commentAuthor, HttpServletRequest req) {
// send email notification to author of post except when the comment is by the same person
if (parentPost != null && comment != null) {
parentPost.setAuthor(pc.read(Profile.id(parentPost.getCreatorid()))); // parent author is not current user (authUser)
Map<String, Object> payload = new LinkedHashMap<>(ParaObjectUtils.getAnnotatedFields(comment, false));
payload.put("parent", parentPost);
payload.put("author", commentAuthor);
triggerHookEvent("comment.create", payload);
// get the last 5-6 commentators who want to be notified - https://github.com/Erudika/scoold/issues/201
Pager p = new Pager(1, Config._TIMESTAMP, false, 5);
boolean isCommentatorThePostAuthor = StringUtils.equals(parentPost.getCreatorid(), comment.getCreatorid());
Set<String> last5ids = pc.findChildren(parentPost, Utils.type(Comment.class),
"!(" + Config._CREATORID + ":\"" + comment.getCreatorid() + "\")", p).
stream().map(c -> c.getCreatorid()).distinct().collect(Collectors.toSet());
if (!isCommentatorThePostAuthor && !last5ids.contains(parentPost.getCreatorid())) {
last5ids = new HashSet<>(last5ids);
last5ids.add(parentPost.getCreatorid());
}
Map<String, String> lang = getLang(req);
List<Profile> last5commentators = pc.readAll(new ArrayList<>(last5ids));
last5commentators = last5commentators.stream().filter(u -> u.getCommentEmailsEnabled()).collect(Collectors.toList());
pc.readAll(last5commentators.stream().map(u -> u.getCreatorid()).collect(Collectors.toList())).forEach(author -> {
if (isCommentNotificationAllowed()) {
Map<String, Object> model = new HashMap<String, Object>();
String name = commentAuthor.getName();
String body = Utils.markdownToHtml(comment.getComment());
String pic = Utils.formatMessage("<img src='{0}' width='25'>",
escapeHtmlAttribute(avatarRepository.getLink(commentAuthor, AvatarFormat.Square25)));
String postURL = CONF.serverUrl() + parentPost.getPostLink(false, false);
String subject = Utils.formatMessage(lang.get("notification.comment.subject"), name, parentPost.getTitle());
model.put("subject", escapeHtml(subject));
model.put("logourl", getSmallLogoUrl());
model.put("heading", Utils.formatMessage(lang.get("notification.comment.heading"),
Utils.formatMessage("<a href='{0}'>{1}</a>", postURL, escapeHtml(parentPost.getTitle()))));
model.put("body", Utils.formatMessage("<h2>{0} {1}:</h2><div class='panel'>{2}</div>", pic, escapeHtml(name), body));
emailer.sendEmail(Arrays.asList(((User) author).getEmail()), subject, compileEmailTemplate(model));
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendCommentNotifications
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
sendCommentNotifications
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private static void collectionXmlGenerator(XmlGenerator gen, String type, Collection<? extends CollectionConfig> configs) {
if (CollectionUtil.isNotEmpty(configs)) {
for (CollectionConfig<? extends CollectionConfig> config : configs) {
gen.open(type, "name", config.getName())
.node("statistics-enabled", config.isStatisticsEnabled())
.node("max-size", config.getMaxSize())
.node("backup-count", config.getBackupCount())
.node("async-backup-count", config.getAsyncBackupCount())
.node("quorum-ref", config.getQuorumName());
appendItemListenerConfigs(gen, config.getItemListenerConfigs());
MergePolicyConfig mergePolicyConfig = config.getMergePolicyConfig();
gen.node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize())
.close();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectionXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
collectionXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void receiveLocalPresence(Map<String, Object> presence) {
String oortURL = (String)presence.get(SetiPresence.OORT_URL_FIELD);
boolean present = (Boolean)presence.get(SetiPresence.PRESENCE_FIELD);
Set<String> userIds = convertPresenceUsers(presence);
if (_logger.isDebugEnabled()) {
_logger.debug("Notifying presence listeners {}", presence);
}
for (String userId : userIds) {
if (present) {
notifyPresenceAdded(oortURL, userId);
} else {
notifyPresenceRemoved(oortURL, userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receiveLocalPresence
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
receiveLocalPresence
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
static BigDecimal objectToBigDecimal(Object val, BigDecimal defaultValue) {
return objectToBigDecimal(val, defaultValue, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: objectToBigDecimal
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
objectToBigDecimal
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateVoterInfo(Voter voter) {
// TODO Auto-generated method stub
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateVoterInfo
File: src/com/bijay/onlinevotingsystem/dao/VoterDaoImpl.java
Repository: bijaythapaa/OnlineVotingSystem
The code follows secure coding practices.
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
updateVoterInfo
|
src/com/bijay/onlinevotingsystem/dao/VoterDaoImpl.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void adjustMagnitude(int delta) {
if (precision != 0) {
scale = Utility.addExact(scale, delta);
origDelta = Utility.addExact(origDelta, delta);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustMagnitude
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
adjustMagnitude
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public ImportResponse importSPApplication(SpFileContent spFileContent, String tenantDomain, String username,
boolean isUpdate) throws IdentityApplicationManagementException {
if (log.isDebugEnabled()) {
log.debug("Importing service provider from file " + spFileContent.getFileName());
}
ServiceProvider serviceProvider = unmarshalSP(spFileContent, tenantDomain);
ImportResponse importResponse = importSPApplication(serviceProvider, tenantDomain, username, isUpdate);
if (log.isDebugEnabled()) {
log.debug(String.format("Service provider %s@%s created successfully from file %s",
serviceProvider.getApplicationName(), tenantDomain, spFileContent.getFileName()));
}
return importResponse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: importSPApplication
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
importSPApplication
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isJ9Jvm() {
return IS_J9_JVM;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJ9Jvm
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
isJ9Jvm
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaServletFilter setError(SaFilterErrorStrategy error) {
this.error = error;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setError
File: sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
setError
|
sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setWidth(final int width) {
super.setWidth(width);
final int currH = getHeight();
if(nativeVideo != null){
activity.runOnUiThread(new Runnable() {
public void run() {
float nh = nativeVideo.getHeight();
float nw = nativeVideo.getWidth();
float w = width;
float h = currH;
if (nh != 0 && nw != 0) {
h = width * nh / nw;
if (h > getHeight()) {
h = getHeight();
w = h * nw / nh;
}
if (w > getWidth()) {
w = getWidth();
h = w * nh / nw;
}
}
RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams((int)w, (int)h);
layout.addRule(RelativeLayout.CENTER_HORIZONTAL);
layout.addRule(RelativeLayout.CENTER_VERTICAL);
nativeVideo.setLayoutParams(layout);
nativeVideo.requestLayout();
nativeVideo.getHolder().setSizeFromLayout();
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWidth
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
|
setWidth
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateStatusBarVisibilityLocked(int visibility) {
if (mLastDispatchedSystemUiVisibility == visibility) {
return;
}
final int globalDiff = (visibility ^ mLastDispatchedSystemUiVisibility)
// We are only interested in differences of one of the
// clearable flags...
& View.SYSTEM_UI_CLEARABLE_FLAGS
// ...if it has actually been cleared.
& ~visibility;
mLastDispatchedSystemUiVisibility = visibility;
mInputManager.setSystemUiVisibility(visibility);
final WindowList windows = getDefaultWindowListLocked();
final int N = windows.size();
for (int i = 0; i < N; i++) {
WindowState ws = windows.get(i);
try {
int curValue = ws.mSystemUiVisibility;
int diff = (curValue ^ visibility) & globalDiff;
int newValue = (curValue&~diff) | (visibility&diff);
if (newValue != curValue) {
ws.mSeq++;
ws.mSystemUiVisibility = newValue;
}
if (newValue != curValue || ws.mAttrs.hasSystemUiListeners) {
ws.mClient.dispatchSystemUiVisibilityChanged(ws.mSeq,
visibility, newValue, diff);
}
} catch (RemoteException e) {
// so sorry
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateStatusBarVisibilityLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
updateStatusBarVisibilityLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T addBoolean(K name, boolean value) {
return add(name, fromBoolean(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addBoolean
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
addBoolean
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void add(TopLevelItem item) {
items.put(item.getName(),item);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: add
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
add
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
void convertUpstreamBuildTrigger(Set<AbstractProject> upstream) throws IOException {
SecurityContext saveCtx = ACL.impersonate(ACL.SYSTEM);
try {
for (AbstractProject<?,?> p : Jenkins.getInstance().getAllItems(AbstractProject.class)) {
// Don't consider child projects such as MatrixConfiguration:
if (!p.isConfigurable()) continue;
boolean isUpstream = upstream.contains(p);
synchronized(p) {
// does 'p' include us in its BuildTrigger?
DescribableList<Publisher,Descriptor<Publisher>> pl = p.getPublishersList();
BuildTrigger trigger = pl.get(BuildTrigger.class);
List<AbstractProject> newChildProjects = trigger == null ? new ArrayList<AbstractProject>():trigger.getChildProjects(p);
if(isUpstream) {
if(!newChildProjects.contains(this))
newChildProjects.add(this);
} else {
newChildProjects.remove(this);
}
if(newChildProjects.isEmpty()) {
pl.remove(BuildTrigger.class);
} else {
// here, we just need to replace the old one with the new one,
// but there was a regression (we don't know when it started) that put multiple BuildTriggers
// into the list. For us not to lose the data, we need to merge them all.
List<BuildTrigger> existingList = pl.getAll(BuildTrigger.class);
BuildTrigger existing;
switch (existingList.size()) {
case 0:
existing = null;
break;
case 1:
existing = existingList.get(0);
break;
default:
pl.removeAll(BuildTrigger.class);
Set<AbstractProject> combinedChildren = new HashSet<AbstractProject>();
for (BuildTrigger bt : existingList)
combinedChildren.addAll(bt.getChildProjects(p));
existing = new BuildTrigger(new ArrayList<AbstractProject>(combinedChildren),existingList.get(0).getThreshold());
pl.add(existing);
break;
}
if(existing!=null && existing.hasSame(p,newChildProjects))
continue; // no need to touch
pl.replace(new BuildTrigger(newChildProjects,
existing==null? Result.SUCCESS:existing.getThreshold()));
}
}
}
} finally {
SecurityContextHolder.setContext(saveCtx);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertUpstreamBuildTrigger
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-2058
|
MEDIUM
| 6.5
|
jenkinsci/jenkins
|
convertUpstreamBuildTrigger
|
core/src/main/java/hudson/model/AbstractProject.java
|
b6b2a367a7976be80a799c6a49fa6c58d778b50e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void readBigIntegerToBcd(BigInteger input);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readBigIntegerToBcd
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
readBigIntegerToBcd
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public UserviewSetting getUserviewSetting(AppDefinition appDef, String json) {
UserviewSetting setting = null;
//process json with hash variable
json = AppUtil.processHashVariable(json, null, StringUtil.TYPE_JSON, null, appDef);
User currentUser = workflowUserManager.getCurrentUser();
Map<String, Object> requestParameters = new HashMap<String, Object>();
requestParameters.put("appId", appDef.getAppId());
requestParameters.put("appVersion", appDef.getVersion().toString());
Userview userview = new Userview();
try {
//set userview properties
JSONObject userviewObj = new JSONObject(json);
userview.setProperties(PropertyUtil.getPropertiesValueFromJson(userviewObj.getJSONObject("properties").toString()));
//set Setting
JSONObject settingObj = userviewObj.getJSONObject("setting");
setting = new UserviewSetting();
setting.setProperties(PropertyUtil.getPropertiesValueFromJson(settingObj.getJSONObject("properties").toString()));
//set theme & permission
try {
JSONObject themeObj = settingObj.getJSONObject("properties").getJSONObject("theme");
UserviewTheme theme = (UserviewTheme) pluginManager.getPlugin(themeObj.getString("className"));
theme.setProperties(PropertyUtil.getPropertiesValueFromJson(themeObj.getJSONObject("properties").toString()));
theme.setRequestParameters(requestParameters);
theme.setUserview(userview);
setting.setTheme(theme);
} catch (Exception e) {
LogUtil.debug(getClass().getName(), "set theme error.");
}
try {
if (!"true".equals(setting.getPropertyString("tempDisablePermissionChecking"))) {
JSONObject permissionObj = settingObj.getJSONObject("properties").getJSONObject("permission");
Permission permission = null;
String permissionClassName = permissionObj.getString("className");
if (permissionClassName != null && !permissionClassName.isEmpty()) {
permission = (Permission) pluginManager.getPlugin(permissionClassName);
}
if (permission != null) {
permission.setProperties(PropertyUtil.getPropertiesValueFromJson(permissionObj.getJSONObject("properties").toString()));
permission.setRequestParameters(requestParameters);
permission.setCurrentUser(currentUser);
setting.setPermission(permission);
}
}
} catch (Exception e) {
LogUtil.debug(getClass().getName(), "set permission error.");
}
userview.setSetting(setting);
} catch (Exception ex) {
LogUtil.debug(getClass().getName(), "set userview setting error.");
}
return setting;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserviewSetting
File: wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getUserviewSetting
|
wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void createClass(BaseClass xclass)
{
super.createClass(xclass);
xclass.addTextAreaField("highlight", "Highlighted Text", 40, 2);
xclass.addNumberField("replyto", "Reply To", 5, "integer");
String commentPropertyName = "comment";
xclass.addTextAreaField(commentPropertyName, "Comment", 40, 5);
// FIXME: Ensure that the comment text editor is set to its default value after an upgrade. This should be
// handled in a cleaner way in BaseClass#addTextAreaField. See: https://jira.xwiki.org/browse/XWIKI-17605
TextAreaClass comment = (TextAreaClass) xclass.getField(commentPropertyName);
comment.setEditor((String) null);
}
|
Vulnerability Classification:
- CWE: CWE-269
- CVE: CVE-2023-26475
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20384: Use the new textarea restricted setup in comments
Function: createClass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/mandatory/XWikiCommentsDocumentInitializer.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
protected void createClass(BaseClass xclass)
{
super.createClass(xclass);
xclass.addTextAreaField("highlight", "Highlighted Text", 40, 2);
xclass.addNumberField("replyto", "Reply To", 5, "integer");
String commentPropertyName = "comment";
xclass.addTextAreaField(commentPropertyName, "Comment", 40, 5, true);
// FIXME: Ensure that the comment text editor is set to its default value after an upgrade. This should be
// handled in a cleaner way in BaseClass#addTextAreaField. See: https://jira.xwiki.org/browse/XWIKI-17605
TextAreaClass comment = (TextAreaClass) xclass.getField(commentPropertyName);
comment.setEditor((String) null);
}
|
[
"CWE-269"
] |
CVE-2023-26475
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/mandatory/XWikiCommentsDocumentInitializer.java
|
d87d7bfd8db18c20d3264f98c6deefeae93b99f7
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getAllowlistedRestrictedPermissions(String packageName,
int flags, int userId) {
return mPermissionManagerServiceImpl.getAllowlistedRestrictedPermissions(packageName,
flags, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllowlistedRestrictedPermissions
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
|
getAllowlistedRestrictedPermissions
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void configureHomeButton() {
final ActionBar actionBar = getSupportActionBar();
if (actionBar == null) {
return;
}
boolean openConversations = !xmppConnectionService.isConversationsListEmpty(null);
actionBar.setDisplayHomeAsUpEnabled(openConversations);
actionBar.setDisplayHomeAsUpEnabled(openConversations);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureHomeButton
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
configureHomeButton
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String readLine() throws IOException {
return primitiveTypes.readLine();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLine
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readLine
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return this.path.hashCode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: src/main/java/spark/resource/ClassPathResource.java
Repository: perwendel/spark
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-9159
|
MEDIUM
| 5
|
perwendel/spark
|
hashCode
|
src/main/java/spark/resource/ClassPathResource.java
|
a221a864db28eb736d36041df2fa6eb8839fc5cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String buildSqlQuery( Set<String> uids, Set<String> userOrgUnitPaths, User currentUser )
{
Stream<String> queryParts = Stream.of(
SHARING_OUTER_QUERY_BEGIN,
innerQueryProvider( uids, userOrgUnitPaths, currentUser ),
SHARING_OUTER_QUERY_END );
if ( nonSuperUser( currentUser ) )
{
queryParts = Stream.concat(
queryParts,
Stream.of(
"where",
getSharingConditions( LIKE_READ_METADATA ) ) );
}
return queryParts.collect( joining( " " ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSqlQuery
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
buildSqlQuery
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isManagingMemberships() {
return !(getGroupRetrieval() instanceof DoNotRetrieveGroups);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManagingMemberships
File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-90"
] |
CVE-2021-32651
|
MEDIUM
| 4.3
|
theonedev/onedev
|
isManagingMemberships
|
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
|
4440f0c57e440488d7e653417b2547eaae8ad19c
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private void throwIfParentInstance(String functionName) {
if (mParentInstance) {
throw new SecurityException(functionName + " cannot be called on the parent instance");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: throwIfParentInstance
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
throwIfParentInstance
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void clearProperties() throws JMSException {
this.userJmsProperties.clear();
this.setReadOnlyProperties(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearProperties
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
clearProperties
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleZentaoBugStatus(MultiValueMap<String, Object> param) {
if (!param.containsKey("status")) {
return;
}
List<Object> status = param.get("status");
if (CollectionUtils.isEmpty(status)) {
return;
}
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String str = (String) status.get(0);
if (StringUtils.equals(str, "resolved")) {
param.add("resolvedDate", format.format(new Date()));
} else if (StringUtils.equals(str, "closed")) {
param.add("closedDate", format.format(new Date()));
if (!param.containsKey("resolution")) {
// 解决方案默认为已解决
param.add("resolution", "fixed");
}
}
} catch (Exception e) {
//
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleZentaoBugStatus
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
handleZentaoBugStatus
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAppWidgetInstanceLocked(Widget widget, RemoteViews views,
boolean isPartialUpdate) {
if (widget != null && widget.provider != null
&& !widget.provider.zombie && !widget.host.zombie) {
if (isPartialUpdate && widget.views != null) {
// For a partial update, we merge the new RemoteViews with the old.
widget.views.mergeRemoteViews(views);
} else {
// For a full update we replace the RemoteViews completely.
widget.views = views;
}
scheduleNotifyUpdateAppWidgetLocked(widget, views);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAppWidgetInstanceLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
updateAppWidgetInstanceLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public static DevModeHandler getDevModeHandler() {
return atomicHandler.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDevModeHandler
File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
getDevModeHandler
|
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
private void xss(final Env env) {
Escaper ufe = UrlEscapers.urlFragmentEscaper();
Escaper fpe = UrlEscapers.urlFormParameterEscaper();
Escaper pse = UrlEscapers.urlPathSegmentEscaper();
Escaper html = HtmlEscapers.htmlEscaper();
env.xss("urlFragment", ufe::escape)
.xss("formParam", fpe::escape)
.xss("pathSegment", pse::escape)
.xss("html", html::escape);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xss
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
|
xss
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParamIsPopup(String value) {
m_paramIsPopup = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParamIsPopup
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
setParamIsPopup
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isValidSingletonCall(int callingUid, int componentUid) {
int componentAppId = UserHandle.getAppId(componentUid);
return UserHandle.isSameApp(callingUid, componentUid)
|| componentAppId == Process.SYSTEM_UID
|| componentAppId == Process.PHONE_UID
|| ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL, componentUid)
== PackageManager.PERMISSION_GRANTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidSingletonCall
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
|
isValidSingletonCall
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PersistableBundle restoreFromXml(TypedXmlPullParser in) throws IOException,
XmlPullParserException {
final int outerDepth = in.getDepth();
final String startTag = in.getName();
final String[] tagName = new String[1];
int event;
while (((event = in.next()) != XmlPullParser.END_DOCUMENT) &&
(event != XmlPullParser.END_TAG || in.getDepth() < outerDepth)) {
if (event == XmlPullParser.START_TAG) {
return new PersistableBundle((ArrayMap<String, Object>)
XmlUtils.readThisArrayMapXml(in, startTag, tagName,
new MyReadMapCallback()));
}
}
return new PersistableBundle(); // An empty mutable PersistableBundle
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-40074
- Severity: MEDIUM
- CVSS Score: 5.5
Description: RESTRICT AUTOMERGE: Drop invalid data.
Drop invalid data when writing or reading from XML. PersistableBundle
does lazy unparcelling, so checking the values during unparcelling would
remove the benefit of the lazy unparcelling. Checking the validity when
writing to or reading from XML seems like the best alternative.
Bug: 246542285
Bug: 247513680
Test: install test app with invalid job config, start app to schedule job, then check logcat and jobscheduler persisted file
(cherry picked from commit 666e8ac60a31e2cc52b335b41004263f28a8db06)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3c5aa21b4df54c0c0fcbcf00d1b62fa771022146)
Merged-In: Ie817aa0993e9046cb313a750d2323cadc8c1ef15
Change-Id: Ie817aa0993e9046cb313a750d2323cadc8c1ef15
Function: restoreFromXml
File: core/java/android/os/PersistableBundle.java
Repository: android
Fixed Code:
public static PersistableBundle restoreFromXml(TypedXmlPullParser in) throws IOException,
XmlPullParserException {
final int outerDepth = in.getDepth();
final String startTag = in.getName();
final String[] tagName = new String[1];
int event;
while (((event = in.next()) != XmlPullParser.END_DOCUMENT) &&
(event != XmlPullParser.END_TAG || in.getDepth() < outerDepth)) {
if (event == XmlPullParser.START_TAG) {
// Don't throw an exception when restoring from XML since an attacker could try to
// input invalid data in the persisted file.
return new PersistableBundle((ArrayMap<String, Object>)
XmlUtils.readThisArrayMapXml(in, startTag, tagName,
new MyReadMapCallback()),
/* throwException */ false);
}
}
return new PersistableBundle(); // An empty mutable PersistableBundle
}
|
[
"CWE-Other"
] |
CVE-2023-40074
|
MEDIUM
| 5.5
|
android
|
restoreFromXml
|
core/java/android/os/PersistableBundle.java
|
40e4ea759743737958dde018f3606d778f7a53f3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public CipherState fork(byte[] key, int offset) {
CipherState cipher = new ChaChaPolyCipherState();
cipher.initializeKey(key, offset);
return cipher;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fork
File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
Repository: rweather/noise-java
The code follows secure coding practices.
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
fork
|
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 0
|
Analyze the following code function for security vulnerabilities
|
public UIComponent createComponent(FacesContext context, String componentType, String rendererType) {
return createComponentApplyAnnotations(context, componentType, rendererType, true);
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-14371
- Severity: MEDIUM
- CVSS Score: 5.0
Description: fixing CTS failure issue in master branch
Function: createComponent
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
Fixed Code:
public UIComponent createComponent(FacesContext context, String componentType, String rendererType) {
notNull(CONTEXT, context);
notNull(COMPONENT_TYPE, componentType);
return createComponentApplyAnnotations(context, componentType, rendererType, true);
}
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
createComponent
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 1
|
Analyze the following code function for security vulnerabilities
|
public void cancelRequest(SyncRequest request) {
SyncManager syncManager = getSyncManager();
if (syncManager == null) return;
int userId = UserHandle.getCallingUserId();
long identityToken = clearCallingIdentity();
try {
SyncStorageEngine.EndPoint info;
Bundle extras = new Bundle(request.getBundle());
Account account = request.getAccount();
String provider = request.getProvider();
info = new SyncStorageEngine.EndPoint(account, provider, userId);
if (request.isPeriodic()) {
// Remove periodic sync.
mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS,
"no permission to write the sync settings");
getSyncManager().getSyncStorageEngine().removePeriodicSync(info, extras);
}
// Cancel active syncs and clear pending syncs from the queue.
syncManager.cancelScheduledSyncOperation(info, extras);
syncManager.cancelActiveSync(info, extras);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelRequest
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
cancelRequest
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void handleNewKeys(int cmd, Buffer buffer) throws Exception {
boolean debugEnabled = log.isDebugEnabled();
if (debugEnabled) {
log.debug("handleNewKeys({}) SSH_MSG_NEWKEYS command={}",
this, SshConstants.getCommandMessageName(cmd));
}
validateKexState(cmd, KexState.KEYS);
// It is guaranteed that we handle the peer's SSH_MSG_NEWKEYS after having sent our own.
// prepareNewKeys() was already called in sendNewKeys().
//
// From now on, use the new settings for any incoming message.
setInputEncoding();
synchronized (kexState) {
kexInitializedFuture = null;
}
initialKexDone = true;
DefaultKeyExchangeFuture kexFuture = kexFutureHolder.get();
if (kexFuture != null) {
kexFuture.setValue(Boolean.TRUE);
}
signalSessionEvent(SessionListener.Event.KeyEstablished);
kexHandler.updateState(() -> {
kex = null; // discard and GC since KEX is completed
kexState.set(KexState.DONE);
});
synchronized (futureLock) {
futureLock.notifyAll();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNewKeys
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
handleNewKeys
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateIccAvailability() {
if (null == mUiccController) {
return;
}
CardState newState = CardState.CARDSTATE_ABSENT;
UiccCard newCard = mUiccController.getUiccCard(mSlotId);
if (newCard != null) {
newState = newCard.getCardState();
}
CardState oldState = mCardState;
mCardState = newState;
CatLog.d(this,"New Card State = " + newState + " " + "Old Card State = " + oldState);
if (oldState == CardState.CARDSTATE_PRESENT &&
newState != CardState.CARDSTATE_PRESENT) {
broadcastCardStateAndIccRefreshResp(newState, null);
} else if (oldState != CardState.CARDSTATE_PRESENT &&
newState == CardState.CARDSTATE_PRESENT) {
// Card moved to PRESENT STATE.
mCmdIf.reportStkServiceIsRunning(null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateIccAvailability
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
updateIccAvailability
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void removePresences(String oortURL) {
Set<String> userIds = removeRemotePresences(oortURL);
if (_logger.isDebugEnabled()) {
_logger.debug("Removing presences of comet {} for users {}", oortURL, userIds);
}
for (String userId : userIds) {
notifyPresenceRemoved(oortURL, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePresences
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
removePresences
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void grantUriPermission(IApplicationThread caller, String targetPkg, Uri uri,
final int modeFlags, int userId) {
enforceNotIsolatedCaller("grantUriPermission");
GrantUri grantUri = new GrantUri(userId, uri, false);
synchronized(this) {
final ProcessRecord r = getRecordForAppLocked(caller);
if (r == null) {
throw new SecurityException("Unable to find app for caller "
+ caller
+ " when granting permission to uri " + grantUri);
}
if (targetPkg == null) {
throw new IllegalArgumentException("null target");
}
if (grantUri == null) {
throw new IllegalArgumentException("null uri");
}
Preconditions.checkFlagsArgument(modeFlags, Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
| Intent.FLAG_GRANT_PREFIX_URI_PERMISSION);
grantUriPermissionLocked(r.uid, targetPkg, grantUri, modeFlags, null,
UserHandle.getUserId(r.uid));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantUriPermission
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
|
grantUriPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCertURL() {
return certURL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCertURL
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getCertURL
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearOomAdjObserver() {
synchronized (mOomAdjObserverLock) {
mCurOomAdjUid = -1;
mCurOomAdjObserver = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearOomAdjObserver
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
|
clearOomAdjObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static EntityReferenceSerializer<String> getCompactEntityReferenceSerializer()
{
return Utils.getComponent(EntityReferenceSerializer.TYPE_STRING, "compact");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCompactEntityReferenceSerializer
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getCompactEntityReferenceSerializer
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getName() {
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getName
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@MediumTest
@Test
public void testCdmaEnhancedPrivacyVoiceCall() throws Exception {
mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties =
Connection.PROPERTY_HAS_CDMA_VOICE_PRIVACY;
IdPair ids = startAndMakeActiveOutgoingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
assertEquals(Call.STATE_ACTIVE, mInCallServiceFixtureX.getCall(ids.mCallId).getState());
assertTrue(Call.Details.hasProperty(
mInCallServiceFixtureX.getCall(ids.mCallId).getProperties(),
Call.Details.PROPERTY_HAS_CDMA_VOICE_PRIVACY));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testCdmaEnhancedPrivacyVoiceCall
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testCdmaEnhancedPrivacyVoiceCall
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setLockTaskFeaturesLocked(int userHandle, int flags) {
DevicePolicyData policy = getUserData(userHandle);
policy.mLockTaskFeatures = flags;
saveSettingsLocked(userHandle);
updateLockTaskFeaturesLocked(flags, userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLockTaskFeaturesLocked
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
|
setLockTaskFeaturesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public GrantedAuthority[] getAuthorities() {
// TODO
return TEST_AUTHORITY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthorities
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getAuthorities
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
void addLocalService(AccountManagerInternal service) {
LocalServices.addService(AccountManagerInternal.class, service);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLocalService
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
|
addLocalService
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
boolean removeProcessLocked(ProcessRecord app,
boolean callerWillRestart, boolean allowRestart, String reason) {
final String name = app.processName;
final int uid = app.uid;
if (DEBUG_PROCESSES) Slog.d(TAG_PROCESSES,
"Force removing proc " + app.toShortString() + " (" + name + "/" + uid + ")");
ProcessRecord old = mProcessNames.get(name, uid);
if (old != app) {
// This process is no longer active, so nothing to do.
Slog.w(TAG, "Ignoring remove of inactive process: " + app);
return false;
}
removeProcessNameLocked(name, uid);
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
boolean needRestart = false;
if ((app.pid > 0 && app.pid != MY_PID) || (app.pid == 0 && app.pendingStart)) {
int pid = app.pid;
if (pid > 0) {
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(pid);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
}
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
getPackageManagerInternalLocked().removeIsolatedUid(app.uid);
}
}
boolean willRestart = false;
if (app.persistent && !app.isolated) {
if (!callerWillRestart) {
willRestart = true;
} else {
needRestart = true;
}
}
app.kill(reason, true);
handleAppDiedLocked(app, willRestart, allowRestart);
if (willRestart) {
removeLruProcessLocked(app);
addAppLocked(app.info, null, false, null /* ABI override */);
}
} else {
mRemovedProcesses.add(app);
}
return needRestart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessLocked
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
|
removeProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean awakenScrollBars();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: awakenScrollBars
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
awakenScrollBars
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isQuotedArgumentsEnabled()
{
return quotedArgumentsEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isQuotedArgumentsEnabled
File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Repository: apache/maven-shared-utils
The code follows secure coding practices.
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
isQuotedArgumentsEnabled
|
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean isActivityStartAllowedOnDisplay(int displayId, Intent intent,
String resolvedType, int userId) {
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
final long origId = Binder.clearCallingIdentity();
try {
// Collect information about the target of the Intent.
final ActivityInfo aInfo = resolveActivityInfoForIntent(intent, resolvedType, userId,
callingUid);
synchronized (mGlobalLock) {
return mTaskSupervisor.canPlaceEntityOnDisplay(displayId, callingPid, callingUid,
aInfo);
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isActivityStartAllowedOnDisplay
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
isActivityStartAllowedOnDisplay
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private void bindConfig(final Binder binder, final Config config) {
// root nodes
traverse(binder, "", config.root());
// terminal nodes
for (Entry<String, ConfigValue> entry : config.entrySet()) {
String name = entry.getKey();
Named named = Names.named(name);
Object value = entry.getValue().unwrapped();
if (value instanceof List) {
List<Object> values = (List<Object>) value;
Type listType = values.size() == 0
? String.class
: Types.listOf(values.iterator().next().getClass());
Key<Object> key = (Key<Object>) Key.get(listType, Names.named(name));
binder.bind(key).toInstance(values);
} else {
binder.bindConstant().annotatedWith(named).to(value.toString());
}
}
// bind config
binder.bind(Config.class).toInstance(config);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindConfig
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
|
bindConfig
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getParamOriginalParams() {
return m_paramOriginalParams;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamOriginalParams
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
getParamOriginalParams
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.