instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private void open() {
try {
try {
openInner();
} catch (SQLiteDatabaseCorruptException ex) {
onCorruption();
openInner();
}
} catch (SQLiteException ex) {
Log.e(TAG, "Failed to open database '" + getLabel() + "'.", ex);
close();
throw ex;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: open
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
|
open
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void systemReady() {
migrateOldData();
try {
getGateKeeperService();
} catch (RemoteException e) {
Slog.e(TAG, "Failure retrieving IGateKeeperService", e);
}
mStorage.prefetchUser(UserHandle.USER_OWNER);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: systemReady
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
systemReady
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean remove(K name) {
return getAndRemove(name) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove
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
|
remove
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isHexDigit() {
return current>='0' && current<='9'
|| current>='a' && current<='f'
|| current>='A' && current<='F';
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHexDigit
File: src/main/org/hjson/HjsonParser.java
Repository: hjson/hjson-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
isHexDigit
|
src/main/org/hjson/HjsonParser.java
|
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable List<String> getPermittedCrossProfileNotificationListeners(
@NonNull ComponentName admin) {
throwIfParentInstance("getPermittedCrossProfileNotificationListeners");
if (mService != null) {
try {
return mService.getPermittedCrossProfileNotificationListeners(admin);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermittedCrossProfileNotificationListeners
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
|
getPermittedCrossProfileNotificationListeners
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void connectComet(OortComet comet, Map<String, Object> fields) {
comet.handshake(fields);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectComet
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
connectComet
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cleanUpServices(int userId, ComponentName component, Intent baseIntent) {
synchronized(ActivityManagerService.this) {
mServices.cleanUpServices(userId, component, baseIntent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpServices
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
|
cleanUpServices
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPanelHidden() {
EventLogTags.writeNotificationPanelHidden();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPanelHidden
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
onPanelHidden
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public final String getDescriptorFullUrl() {
return getCurrentDescriptorByNameUrl()+'/'+getDescriptorUrl();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptorFullUrl
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getDescriptorFullUrl
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public @Nullable Timestamp getTimestamp(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getTimestamp columnIndex: {0}", columnIndex);
return getTimestamp(columnIndex, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimestamp
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getTimestamp
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private void restoreFinished() {
try {
final int token = generateToken();
prepareOperationTimeout(token, TIMEOUT_RESTORE_FINISHED_INTERVAL, this);
mAgent.doRestoreFinished(token, mBackupManagerBinder);
// If we get this far, the callback or timeout will schedule the
// next restore state, so we're done
} catch (Exception e) {
final String packageName = mCurrentPackage.packageName;
Slog.e(TAG, "Unable to finalize restore of " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
packageName, e.toString());
keyValueAgentErrorCleanup();
executeNextState(UnifiedRestoreState.RUNNING_QUEUE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreFinished
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
restoreFinished
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void buildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) {
super.buildEnvVars(build, env);
ModuleLocation[] svnLocations = getLocations(new EnvVars(env), build);
try {
Map<String,Long> revisions = parseSvnRevisionFile(build);
Set<String> knownURLs = revisions.keySet();
if(svnLocations.length==1) {
// for backwards compatibility if there's only a single modulelocation, we also set
// SVN_REVISION and SVN_URL without '_n'
String url = svnLocations[0].getURL();
Long rev = revisions.get(url);
if(rev!=null) {
env.put("SVN_REVISION",rev.toString());
env.put("SVN_URL",url);
} else if (!knownURLs.isEmpty()) {
LOGGER.log(WARNING, "no revision found corresponding to {0}; known: {1}", new Object[] {url, knownURLs});
}
}
for(int i=0;i<svnLocations.length;i++) {
String url = svnLocations[i].getURL();
Long rev = revisions.get(url);
if(rev!=null) {
env.put("SVN_REVISION_"+(i+1),rev.toString());
env.put("SVN_URL_"+(i+1),url);
} else if (!knownURLs.isEmpty()) {
LOGGER.log(WARNING, "no revision found corresponding to {0}; known: {1}", new Object[] {url, knownURLs});
}
}
} catch (IOException e) {
LOGGER.log(WARNING, "error building environment variables", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildEnvVars
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
buildEnvVars
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <T> T get(Class<T> type) {
return get(type.getCanonicalName(), type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: graylog2-server/src/main/java/org/graylog2/cluster/ClusterConfigServiceImpl.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
get
|
graylog2-server/src/main/java/org/graylog2/cluster/ClusterConfigServiceImpl.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String findEditTable(String tables) {
if (!TextUtils.isEmpty(tables)) {
// find the first word terminated by either a space or a comma
int spacepos = tables.indexOf(' ');
int commapos = tables.indexOf(',');
if (spacepos > 0 && (spacepos < commapos || commapos < 0)) {
return tables.substring(0, spacepos);
} else if (commapos > 0 && (commapos < spacepos || spacepos < 0) ) {
return tables.substring(0, commapos);
}
return tables;
} else {
throw new IllegalStateException("Invalid tables");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findEditTable
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
|
findEditTable
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(String action, String querystring, String anchor, XWikiContext context)
{
URL url = context.getURLFactory().createURL(getSpace(), getName(), action, querystring, anchor, getDatabase(),
context);
return context.getURLFactory().getURL(url, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
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
|
getURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void drainChannel(final Channel channel, final NettyResponseFuture<?> future) {
setDefaultAttribute(channel, new Callback(future) {
public void call() throws Exception {
if (!(future.isKeepAlive() && channel.isActive() && channelPool.offer(getPoolKey(future), channel))) {
finishChannel(channel);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: drainChannel
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
drainChannel
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthCredentials(String clientId, String clientSecret) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging());
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthCredentials
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthCredentials
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cleanupRecentTasksForUser(int userId) {
synchronized (mGlobalLock) {
mRecentTasks.cleanupLocked(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupRecentTasksForUser
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
|
cleanupRecentTasksForUser
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maskPasswordsInWifiConfiguration(WifiConfiguration configuration) {
if (!TextUtils.isEmpty(configuration.preSharedKey)) {
configuration.preSharedKey = PASSWORD_MASK;
}
if (configuration.wepKeys != null) {
for (int i = 0; i < configuration.wepKeys.length; i++) {
if (!TextUtils.isEmpty(configuration.wepKeys[i])) {
configuration.wepKeys[i] = PASSWORD_MASK;
}
}
}
if (configuration.enterpriseConfig != null && !TextUtils.isEmpty(
configuration.enterpriseConfig.getPassword())) {
configuration.enterpriseConfig.setPassword(PASSWORD_MASK);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maskPasswordsInWifiConfiguration
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
maskPasswordsInWifiConfiguration
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private void unhideAllInstalledAppsForUser(final int userHandle) {
mHandler.post(new Runnable() {
@Override
public void run() {
List<ApplicationInfo> apps =
mPm.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES,
userHandle).getList();
final long ident = Binder.clearCallingIdentity();
try {
for (ApplicationInfo appInfo : apps) {
if ((appInfo.flags & ApplicationInfo.FLAG_INSTALLED) != 0
&& (appInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_HIDDEN)
!= 0) {
mPm.setApplicationHiddenSettingAsUser(appInfo.packageName, false,
userHandle);
}
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unhideAllInstalledAppsForUser
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
unhideAllInstalledAppsForUser
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void initializeSerializerMaps(final TSDB tsdb)
throws SecurityException, NoSuchMethodException, ClassNotFoundException {
List<HttpSerializer> serializers =
PluginLoader.loadPlugins(HttpSerializer.class);
// add the default serializers compiled with OpenTSDB
if (serializers == null) {
serializers = new ArrayList<HttpSerializer>(1);
}
final HttpSerializer default_serializer = new HttpJsonSerializer();
serializers.add(default_serializer);
serializer_map_content_type =
new HashMap<String, Constructor<? extends HttpSerializer>>();
serializer_map_query_string =
new HashMap<String, Constructor<? extends HttpSerializer>>();
serializer_status = new ArrayList<HashMap<String, Object>>();
for (HttpSerializer serializer : serializers) {
final Constructor<? extends HttpSerializer> ctor =
serializer.getClass().getDeclaredConstructor(HttpQuery.class);
// check for collisions before adding serializers to the maps
Constructor<? extends HttpSerializer> map_ctor =
serializer_map_content_type.get(serializer.requestContentType());
if (map_ctor != null) {
final String err = "Serializer content type collision between \"" +
serializer.getClass().getCanonicalName() + "\" and \"" +
map_ctor.getClass().getCanonicalName() + "\"";
LOG.error(err);
throw new IllegalStateException(err);
}
serializer_map_content_type.put(serializer.requestContentType(), ctor);
map_ctor = serializer_map_query_string.get(serializer.shortName());
if (map_ctor != null) {
final String err = "Serializer name collision between \"" +
serializer.getClass().getCanonicalName() + "\" and \"" +
map_ctor.getClass().getCanonicalName() + "\"";
LOG.error(err);
throw new IllegalStateException(err);
}
serializer_map_query_string.put(serializer.shortName(), ctor);
// initialize the plugins
serializer.initialize(tsdb);
// write the status for any serializers OTHER than the default
if (serializer.shortName().equals("json")) {
continue;
}
HashMap<String, Object> status = new HashMap<String, Object>();
status.put("version", serializer.version());
status.put("class", serializer.getClass().getCanonicalName());
status.put("serializer", serializer.shortName());
status.put("request_content_type", serializer.requestContentType());
status.put("response_content_type", serializer.responseContentType());
HashSet<String> parsers = new HashSet<String>();
HashSet<String> formats = new HashSet<String>();
Method[] methods = serializer.getClass().getDeclaredMethods();
for (Method m : methods) {
if (Modifier.isPublic(m.getModifiers())) {
if (m.getName().startsWith("parse")) {
parsers.add(m.getName().substring(5));
} else if (m.getName().startsWith("format")) {
formats.add(m.getName().substring(6));
}
}
}
status.put("parsers", parsers);
status.put("formatters", formats);
serializer_status.add(status);
}
// add the base class to the status map so users can see everything that
// is implemented
HashMap<String, Object> status = new HashMap<String, Object>();
// todo - set the OpenTSDB version
//status.put("version", BuildData.version);
final Class<?> base_serializer =
Class.forName("net.opentsdb.tsd.HttpSerializer");
status.put("class", default_serializer.getClass().getCanonicalName());
status.put("serializer", default_serializer.shortName());
status.put("request_content_type", default_serializer.requestContentType());
status.put("response_content_type", default_serializer.responseContentType());
ArrayList<String> parsers = new ArrayList<String>();
ArrayList<String> formats = new ArrayList<String>();
Method[] methods = base_serializer.getDeclaredMethods();
for (Method m : methods) {
if (Modifier.isPublic(m.getModifiers())) {
if (m.getName().startsWith("parse")) {
parsers.add(m.getName().substring(5));
}
if (m.getName().startsWith("format")) {
formats.add(m.getName().substring(6));
}
}
}
status.put("parsers", parsers);
status.put("formatters", formats);
serializer_status.add(status);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeSerializerMaps
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
initializeSerializerMaps
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean removeObject(Object object)
{
return getDoc().removeObject(object.getBaseObject());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeObject
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
|
removeObject
|
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
|
@Override
boolean check(ManagementCenterConfig c1, ManagementCenterConfig c2) {
boolean c1Disabled = c1 == null || !c1.isEnabled();
boolean c2Disabled = c2 == null || !c2.isEnabled();
return c1 == c2 || (c1Disabled && c2Disabled) || (c1 != null && c2 != null
&& nullSafeEqual(c1.getUrl(), c2.getUrl())
&& nullSafeEqual(c1.getUpdateInterval(), c2.getUpdateInterval()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Callable<byte[]> requestWithGetAndResponse(final URL url, final Proxy proxy,
final SecurityAuthentication authentication, final Map<String, Object> headers) {
return new Callable<byte[]>() {
private HttpURLConnection openConnection(final URL url) throws IOException {
// Add proxy, if passed throw parameters
final URLConnection connection = proxy == null ? url.openConnection() : url.openConnection(proxy);
if (connection == null)
return null;
final HttpURLConnection http = (HttpURLConnection) connection;
applyEndpointAccessAuthentication(http, authentication);
applyAdditionalHeaders(http, headers);
return http;
}
public byte[] call() throws IOException {
HttpURLConnection http = openConnection(url);
final int responseCode = http.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_MOVED_TEMP
|| responseCode == HttpURLConnection.HTTP_MOVED_PERM) {
final String newUrl = http.getHeaderField("Location");
http = openConnection(new URL(newUrl));
}
return retrieveResponseAsBytes(http);
}
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestWithGetAndResponse
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
requestWithGetAndResponse
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
void setPrivateKey(byte[] bytes) {
try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
mUserKey = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(bytes));
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
} catch (InvalidKeySpecException e) {
throw new AssertionError(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPrivateKey
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
setPrivateKey
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
private float getRowScale(int rowPosition) {
final int start = getCallerTargetRowCount();
final int end = start + getServiceTargetRowCount();
if (rowPosition >= start && rowPosition < end) {
return mServiceTargetScale[rowPosition - start].get();
}
return 1.f;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRowScale
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getRowScale
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
Entity<?> entity;
if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart();
for (Entry<String, Object> param: formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey())
.fileName(file.getName()).size(file.length()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
} else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
}
}
entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE);
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
Form form = new Form();
for (Entry<String, Object> param: formParams.entrySet()) {
form.param(param.getKey(), parameterToString(param.getValue()));
}
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
} else {
// We let jersey handle the serialization
if (isBodyNullable) { // payload is nullable
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "null" : obj, contentType);
}
} else {
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "" : obj, contentType);
}
}
}
return entity;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
serialize
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Bean
public ValidationSettings validationSettings() {
ValidationSettings retVal = super.validationSettings();
retVal.setLocalReferenceValidationDefaultPolicy(IResourceValidator.ReferenceValidationPolicy.CHECK_VALID);
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validationSettings
File: hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
validationSettings
|
hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setOrganizationColorForUser(@ColorInt int color, @UserIdInt int userId) {
try {
// always enforce alpha channel to have 100% opacity
color |= 0xFF000000;
mService.setOrganizationColorForUser(color, userId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationColorForUser
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
|
setOrganizationColorForUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized InputStream openInputStream() throws IOException {
if (file != null) {
return new FileInputStream(file);
} else {
// requireNonNull is safe because we always have either `file` or `memory`.
requireNonNull(memory);
return new ByteArrayInputStream(memory.getBuffer(), 0, memory.getCount());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openInputStream
File: guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
openInputStream
|
guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
public TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException {
return itemGroupMixIn.createProjectFromXML(name, xml);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createProjectFromXML
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
|
createProjectFromXML
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public Router getRouter() {
return router;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRouter
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
getRouter
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void revalidate() {
if (myView != null) {
myView.getAndroidView().setVisibility(View.VISIBLE);
getCurrentForm().revalidate();
flushGraphics();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revalidate
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
|
revalidate
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public SigningCertificateLineage getSigningCertificateLineage() {
return mSigningCertificateLineage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSigningCertificateLineage
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getSigningCertificateLineage
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
void enforceCallingPermission(String permission, String func) {
if (checkCallingPermission(permission)
== PackageManager.PERMISSION_GRANTED) {
return;
}
String msg = "Permission Denial: " + func + " from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + permission;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceCallingPermission
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
|
enforceCallingPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getVersion() {
return Jenkins.VERSION;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getVersion
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setFlags(int flags) throws RemoteException {
if ((flags & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
int pid = Binder.getCallingPid();
int uid = Binder.getCallingUid();
mService.enforcePhoneStatePermission(pid, uid);
}
mFlags = flags;
if ((flags & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) {
final long token = Binder.clearCallingIdentity();
try {
mService.setGlobalPrioritySession(MediaSessionRecord.this);
} finally {
Binder.restoreCallingIdentity(token);
}
}
mHandler.post(MessageHandler.MSG_UPDATE_SESSION_STATE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFlags
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
setFlags
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private Path loggingPath(String base) {
return base != null ? Paths.get(loggingPath, base) : Paths.get(loggingPath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loggingPath
File: lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java
Repository: lukashinsch/spring-boot-actuator-logview
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-21234
|
MEDIUM
| 4
|
lukashinsch/spring-boot-actuator-logview
|
loggingPath
|
lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java
|
760acbb939a8d1f7d1a7dfcd51ca848eea04e772
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProperty(String name, Object value) throws XmlPullParserException {
throw new XmlPullParserException("setProperty() not supported");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProperty
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
setProperty
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setNotificationShown(StatusBarNotification n) {
setNotificationsShown(new String[]{n.getKey()});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNotificationShown
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setNotificationShown
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int extractUserId(@Nullable String data) {
if (data == null) return -1;
final Matcher matcher = PATTERN_USER_ID.matcher(data);
if (matcher.find()) {
return Integer.parseInt(matcher.group(1));
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractUserId
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
extractUserId
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInert() {
if (hasFeature(InertData.class)) {
// the node has inert data, it will resolve state properly
Optional<InertData> featureIfInitialized = getFeatureIfInitialized(
InertData.class);
if (featureIfInitialized.isPresent()) {
return featureIfInitialized.get().isInert();
}
}
return getParent() != null && getParent().isInert();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInert
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isInert
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWorkingDirectory( File workingDir )
{
if ( workingDir != null )
{
this.workingDir = workingDir.getAbsolutePath();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWorkingDirectory
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
setWorkingDirectory
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void purgeResources() {
super.purgeResources();
if (mVerificationIcon != null) {
mVerificationIcon.convertToAshmem();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: purgeResources
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
purgeResources
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long queryNumEntries(SQLiteDatabase db, String table) {
return queryNumEntries(db, table, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryNumEntries
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
queryNumEntries
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeBytesToStream(byte[] bytes, HttpServletResponse response) {
response.setContentType(CONTENT_TYPE);
// Send image
try (ServletOutputStream sos = response.getOutputStream()) {
sos.write(bytes);
sos.flush();
}
catch (IOException e) {
// Do nothing
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeBytesToStream
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
writeBytesToStream
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
c2ccb38250910587498597955d0bbee8b58e46df
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setSemanticAction(@SemanticAction int semanticAction) {
mSemanticAction = semanticAction;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSemanticAction
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSemanticAction
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T addLong(K name, long value) {
return add(name, fromLong(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLong
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
|
addLong
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void disallowAddUser() {
if (mInjector.userManagerIsHeadlessSystemUserMode()) {
Slogf.i(LOG_TAG, "Not setting DISALLOW_ADD_USER on headless system user mode.");
return;
}
for (UserInfo userInfo : mUserManager.getUsers()) {
UserHandle userHandle = userInfo.getUserHandle();
if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, userHandle)) {
mUserManager.setUserRestriction(
UserManager.DISALLOW_ADD_USER, /* value= */ true, userHandle);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disallowAddUser
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
|
disallowAddUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId,
boolean restrictedTransformationContext, XWikiDocument sDocument, XWikiContext context)
{
try {
return getRenderedContent(text, Syntax.valueOf(sourceSyntaxId), Syntax.valueOf(targetSyntaxId),
restrictedTransformationContext, sDocument, true, context);
} catch (ParseException e) {
// Failed to render for some reason. This method should normally throw an exception but this
// requires changing the signature of calling methods too.
LOGGER.warn("Failed to render content [{}]", text, e);
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedContent
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
|
getRenderedContent
|
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 void onServiceDisconnected(ComponentName name) {
mPrewarmMessenger = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onServiceDisconnected
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onServiceDisconnected
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void toDOM(Document document, Element profileAttributeElement) {
if (name != null) {
profileAttributeElement.setAttribute("name", name);
}
if (value != null) {
Element valueElement = document.createElement("Value");
valueElement.appendChild(document.createTextNode(value));
profileAttributeElement.appendChild(valueElement);
}
if (descriptor != null) {
Element descriptorElement = descriptor.toDOM(document);
profileAttributeElement.appendChild(descriptorElement);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SystemConfig getInstance() {
synchronized (SystemConfig.class) {
if (sInstance == null) {
sInstance = new SystemConfig();
}
return sInstance;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: services/core/java/com/android/server/SystemConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
getInstance
|
services/core/java/com/android/server/SystemConfig.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
private void scheduleNotifyUpdateAppWidgetLocked(Widget widget, RemoteViews updateViews) {
if (widget == null || widget.provider == null || widget.provider.zombie
|| widget.host.callbacks == null || widget.host.zombie) {
return;
}
SomeArgs args = SomeArgs.obtain();
args.arg1 = widget.host;
args.arg2 = widget.host.callbacks;
args.arg3 = updateViews;
args.argi1 = widget.appWidgetId;
mCallbackHandler.obtainMessage(
CallbackHandler.MSG_NOTIFY_UPDATE_APP_WIDGET,
args).sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleNotifyUpdateAppWidgetLocked
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
|
scheduleNotifyUpdateAppWidgetLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread,
boolean fromBinderDied) {
// First check if this ProcessRecord is actually active for the pid.
synchronized (mPidsSelfLocked) {
ProcessRecord curProc = mPidsSelfLocked.get(pid);
if (curProc != app) {
Slog.w(TAG, "Spurious death for " + app + ", curProc for " + pid + ": " + curProc);
return;
}
}
BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
synchronized (stats) {
stats.noteProcessDiedLocked(app.info.uid, pid);
}
if (!app.killed) {
if (!fromBinderDied) {
Process.killProcessQuiet(pid);
}
killProcessGroup(app.info.uid, pid);
app.killed = true;
}
// Clean up already done if the process has been re-started.
if (app.pid == pid && app.thread != null &&
app.thread.asBinder() == thread.asBinder()) {
boolean doLowMem = app.instrumentationClass == null;
boolean doOomAdj = doLowMem;
if (!app.killedByAm) {
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died");
mAllowLowerMemLevel = true;
} else {
// Note that we always want to do oom adj to update our state with the
// new number of procs.
mAllowLowerMemLevel = false;
doLowMem = false;
}
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName);
if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP,
"Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder());
handleAppDiedLocked(app, false, true);
if (doOomAdj) {
updateOomAdjLocked();
}
if (doLowMem) {
doLowMemReportIfNeededLocked(app);
}
} else if (app.pid != pid) {
// A new process has already been started.
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died and restarted (pid " + app.pid + ").");
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName);
} else if (DEBUG_PROCESSES) {
Slog.d(TAG_PROCESSES, "Received spurious death notification for thread "
+ thread.asBinder());
}
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2016-2500
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Kill the real/isolated uid group, not the ApplicationInfo uid
This is a direct reimplementation in L of fixes applied to N in
these two commits:
8dc8d37c1d7d694016f1ec2b3cea5fb723567be8
e8741d23d2dd05c4cb3fed5ee6a4040ee96a60e3
Bug 19285814
Change-Id: I59bcc8f1d41c426e9da635bea9ad1d7c6756d5aa
Resolve merge conflict when cp'ing ag/941553 to mnc-mr1-release branch
Function: appDiedLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
Fixed Code:
final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread,
boolean fromBinderDied) {
// First check if this ProcessRecord is actually active for the pid.
synchronized (mPidsSelfLocked) {
ProcessRecord curProc = mPidsSelfLocked.get(pid);
if (curProc != app) {
Slog.w(TAG, "Spurious death for " + app + ", curProc for " + pid + ": " + curProc);
return;
}
}
BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
synchronized (stats) {
stats.noteProcessDiedLocked(app.info.uid, pid);
}
if (!app.killed) {
if (!fromBinderDied) {
Process.killProcessQuiet(pid);
}
killProcessGroup(app.uid, pid);
app.killed = true;
}
// Clean up already done if the process has been re-started.
if (app.pid == pid && app.thread != null &&
app.thread.asBinder() == thread.asBinder()) {
boolean doLowMem = app.instrumentationClass == null;
boolean doOomAdj = doLowMem;
if (!app.killedByAm) {
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died");
mAllowLowerMemLevel = true;
} else {
// Note that we always want to do oom adj to update our state with the
// new number of procs.
mAllowLowerMemLevel = false;
doLowMem = false;
}
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName);
if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP,
"Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder());
handleAppDiedLocked(app, false, true);
if (doOomAdj) {
updateOomAdjLocked();
}
if (doLowMem) {
doLowMemReportIfNeededLocked(app);
}
} else if (app.pid != pid) {
// A new process has already been started.
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died and restarted (pid " + app.pid + ").");
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName);
} else if (DEBUG_PROCESSES) {
Slog.d(TAG_PROCESSES, "Received spurious death notification for thread "
+ thread.asBinder());
}
}
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
appDiedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void pointerDragged(int x, int y) {
super.pointerDragged(x, y);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pointerDragged
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
|
pointerDragged
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public CompletableFuture<Boolean> load(Dependency... dependencies) {
return CompletableFuture.supplyAsync(() -> {
try {
statusHandler.accept(Status.STARTING);
List<Dependency> dependencyList = Arrays.stream(dependencies)
.sorted(Comparator.comparingInt(Dependency::getPriority)).collect(Collectors.toList());
if (dependencyList.size() > 0) {
List<Dependency> downloadList = dependencyList.stream().filter(d -> !isDownloaded(d))
.collect(Collectors.toList());
if (downloadList.size() > 0) {
statusHandler.accept(Status.DOWNLOADING);
dependencyDownloader.download(downloadList);
if (downloadList.stream().anyMatch(d -> d.getRelocations().size() > 0)) {
statusHandler.accept(Status.RELOCATING);
dependencyRelocator.relocate(downloadList);
}
}
dependencyList.stream().filter(d -> d.getRelocations().size() > 0 && !d.isRelocated())
.forEach(d -> d.setFileName(dependencyRelocator.getRelocatedFileName(d)));
statusHandler.accept(Status.LOADING);
dependencyLoader.load(dependencyList);
}
statusHandler.accept(Status.FINISHED);
return true;
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
});
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: load
File: src/main/java/dev/hypera/dragonfly/Dragonfly.java
Repository: HyperaDev/Dragonfly
Fixed Code:
public @NotNull CompletableFuture<Boolean> load(@NotNull Dependency... dependencies) {
return CompletableFuture.supplyAsync(() -> {
try {
statusHandler.accept(Status.STARTING);
List<Dependency> dependencyList = Arrays.stream(dependencies)
.sorted(Comparator.comparingInt(Dependency::getPriority)).collect(Collectors.toList());
if (dependencyList.size() > 0) {
List<Dependency> downloadList = dependencyList.stream().filter(d -> !isDownloaded(d))
.collect(Collectors.toList());
if (downloadList.size() > 0) {
statusHandler.accept(Status.DOWNLOADING);
dependencyDownloader.download(downloadList);
if (downloadList.stream().anyMatch(d -> d.getRelocations().size() > 0)) {
statusHandler.accept(Status.RELOCATING);
dependencyRelocator.relocate(downloadList);
}
}
dependencyList.stream().filter(d -> d.getRelocations().size() > 0 && !d.isRelocated())
.forEach(d -> d.setFileName(dependencyRelocator.getRelocatedFileName(d)));
statusHandler.accept(Status.LOADING);
dependencyLoader.load(dependencyList);
}
statusHandler.accept(Status.FINISHED);
return true;
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
});
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
load
|
src/main/java/dev/hypera/dragonfly/Dragonfly.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getSubjectFormater()
{
String userFormatter = getProperty(PROP_USER_SUBJECTFORMATER, String.class);
if (userFormatter == null) {
userFormatter = DEFAULT_USER_SUBJECTFORMATER;
}
return userFormatter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubjectFormater
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
getSubjectFormater
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
void wallpaperCommandComplete(IBinder window, Bundle result) {
synchronized (mWindowMap) {
if (mWaitingOnWallpaper != null &&
mWaitingOnWallpaper.mClient.asBinder() == window) {
mWaitingOnWallpaper = null;
mWindowMap.notifyAll();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wallpaperCommandComplete
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
|
wallpaperCommandComplete
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContactInfo(final User user, final String command) throws IOException {
update();
m_readLock.lock();
try {
return _getContactInfo(user, command);
} finally {
m_readLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContactInfo
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getContactInfo
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onLinkPropertiesChange(LinkProperties newLp) {
addPasspointInfoToLinkProperties(newLp);
sendMessage(CMD_UPDATE_LINKPROPERTIES, newLp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLinkPropertiesChange
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
|
onLinkPropertiesChange
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void localDeviceConfigXmlGenerator(XmlGenerator gen, Config config) {
config.getDeviceConfigs().values().stream()
.filter(DeviceConfig::isLocal)
.forEach(deviceConfig -> {
LocalDeviceConfig localDeviceConfig = (LocalDeviceConfig) deviceConfig;
Capacity capacity = localDeviceConfig.getCapacity();
gen.open("local-device", "name", localDeviceConfig.getName())
.node("base-dir", localDeviceConfig.getBaseDir().getAbsolutePath())
.node("capacity", null,
"unit", capacity.getUnit(), "value", capacity.getValue())
.node("block-size", localDeviceConfig.getBlockSize())
.node("read-io-thread-count", localDeviceConfig.getReadIOThreadCount())
.node("write-io-thread-count", localDeviceConfig.getWriteIOThreadCount())
.close();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: localDeviceConfigXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
localDeviceConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private int packageFlagsToInstallFlags(PackageSetting ps) {
int installFlags = 0;
if (isExternal(ps) && TextUtils.isEmpty(ps.volumeUuid)) {
// This existing package was an external ASEC install when we have
// the external flag without a UUID
installFlags |= PackageManager.INSTALL_EXTERNAL;
}
if (ps.isForwardLocked()) {
installFlags |= PackageManager.INSTALL_FORWARD_LOCK;
}
return installFlags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: packageFlagsToInstallFlags
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
packageFlagsToInstallFlags
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setResourceProviders(Map<String, ResourceProvider> resourceProviders) {
ResourceFactory.resourceProviders = resourceProviders;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-24621
- Severity: MEDIUM
- CVSS Score: 6.5
Description: UIFR-215: Do not allow loading arbitrary files
Function: setResourceProviders
File: api/src/main/java/org/openmrs/ui/framework/resource/ResourceFactory.java
Repository: openmrs/openmrs-module-uiframework
Fixed Code:
public void setResourceProviders(Map<String, ResourceProvider> resourceProviders) {
ResourceFactory.resourceProviders = resourceProviders;
}
|
[
"CWE-22"
] |
CVE-2020-24621
|
MEDIUM
| 6.5
|
openmrs/openmrs-module-uiframework
|
setResourceProviders
|
api/src/main/java/org/openmrs/ui/framework/resource/ResourceFactory.java
|
0422fa52c7eba3d96cce2936cb92897dca4b680a
| 1
|
Analyze the following code function for security vulnerabilities
|
protected UiccCardApplication getUiccCardApplication() {
return mUiccController.getUiccCardApplication(mPhone.getPhoneId(),
UiccController.APP_FAM_3GPP2);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUiccCardApplication
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
getUiccCardApplication
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] getPayload() {
return mPayload;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPayload
File: core/java/android/service/gatekeeper/GateKeeperResponse.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-0806
|
HIGH
| 9.3
|
android
|
getPayload
|
core/java/android/service/gatekeeper/GateKeeperResponse.java
|
b87c968e5a41a1a09166199bf54eee12608f3900
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private void addConstraintViolationToBindingResult(
ConstraintViolation<Object> violation, BindingResult result) {
String field =
REPLACE_COLLECTION_ELEMENT.matcher(violation.getPropertyPath().toString()).replaceAll("");
FieldError fieldError = result.getFieldError(field);
if (fieldError == null || !fieldError.isBindingFailure()) {
try {
final Object dynamicPayload =
violation.unwrap(HibernateConstraintViolation.class).getDynamicPayload(Object.class);
if (dynamicPayload instanceof String) {
result.rejectValue(
"", // global error
violation.getConstraintDescriptor().getAnnotation().annotationType().getSimpleName(),
new Object[0], // no msg arguments to pass
(String) dynamicPayload // dynamicPayload itself is the error message(-key)
);
} else if (dynamicPayload instanceof ValidationError) {
rejectValidationError(violation, result, (ValidationError) dynamicPayload, field);
} else if (dynamicPayload instanceof List) {
((List<ValidationError>) dynamicPayload)
.forEach(error -> rejectValidationError(violation, result, error, field));
} else {
result.rejectValue(
field,
violation.getConstraintDescriptor().getAnnotation().annotationType().getSimpleName(),
getArgumentsForConstraint(result.getObjectName(), field, violation),
getMessageForConstraintViolation(violation));
}
} catch (NotReadablePropertyException ex) {
throw new IllegalStateException(
"JSR-303 validated property '"
+ field
+ "' does not have a corresponding accessor for data binding - "
+ "check your DataBinder's configuration (bean property versus direct field access)",
ex);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addConstraintViolationToBindingResult
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
addConstraintViolationToBindingResult
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean scanDocument(boolean complete) throws XNIException, IOException {
do {
if (!fScanner.scan(complete)) {
return false;
}
} while (complete);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanDocument
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
scanDocument
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
void setDevicePolicySafetyCheckerUnchecked(DevicePolicySafetyChecker safetyChecker) {
Slogf.i(LOG_TAG, "Setting DevicePolicySafetyChecker as %s", safetyChecker);
mSafetyChecker = safetyChecker;
mInjector.setDevicePolicySafetyChecker(safetyChecker);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDevicePolicySafetyCheckerUnchecked
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
|
setDevicePolicySafetyCheckerUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearListeners() {
mBoundListeners.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearListeners
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
clearListeners
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showLockTaskEscapeMessage(IBinder token) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showLockTaskEscapeMessage
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
showLockTaskEscapeMessage
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
final int getIntAndRemove(CharSequence name, int defaultValue) {
final Integer v = getIntAndRemove(name);
return v != null ? v : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntAndRemove
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
getIntAndRemove
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean hasParameter(VaadinRequest request,
String parameterName) {
return request.getParameter(parameterName) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasParameter
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
hasParameter
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public SystemMessages getSystemMessages(Locale locale,
VaadinRequest request) {
SystemMessagesInfo systemMessagesInfo = new SystemMessagesInfo();
systemMessagesInfo.setLocale(locale);
systemMessagesInfo.setService(this);
systemMessagesInfo.setRequest(request);
return getSystemMessagesProvider()
.getSystemMessages(systemMessagesInfo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSystemMessages
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
getSystemMessages
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldAutoCancel(StatusBarNotification sbn) {
int flags = sbn.getNotification().flags;
if ((flags & Notification.FLAG_AUTO_CANCEL) != Notification.FLAG_AUTO_CANCEL) {
return false;
}
if ((flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldAutoCancel
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
shouldAutoCancel
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSubscriptionId(int subscriptionId) {
this.mSubscriptionId = subscriptionId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubscriptionId
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
|
setSubscriptionId
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRenderedContent(boolean transformationContextIsolated, XWikiContext context) throws XWikiException
{
return getRenderedContent(getOutputSyntax(), transformationContextIsolated, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedContent
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
|
getRenderedContent
|
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 void check(Certificate c, Collection<String> unresolvedCritExts)
throws CertPathValidatorException {
// We only want to validate the EKU on the leaf certificate.
if (c != leaf) {
return;
}
List<String> ekuOids;
try {
ekuOids = leaf.getExtendedKeyUsage();
} catch (CertificateParsingException e) {
// A malformed EKU is bad news, consider it fatal.
throw new CertPathValidatorException(e);
}
// We are here to check EKU, but there is none.
if (ekuOids == null) {
return;
}
boolean goodExtendedKeyUsage = false;
for (String ekuOid : ekuOids) {
// anyExtendedKeyUsage for clients and servers
if (ekuOid.equals(EKU_anyExtendedKeyUsage)) {
goodExtendedKeyUsage = true;
break;
}
// clients
if (clientAuth) {
if (ekuOid.equals(EKU_clientAuth)) {
goodExtendedKeyUsage = true;
break;
}
continue;
}
// servers
if (ekuOid.equals(EKU_serverAuth)) {
goodExtendedKeyUsage = true;
break;
}
if (ekuOid.equals(EKU_nsSGC)) {
goodExtendedKeyUsage = true;
break;
}
if (ekuOid.equals(EKU_msSGC)) {
goodExtendedKeyUsage = true;
break;
}
}
if (goodExtendedKeyUsage) {
// Mark extendedKeyUsage as resolved if present.
unresolvedCritExts.remove(EKU_OID);
} else {
throw new CertPathValidatorException("End-entity certificate does not have a valid "
+ "extendedKeyUsage.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: src/platform/java/org/conscrypt/TrustManagerImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
check
|
src/platform/java/org/conscrypt/TrustManagerImpl.java
|
c4ab1b959280413fb11bf4fd7f6b4c2ba38bd779
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setJMSDestination(Destination destination) throws JMSException {
this.setObjectProperty(JMS_MESSAGE_DESTINATION, destination);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setJMSDestination
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
|
setJMSDestination
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private PostgresClient postgresClientEndTxFailure() {
class PostgresClientEndTxFailure extends PostgresClient {
public PostgresClientEndTxFailure(Vertx vertx, String tenant) throws Exception {
super(vertx, tenant);
}
@Override
public void endTx(AsyncResult<SQLConnection> conn, Handler<AsyncResult<Void>> done) {
done.handle(Future.failedFuture(new RuntimeException()));
}
};
try {
return new PostgresClientEndTxFailure(vertx, TENANT);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postgresClientEndTxFailure
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
postgresClientEndTxFailure
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUserProvisioningState(int newState, int userId) {
if (!mHasFeature) {
logMissingFeatureAction("Cannot set provisioning state " + newState + " for user "
+ userId);
return;
}
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));
final CallerIdentity caller = getCallerIdentity();
final long id = mInjector.binderClearCallingIdentity();
try {
int deviceOwnerUserId = mOwners.getDeviceOwnerUserId();
// NOTE: multiple if statements are nested below so it can log more info on error
if (userId != deviceOwnerUserId) {
boolean hasProfileOwner = mOwners.hasProfileOwner(userId);
if (!hasProfileOwner) {
int managedUserId = getManagedUserId(userId);
if (managedUserId == -1 && newState != STATE_USER_UNMANAGED) {
// No managed device, user or profile, so setting provisioning state makes
// no sense.
String error = "Not allowed to change provisioning state unless a "
+ "device or profile owner is set.";
Slogf.w(LOG_TAG, "setUserProvisioningState(newState=%d, userId=%d) failed: "
+ "deviceOwnerId=%d, hasProfileOwner=%b, managedUserId=%d, err=%s",
newState, userId, deviceOwnerUserId, hasProfileOwner,
managedUserId, error);
throw new IllegalStateException(error);
}
}
}
synchronized (getLockObject()) {
boolean transitionCheckNeeded = true;
// Calling identity/permission checks.
if (isAdb(caller)) {
// ADB shell can only move directly from un-managed to finalized as part of
// directly setting profile-owner or device-owner.
if (getUserProvisioningState(userId)
!= DevicePolicyManager.STATE_USER_UNMANAGED
|| newState != STATE_USER_SETUP_FINALIZED) {
throw new IllegalStateException("Not allowed to change provisioning state "
+ "unless current provisioning state is unmanaged, and new state"
+ "is finalized.");
}
transitionCheckNeeded = false;
}
final DevicePolicyData policyData = getUserData(userId);
if (transitionCheckNeeded) {
// Optional state transition check for non-ADB case.
checkUserProvisioningStateTransition(policyData.mUserProvisioningState,
newState);
}
policyData.mUserProvisioningState = newState;
saveSettingsLocked(userId);
}
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserProvisioningState
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
|
setUserProvisioningState
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logException(Throwable cause) {
//handling connection reset by peer exceptions
String message = cause.getMessage();
if (cause instanceof IOException && message != null && IGNORABLE_ERROR_MESSAGE.matcher(message).matches()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Swallowed an IOException caused by client connectivity: " + cause.getMessage(), cause);
}
} else {
if (LOG.isErrorEnabled()) {
LOG.error("Unexpected error occurred: " + cause.getMessage(), cause);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logException
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
logException
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpHeadersBase setIfAbsent(Iterable<? extends Entry<? extends CharSequence, String>> headers) {
requireNonNull(headers, "headers");
final Set<AsciiString> existingNames = names();
if (!setIfAbsentFast(headers, existingNames)) {
setIfAbsentSlow(headers, existingNames);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIfAbsent
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
setIfAbsent
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public List<PermissionGroupInfo> getAllPermissionGroups(
@PackageManager.PermissionGroupInfoFlags int flags) {
try {
final ParceledListSlice<PermissionGroupInfo> parceledList =
mPermissionManager.getAllPermissionGroups(flags);
if (parceledList == null) {
return Collections.emptyList();
}
return parceledList.getList();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllPermissionGroups
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getAllPermissionGroups
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
ctx.disconnect(promise);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disconnect
File: handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-34462
|
MEDIUM
| 6.5
|
netty
|
disconnect
|
handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
|
535da17e45201ae4278c0479e6162bb4127d4c32
| 0
|
Analyze the following code function for security vulnerabilities
|
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
@GetMapping(value = "/health")
public Health checkHealth(@RequestParam String host) {
return restTemplate.getForObject(host + "/health", Health.class);
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2019-10686
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix SSRF, resolve #2103
Function: checkHealth
File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java
Repository: apolloconfig/apollo
Fixed Code:
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
@GetMapping(value = "/health")
public Health checkHealth(@RequestParam String instanceId) {
List<Env> allEnvs = portalSettings.getAllEnvs();
ServiceDTO service = null;
for (final Env env : allEnvs) {
EnvironmentInfo envInfo = adaptEnv2EnvironmentInfo(env);
for (final ServiceDTO s : envInfo.getAdminServices()) {
if (instanceId.equals(s.getInstanceId())) {
service = s;
break;
}
}
for (final ServiceDTO s : envInfo.getConfigServices()) {
if (instanceId.equals(s.getInstanceId())) {
service = s;
break;
}
}
}
if (service == null) {
throw new IllegalArgumentException("No such instance of instanceId: " + instanceId);
}
return restTemplate.getForObject(service.getHomepageUrl() + "/health", Health.class);
}
|
[
"CWE-918"
] |
CVE-2019-10686
|
HIGH
| 7.5
|
apolloconfig/apollo
|
checkHealth
|
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java
|
56919378154fc27c9fb62cbfa68ab2df0bcac003
| 1
|
Analyze the following code function for security vulnerabilities
|
private void invalidateCachesLocked(int diff) {
// TODO(adamlesinski): Currently there are no caches to invalidate in Java code.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invalidateCachesLocked
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
invalidateCachesLocked
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Map<String,String> responseHeaders =
requestHandler.handleCorsPreflightRequest(
req.getHeader("Origin"),
req.getHeader("Access-Control-Request-Headers"));
for (Map.Entry<String,String> entry : responseHeaders.entrySet()) {
resp.setHeader(entry.getKey(),entry.getValue());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doOptions
File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
doOptions
|
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void concatenateTransform(Object t1, Object t2) {
//((Matrix) t1).preConcat((Matrix) t2);
((CN1Matrix4f)t1).concatenate((CN1Matrix4f)t2);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: concatenateTransform
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
|
concatenateTransform
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("addZippedMediaPackage/{workflowDefinitionId}")
@Produces(MediaType.TEXT_XML)
@RestQuery(name = "addZippedMediaPackage", description = "Create media package from a compressed file containing a manifest.xml document and all media tracks, metadata catalogs and attachments", pathParameters = { @RestParameter(description = "Workflow definition id", isRequired = true, name = WORKFLOW_DEFINITION_ID_PARAM, type = RestParameter.Type.STRING) }, restParameters = { @RestParameter(description = "The workflow instance ID to associate with this zipped mediapackage", isRequired = false, name = WORKFLOW_INSTANCE_ID_PARAM, type = RestParameter.Type.STRING) }, bodyParameter = @RestParameter(description = "The compressed (application/zip) media package file", isRequired = true, name = "BODY", type = RestParameter.Type.FILE), reponses = {
@RestResponse(description = "", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_BAD_REQUEST),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_NOT_FOUND),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_SERVICE_UNAVAILABLE) }, returnDescription = "")
public Response addZippedMediaPackage(@Context HttpServletRequest request,
@PathParam("workflowDefinitionId") String wdID, @QueryParam("id") String wiID) {
logger.trace("add zipped media package with workflow definition id: {} and workflow instance id: {}", wdID, wiID);
if (!isIngestLimitEnabled() || getIngestLimit() > 0) {
return ingestZippedMediaPackage(request, wdID, wiID);
} else {
logger.warn("Delaying ingest because we have exceeded the maximum number of ingests this server is setup to do concurrently.");
return Response.status(Status.SERVICE_UNAVAILABLE).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addZippedMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
addZippedMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
Map<String, Object> primaryServerDetails() {
Map<String, Object> details = new HashMap<>();
String primaryServerUrl = primaryServerCommunicationService.primaryServerUrl();
details.put("url", primaryServerUrl);
try {
details.put("latestDatabaseWalLocation", primaryServerCommunicationService.latestDatabaseWalLocation());
ServerStatusResponse latestFileStatus = primaryServerCommunicationService.getLatestFileStatus();
details.put("configFilesUpdateInterval", latestFileStatus.getConfigFilesUpdateInterval());
details.put("lastConfigUpdateTime", new Date(latestFileStatus.getLastConfigFilesUpdateTime()));
Map<ConfigFileType, FileDetails> fileDetailsMap = latestFileStatus.getFileDetailsMap();
for (ConfigFileType fileType : fileDetailsMap.keySet()) {
details.put(fileType.name(), fileDetailsMap.get(fileType));
}
details.put("pluginStatus", primaryPluginStatus());
} catch (Exception e) {
details.put("error", format("Could not fetch latest file status from master, Reason, %s", e.getMessage()));
}
return details;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: primaryServerDetails
File: server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2021-43287
|
MEDIUM
| 5
|
gocd
|
primaryServerDetails
|
server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java
|
41abc210ac4e8cfa184483c9ff1c0cc04fb3511c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isInstalled() {
return new InstallService(PathKit.getWebRootPath() + "/WEB-INF").checkInstall() || StringUtils.isNotEmpty(ZrLogUtil.getDbInfoByEnv());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInstalled
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
isInstalled
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
Configuration[] getSizeConfigurations() {
synchronized (this) {
ensureValidLocked();
return nativeGetSizeConfigurations(mObject);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSizeConfigurations
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getSizeConfigurations
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = { "/validate" })
public String actionValidate(final HttpServletRequest theReq, final HomeRequest theRequest, final BindingResult theBindingResult, final ModelMap theModel) {
doActionCreateOrValidate(theReq, theRequest, theBindingResult, theModel, "validate");
return "result";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: actionValidate
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
actionValidate
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File dumpStackTraces(boolean clearTraces, ArrayList<Integer> firstPids,
ProcessCpuTracker processCpuTracker, SparseArray<Boolean> lastPids,
ArrayList<Integer> nativePids) {
ArrayList<Integer> extraPids = null;
// Measure CPU usage as soon as we're called in order to get a realistic sampling
// of the top users at the time of the request.
if (processCpuTracker != null) {
processCpuTracker.init();
try {
Thread.sleep(200);
} catch (InterruptedException ignored) {
}
processCpuTracker.update();
// We'll take the stack crawls of just the top apps using CPU.
final int N = processCpuTracker.countWorkingStats();
extraPids = new ArrayList<>();
for (int i = 0; i < N && extraPids.size() < 5; i++) {
ProcessCpuTracker.Stats stats = processCpuTracker.getWorkingStats(i);
if (lastPids.indexOfKey(stats.pid) >= 0) {
if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + stats.pid);
extraPids.add(stats.pid);
} else if (DEBUG_ANR) {
Slog.d(TAG, "Skipping next CPU consuming process, not a java proc: "
+ stats.pid);
}
}
}
boolean useTombstonedForJavaTraces = false;
File tracesFile;
final String tracesDirProp = SystemProperties.get("dalvik.vm.stack-trace-dir", "");
if (tracesDirProp.isEmpty()) {
// When dalvik.vm.stack-trace-dir is not set, we are using the "old" trace
// dumping scheme. All traces are written to a global trace file (usually
// "/data/anr/traces.txt") so the code below must take care to unlink and recreate
// the file if requested.
//
// This mode of operation will be removed in the near future.
String globalTracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
if (globalTracesPath.isEmpty()) {
Slog.w(TAG, "dumpStackTraces: no trace path configured");
return null;
}
tracesFile = new File(globalTracesPath);
try {
if (clearTraces && tracesFile.exists()) {
tracesFile.delete();
}
tracesFile.createNewFile();
FileUtils.setPermissions(globalTracesPath, 0666, -1, -1); // -rw-rw-rw-
} catch (IOException e) {
Slog.w(TAG, "Unable to prepare ANR traces file: " + tracesFile, e);
return null;
}
} else {
File tracesDir = new File(tracesDirProp);
// When dalvik.vm.stack-trace-dir is set, we use the "new" trace dumping scheme.
// Each set of ANR traces is written to a separate file and dumpstate will process
// all such files and add them to a captured bug report if they're recent enough.
maybePruneOldTraces(tracesDir);
// NOTE: We should consider creating the file in native code atomically once we've
// gotten rid of the old scheme of dumping and lot of the code that deals with paths
// can be removed.
tracesFile = createAnrDumpFile(tracesDir);
if (tracesFile == null) {
return null;
}
useTombstonedForJavaTraces = true;
}
dumpStackTraces(tracesFile.getAbsolutePath(), firstPids, nativePids, extraPids,
useTombstonedForJavaTraces);
return tracesFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpStackTraces
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
|
dumpStackTraces
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void interceptResponse(IHttpResponse theResponse) throws IOException {
assert myLastResponse == null;
myLastResponse = theResponse;
// myLastResponse = ((ApacheHttpResponse) theResponse).getResponse();
//
// HttpEntity respEntity = myLastResponse.getEntity();
// if (respEntity != null) {
// final byte[] bytes;
// try {
// bytes = IOUtils.toByteArray(respEntity.getContent());
// } catch (IllegalStateException e) {
// throw new InternalErrorException(e);
// }
//
// myResponseBody = new String(bytes, "UTF-8");
// myLastResponse.setEntity(new MyEntityWrapper(respEntity, bytes));
// }
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: interceptResponse
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
interceptResponse
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean shouldUseHuffman(HttpString header, String value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldUseHuffman
File: core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
shouldUseHuffman
|
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Stage scheduleStage(Pipeline pipeline, StageConfig stageConfig, int order) {
Stage instance = instanceFactory.createStageInstance(stageConfig, new DefaultSchedulingContext("cruise"), md5, new TimeProvider());
return saveStage(pipeline, instance, order);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleStage
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
scheduleStage
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String toString(Object object) throws JSONException {
return toString(object, null, XMLParserConfiguration.ORIGINAL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
toString
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static SpannableString removeComposingSpans(Spanned body) {
final SpannableString messageBody = new SpannableString(body);
BaseInputConnection.removeComposingSpans(messageBody);
// Remove watcher spans while we're at it, so any off-UI thread manipulation of these
// spans doesn't trigger unexpected side-effects. This copy is essentially 100% detached
// from the EditText.
//
// (must remove SpanWatchers first to avoid triggering them as we remove other spans)
removeSpansOfType(messageBody, SpanWatcher.class);
removeSpansOfType(messageBody, TextWatcher.class);
return messageBody;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeComposingSpans
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
removeComposingSpans
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.