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
|
@Override
public void clearEffects() {
synchronized (mNotificationList) {
if (DBG) Slog.d(TAG, "clearEffects");
clearSoundLocked();
clearVibrateLocked();
clearLightsLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearEffects
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
|
clearEffects
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(action)) {
mKeyguardDisableHandler.sendEmptyMessage(
KeyguardDisableHandler.KEYGUARD_POLICY_CHANGED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
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
|
onReceive
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setStaticListPropertyValue(SolrInputDocument solrDocument, BaseProperty<EntityReference> property,
StaticListClass propertyClass, Locale locale)
{
// The list of known values specified in the XClass.
Map<String, ListItem> knownValues = propertyClass.getMap(this.xcontextProvider.get());
Object propertyValue = property.getValue();
// When multiple selection is on the value is a list. Otherwise, for single selection, the value is a string.
List<?> rawValues = propertyValue instanceof List ? (List<?>) propertyValue : Arrays.asList(propertyValue);
for (Object rawValue : rawValues) {
// Avoid indexing null values.
if (rawValue != null) {
// Index the raw value that is saved in the database. This is most probably a string so we'll be able to
// perform exact matches on this value.
setPropertyValue(solrDocument, property, new TypedValue(rawValue), locale);
ListItem valueInfo = knownValues.get(rawValue);
if (valueInfo != null && valueInfo.getValue() != null && !valueInfo.getValue().equals(rawValue)) {
// Index the display value as text (based on the given locale). This is the text seen by the user
// when he edits the static list property. This text is specified on the XClass (but can be
// overwritten by translations!).
setPropertyValue(solrDocument, property, new TypedValue(valueInfo.getValue(), TypedValue.TEXT),
locale);
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-312, CWE-200
- CVE: CVE-2023-50719
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-20371: Consider mail obfuscation settings in the Solr indexer
* Introduce a new event GeneralMailConfigurationUpdatedEvent to notify
the indexer when the mail configuration changed.
* Don't index emails when obfuscation is enabled.
* Add a test for the object property metadata extractor.
* Add a migration to clear the index.
* Make sure that indexing is executed with the indexed document in
context.
Function: setStaticListPropertyValue
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
Fixed Code:
private void setStaticListPropertyValue(SolrInputDocument solrDocument, BaseProperty<?> property,
StaticListClass propertyClass, Locale locale)
{
// The list of known values specified in the XClass.
Map<String, ListItem> knownValues = propertyClass.getMap(this.xcontextProvider.get());
Object propertyValue = property.getValue();
// When multiple selection is on the value is a list. Otherwise, for single selection, the value is a string.
List<?> rawValues = propertyValue instanceof List ? (List<?>) propertyValue : Arrays.asList(propertyValue);
for (Object rawValue : rawValues) {
// Avoid indexing null values.
if (rawValue != null) {
// Index the raw value that is saved in the database. This is most probably a string so we'll be able to
// perform exact matches on this value.
setPropertyValue(solrDocument, property, new TypedValue(rawValue), locale);
ListItem valueInfo = knownValues.get(rawValue);
if (valueInfo != null && valueInfo.getValue() != null && !valueInfo.getValue().equals(rawValue)) {
// Index the display value as text (based on the given locale). This is the text seen by the user
// when he edits the static list property. This text is specified on the XClass (but can be
// overwritten by translations!).
setPropertyValue(solrDocument, property, new TypedValue(valueInfo.getValue(), TypedValue.TEXT),
locale);
}
}
}
}
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setStaticListPropertyValue
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<V> clear(boolean recycling) {
if (recycling) {
List<V> list = new ArrayList<>();
Jedis jedis = jedisPool.getResource();
Set<String> keyList = jedis.keys(CommonUtils.joinString(region, Constants.DOT, "*"));
keyList.forEach(k -> {
byte[] byteKey = stringSerializer.serialize(k);
V value = valueSerializer.deserialize(jedis.get(byteKey));
if (0 < jedis.del(k)) {
list.add(value);
}
});
jedis.close();
return list;
} else {
Jedis jedis = jedisPool.getResource();
Set<String> keyList = jedis.keys(CommonUtils.joinString(region, Constants.DOT, "*"));
keyList.forEach(k -> {
jedis.del(k);
});
jedis.close();
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clear
File: publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46990
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
clear
|
publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java
|
c7bf58bf07fdc60a71134c6a73a4947c7709abf7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public User getUser(String username, XWikiContext context)
{
XWikiUser xwikiUser = new XWikiUser(username);
User user = new User(xwikiUser, context);
return user;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getUser
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void socketInterceptorConfigXmlGenerator(XmlGenerator gen, SocketInterceptorConfig socket) {
gen.open("socket-interceptor", "enabled", socket != null && socket.isEnabled());
if (socket != null) {
gen.node("class-name", classNameOrImplClass(socket.getClassName(), socket.getImplementation()))
.appendProperties(socket.getProperties());
}
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: socketInterceptorConfigXmlGenerator
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
|
socketInterceptorConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isProfileOwner(int uid) {
synchronized (ActivityManagerService.this) {
return mProfileOwnerUids != null && mProfileOwnerUids.indexOf(uid) >= 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProfileOwner
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
|
isProfileOwner
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void endRequest() {
final List<RequestScopedItem> result = CACHE.get();
CACHE.remove();
if (result != null) {
for (final RequestScopedItem item : result) {
item.invalidate();
}
}
}
|
Vulnerability Classification:
- CWE: CWE-362
- CVE: CVE-2014-8122
- Severity: MEDIUM
- CVSS Score: 4.3
Description: WELD-1802 RequestScopedCache - Make sure each request is ended before a new one is started
Function: endRequest
File: impl/src/main/java/org/jboss/weld/context/cache/RequestScopedCache.java
Repository: weld/core
Fixed Code:
public static void endRequest() {
final List<RequestScopedItem> result = CACHE.get();
if (result != null) {
CACHE.remove();
for (final RequestScopedItem item : result) {
item.invalidate();
}
}
}
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
endRequest
|
impl/src/main/java/org/jboss/weld/context/cache/RequestScopedCache.java
|
6808b11cd6d97c71a2eed754ed4f955acd789086
| 1
|
Analyze the following code function for security vulnerabilities
|
private void updateCapabilities(WifiConfiguration currentWifiConfiguration) {
updateCapabilities(getCapabilities(currentWifiConfiguration, getConnectedBssidInternal()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCapabilities
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
|
updateCapabilities
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isPass(String sql) {
List<QueryTable> list = null;
//【jeecg-boot/issues/4040】在线报表不支持子查询,解析报错 #4040
try {
list = this.getQueryTableInfo(sql.toLowerCase());
} catch (Exception e) {
log.warn("校验sql语句,解析报错:{}",e.getMessage());
}
if(list==null){
return true;
}
log.info("--获取sql信息--", list.toString());
boolean flag = true;
for (QueryTable table : list) {
String name = table.getName();
String fieldString = ruleMap.get(name);
// 有没有配置这张表
if (fieldString != null) {
if ("*".equals(fieldString) || table.isAll()) {
flag = false;
log.warn("sql黑名单校验,表【"+name+"】禁止查询");
break;
} else if (table.existSameField(fieldString)) {
flag = false;
break;
}
}
}
return flag;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-34602
- Severity: HIGH
- CVSS Score: 7.5
Description: issues/4983 SQL Injection in 3.5.1 #4983
Function: isPass
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
public boolean isPass(String sql) {
List<QueryTable> list = null;
//【jeecg-boot/issues/4040】在线报表不支持子查询,解析报错 #4040
try {
list = this.getQueryTableInfo(sql.toLowerCase());
} catch (Exception e) {
log.warn("校验sql语句,解析报错:{}",e.getMessage());
}
if(list==null){
return true;
}
log.info("--获取sql信息--", list.toString());
boolean flag = checkTableAndFieldsName(list);
if(flag == false){
return false;
}
for (QueryTable table : list) {
String name = table.getName();
String fieldString = ruleMap.get(name);
// 有没有配置这张表
if (fieldString != null) {
if ("*".equals(fieldString) || table.isAll()) {
flag = false;
log.warn("sql黑名单校验,表【"+name+"】禁止查询");
break;
} else if (table.existSameField(fieldString)) {
flag = false;
break;
}
}
}
return flag;
}
|
[
"CWE-89"
] |
CVE-2023-34602
|
HIGH
| 7.5
|
jeecgboot/jeecg-boot
|
isPass
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
|
dd7bf104e7ed59142909567ecd004335c3442ec5
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setPackageVersion(String packageVersion)
{
this.packageVersion = packageVersion;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPackageVersion
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
setPackageVersion
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return "VirtualActivityDisplay={" + mDisplayId + "}";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
toString
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void mergeXObjects(XWikiDocument templateDoc)
{
for (Map.Entry<DocumentReference, List<BaseObject>> entry : templateDoc.getXObjects().entrySet()) {
// Documents can't have objects of types defined in a different wiki so we make sure the class reference
// matches this document's wiki.
DocumentReference classReference = entry.getKey().replaceParent(entry.getKey().getWikiReference(),
getDocumentReference().getWikiReference());
// Copy the objects from the template document only if this document doesn't have them already.
//
// Note: this might be a bit misleading since it will not add objects from the template if some objects of
// that class already exist in the current document.
if (getXObjectSize(classReference) == 0) {
for (BaseObject object : entry.getValue()) {
if (object != null) {
addXObject(object.duplicate());
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mergeXObjects
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
|
mergeXObjects
|
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 RecoveryDelayHandler getRecoveryDelayHandler() {
return recoveryDelayHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRecoveryDelayHandler
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getRecoveryDelayHandler
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected XWikiDocument prepareEditedDocument(XWikiContext context) throws XWikiException
{
// Determine the edited document (translation).
XWikiDocument editedDocument = getEditedDocument(context);
EditForm editForm = (EditForm) context.getForm();
// Update the edited document based on the template specified on the request.
readFromTemplate(editedDocument, editForm.getTemplate(), context);
// The default values from the template can be overwritten by additional request parameters.
updateDocumentTitleAndContentFromRequest(editedDocument, context);
editedDocument.readAddedUpdatedAndRemovedObjectsFromForm(editForm, context);
// Set the current user as creator, author and contentAuthor when the edited document is newly created to avoid
// using XWikiGuest instead (because those fields were not previously initialized).
if (editedDocument.isNew()) {
editedDocument.setCreatorReference(context.getUserReference());
editedDocument.setAuthorReference(context.getUserReference());
editedDocument.setContentAuthorReference(context.getUserReference());
}
editedDocument.readTemporaryUploadedFiles(editForm);
// Expose the edited document on the XWiki context and the Velocity context.
putDocumentOnContext(editedDocument, context);
return editedDocument;
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2023-46243
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20385: Improve author handling in the edit action
Function: prepareEditedDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
protected XWikiDocument prepareEditedDocument(XWikiContext context) throws XWikiException
{
// Determine the edited document (translation).
XWikiDocument editedDocument = getEditedDocument(context);
EditForm editForm = (EditForm) context.getForm();
// Update the edited document based on the template specified on the request.
readFromTemplate(editedDocument, editForm.getTemplate(), context);
// The default values from the template can be overwritten by additional request parameters.
updateDocumentTitleAndContentFromRequest(editedDocument, context);
editedDocument.readAddedUpdatedAndRemovedObjectsFromForm(editForm, context);
// If the metadata is modified, modify the effective metadata author
if (editedDocument.isMetaDataDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setEffectiveMetadataAuthor(userReference);
editedDocument.getAuthors().setOriginalMetadataAuthor(userReference);
}
// If the content is modified, modify the content author
if (editedDocument.isContentDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setContentAuthor(userReference);
}
// Set the current user as creator, author and contentAuthor when the edited document is newly created to avoid
// using XWikiGuest instead (because those fields were not previously initialized).
if (editedDocument.isNew()) {
editedDocument.setCreatorReference(context.getUserReference());
editedDocument.setAuthorReference(context.getUserReference());
editedDocument.setContentAuthorReference(context.getUserReference());
}
editedDocument.readTemporaryUploadedFiles(editForm);
// Expose the edited document on the XWiki context and the Velocity context.
putDocumentOnContext(editedDocument, context);
return editedDocument;
}
|
[
"CWE-94"
] |
CVE-2023-46243
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
prepareEditedDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
|
a0e6ca083b36be6f183b9af33ae735c1e02010f4
| 1
|
Analyze the following code function for security vulnerabilities
|
public void getClinicalData(StudyBean study,OdmClinicalDataBean data,String odmVersion,String studySubjectIds,String odmType){
String dbName = CoreResources.getDBName();
String subprev = "";
HashMap<String, Integer> sepos = new HashMap<String, Integer>();
String seprev = "";
String formprev = "";
HashMap<String, Integer> igpos = new HashMap<String, Integer>();
String igprev = "";
String oidPos = "";
HashMap<Integer, String> oidPoses = new HashMap<Integer, String>();
HashMap<Integer, String> idataOidPoses = new HashMap<Integer, String>();
String studyIds = study.getId() + "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClinicalData
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getClinicalData
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStoreDir(File path) {
setStoreDir(path.getAbsolutePath());
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2018-25068
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Feature #4100 Fix critical Vulnerability
"File.createTempFile" should not be used to create a directory
Function: setStoreDir
File: globalpomutils-fileresources/src/main/java/com/anrisoftware/globalpom/fileresourcemanager/FileResourceManagerProvider.java
Repository: devent/globalpom-utils
Fixed Code:
public void setStoreDir(File path) {
setStoreDir(path.getAbsolutePath());
}
|
[
"CWE-668"
] |
CVE-2018-25068
|
MEDIUM
| 6.5
|
devent/globalpom-utils
|
setStoreDir
|
globalpomutils-fileresources/src/main/java/com/anrisoftware/globalpom/fileresourcemanager/FileResourceManagerProvider.java
|
77a820bac2f68e662ce261ecb050c643bd7ee560
| 1
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setPasswordMinimumNonLetter(@NonNull ComponentName admin, int length) {
if (mService != null) {
try {
mService.setPasswordMinimumNonLetter(admin, length, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordMinimumNonLetter
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
|
setPasswordMinimumNonLetter
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected OortComet newOortComet(String cometURL, ClientTransport transport, ClientTransport[] otherTransports) {
return new OortComet(this, cometURL, getScheduler(), transport, otherTransports);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newOortComet
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
|
newOortComet
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
private void securityXmlGenerator(XmlGenerator gen, Config config) {
SecurityConfig c = config.getSecurityConfig();
if (c == null) {
return;
}
gen.open("security", "enabled", c.isEnabled())
.node("client-block-unmapped-actions", c.getClientBlockUnmappedActions());
PermissionPolicyConfig ppc = c.getClientPolicyConfig();
if (ppc.getClassName() != null) {
gen.open("client-permission-policy", "class-name", ppc.getClassName())
.appendProperties(ppc.getProperties())
.close();
}
Map<String, RealmConfig> realms = c.getRealmConfigs();
if (realms != null && !realms.isEmpty()) {
gen.open("realms");
for (Map.Entry<String, RealmConfig> realmEntry : realms.entrySet()) {
securityRealmGenerator(gen, realmEntry.getKey(), realmEntry.getValue());
}
gen.close();
}
addRealmReference(gen, "member-authentication", c.getMemberRealm());
addRealmReference(gen, "client-authentication", c.getClientRealm());
List<SecurityInterceptorConfig> sic = c.getSecurityInterceptorConfigs();
if (!sic.isEmpty()) {
gen.open("security-interceptors");
for (SecurityInterceptorConfig s : sic) {
gen.open("interceptor", "class-name", s.getClassName())
.close();
}
gen.close();
}
appendSecurityPermissions(gen, "client-permissions", c.getClientPermissionConfigs(),
"on-join-operation", c.getOnJoinPermissionOperation());
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: securityXmlGenerator
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
|
securityXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getZenMode() {
return mZenModeHelper.getZenMode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getZenMode
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
|
getZenMode
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isVerifyUnlockOnly() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVerifyUnlockOnly
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
isVerifyUnlockOnly
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public @TempAllowListType int getPushMessagingOverQuotaBehavior() {
synchronized (ActivityManagerService.this) {
return mConstants.mPushMessagingOverQuotaBehavior;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPushMessagingOverQuotaBehavior
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
|
getPushMessagingOverQuotaBehavior
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onConnectionFailed(ConnectionResult cr) {
setLocationManagerStatus(OUT_OF_SERVICE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onConnectionFailed
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onConnectionFailed
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void secureStoreXmlGenerator(XmlGenerator gen, SecureStoreConfig secureStoreConfig) {
if (secureStoreConfig != null) {
gen.open("secure-store");
if (secureStoreConfig instanceof JavaKeyStoreSecureStoreConfig) {
javaKeyStoreSecureStoreXmlGenerator(gen, (JavaKeyStoreSecureStoreConfig) secureStoreConfig);
} else if (secureStoreConfig instanceof VaultSecureStoreConfig) {
vaultSecureStoreXmlGenerator(gen, (VaultSecureStoreConfig) secureStoreConfig);
}
gen.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: secureStoreXmlGenerator
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
|
secureStoreXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean hasExactlyOneMatchingBranch(ConsoleResult branchList) {
return branchList.output().size() == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasExactlyOneMatchingBranch
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
hasExactlyOneMatchingBranch
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasStructureByInode (String inode) {
return getStructureByInode(inode) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasStructureByInode
File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
hasStructureByInode
|
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSameEndpoint(ClickHouseNode node) {
if (node == null) {
return false;
}
return baseUri.equals(node.baseUri);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSameEndpoint
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
isSameEndpoint
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
@BeforeAll
static void beforeAll(TestUtils setup)
{
// By default the minimal distribution used for the tests doesn't have any rights setup. Let's create an Admin
// user part of the Admin Group and make sure that this Admin Group has admin rights in the wiki. We could also
// have given that Admin user the admin right directly but the solution we chose is closer to the XS
// distribution.
setup.loginAsSuperAdmin();
setup.setGlobalRights("XWiki.XWikiAdminGroup", "", "admin", true);
setup.createAdminUser();
setup.loginAsAdmin();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beforeAll
File: xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/DocumentFieldsIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2023-40177
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
beforeAll
|
xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/DocumentFieldsIT.java
|
dfb1cde173e363ca5c12eb3654869f9719820262
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpAppRestrictionController(PrintWriter pw) {
pw.println("-------------------------------------------------------------------------------");
mAppRestrictionController.dump(pw, "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpAppRestrictionController
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
|
dumpAppRestrictionController
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
void handleUserSwitching(int userId) {
updateActiveGroup(userId, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleUserSwitching
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleUserSwitching
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeHeaderRow(HeaderRow row) {
getHeader().removeRow(row);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeHeaderRow
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
removeHeaderRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public void receiveLoop() throws IOException
{
byte[] msg = new byte[35004];
while (true)
{
int msglen = tc.receiveMessage(msg, 0, msg.length);
int type = msg[0] & 0xff;
if (type == Packets.SSH_MSG_IGNORE)
continue;
if (type == Packets.SSH_MSG_DEBUG)
{
if (log.isEnabled())
{
TypesReader tr = new TypesReader(msg, 0, msglen);
tr.readByte();
tr.readBoolean();
StringBuffer debugMessageBuffer = new StringBuffer();
debugMessageBuffer.append(tr.readString("UTF-8"));
for (int i = 0; i < debugMessageBuffer.length(); i++)
{
char c = debugMessageBuffer.charAt(i);
if ((c >= 32) && (c <= 126))
continue;
debugMessageBuffer.setCharAt(i, '\uFFFD');
}
log.log(50, "DEBUG Message from remote: '" + debugMessageBuffer.toString() + "'");
}
continue;
}
if (type == Packets.SSH_MSG_UNIMPLEMENTED)
{
throw new IOException("Peer sent UNIMPLEMENTED message, that should not happen.");
}
if (type == Packets.SSH_MSG_DISCONNECT)
{
TypesReader tr = new TypesReader(msg, 0, msglen);
tr.readByte();
int reason_code = tr.readUINT32();
StringBuffer reasonBuffer = new StringBuffer();
reasonBuffer.append(tr.readString("UTF-8"));
/*
* Do not get fooled by servers that send abnormal long error
* messages
*/
if (reasonBuffer.length() > 255)
{
reasonBuffer.setLength(255);
reasonBuffer.setCharAt(254, '.');
reasonBuffer.setCharAt(253, '.');
reasonBuffer.setCharAt(252, '.');
}
/*
* Also, check that the server did not send charcaters that may
* screw up the receiver -> restrict to reasonable US-ASCII
* subset -> "printable characters" (ASCII 32 - 126). Replace
* all others with 0xFFFD (UNICODE replacement character).
*/
for (int i = 0; i < reasonBuffer.length(); i++)
{
char c = reasonBuffer.charAt(i);
if ((c >= 32) && (c <= 126))
continue;
reasonBuffer.setCharAt(i, '\uFFFD');
}
throw new IOException("Peer sent DISCONNECT message (reason code " + reason_code + "): "
+ reasonBuffer.toString());
}
/*
* Is it a KEX Packet?
*/
if ((type == Packets.SSH_MSG_KEXINIT) || (type == Packets.SSH_MSG_NEWKEYS)
|| ((type >= 30) && (type <= 49)))
{
km.handleMessage(msg, msglen);
continue;
}
if (type == Packets.SSH_MSG_USERAUTH_SUCCESS) {
tc.startCompression();
}
if (type == Packets.SSH_MSG_EXT_INFO) {
// Update most-recently seen ext info (server can send this multiple times)
extensionInfo = ExtensionInfo.fromPacketExtInfo(
new PacketExtInfo(msg, 0, msglen));
continue;
}
MessageHandler mh = null;
for (int i = 0; i < messageHandlers.size(); i++)
{
HandlerEntry he = messageHandlers.elementAt(i);
if ((he.low <= type) && (type <= he.high))
{
mh = he.mh;
break;
}
}
if (mh == null)
throw new IOException("Unexpected SSH message (type " + type + ")");
mh.handleMessage(msg, msglen);
}
}
|
Vulnerability Classification:
- CWE: CWE-354
- CVE: CVE-2023-48795
- Severity: MEDIUM
- CVSS Score: 5.9
Description: Implement kex-strict from OpenSSH
Implement's OpenSSH's mitigation for the Terrapin attack.
Function: receiveLoop
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
Fixed Code:
public void receiveLoop() throws IOException
{
byte[] msg = new byte[35004];
while (true)
{
int msglen = tc.receiveMessage(msg, 0, msg.length);
int type = msg[0] & 0xff;
if (type == Packets.SSH_MSG_DISCONNECT)
{
TypesReader tr = new TypesReader(msg, 0, msglen);
tr.readByte();
int reason_code = tr.readUINT32();
StringBuffer reasonBuffer = new StringBuffer();
reasonBuffer.append(tr.readString("UTF-8"));
/*
* Do not get fooled by servers that send abnormal long error
* messages
*/
if (reasonBuffer.length() > 255)
{
reasonBuffer.setLength(255);
reasonBuffer.setCharAt(254, '.');
reasonBuffer.setCharAt(253, '.');
reasonBuffer.setCharAt(252, '.');
}
/*
* Also, check that the server did not send charcaters that may
* screw up the receiver -> restrict to reasonable US-ASCII
* subset -> "printable characters" (ASCII 32 - 126). Replace
* all others with 0xFFFD (UNICODE replacement character).
*/
for (int i = 0; i < reasonBuffer.length(); i++)
{
char c = reasonBuffer.charAt(i);
if ((c >= 32) && (c <= 126))
continue;
reasonBuffer.setCharAt(i, '\uFFFD');
}
throw new IOException("Peer sent DISCONNECT message (reason code " + reason_code + "): "
+ reasonBuffer.toString());
}
/*
* Is it a KEX Packet?
*/
if ((type == Packets.SSH_MSG_KEXINIT) || (type == Packets.SSH_MSG_NEWKEYS)
|| ((type >= 30) && (type <= 49)))
{
km.handleMessage(msg, msglen);
continue;
}
/*
* Any other packet should not be used when kex-strict is enabled.
*/
if (!firstKexFinished && km.isStrictKex())
{
throw new IOException("Unexpected packet received when kex-strict enabled");
}
if (type == Packets.SSH_MSG_IGNORE)
continue;
if (type == Packets.SSH_MSG_DEBUG)
{
if (log.isEnabled())
{
TypesReader tr = new TypesReader(msg, 0, msglen);
tr.readByte();
tr.readBoolean();
StringBuffer debugMessageBuffer = new StringBuffer();
debugMessageBuffer.append(tr.readString("UTF-8"));
for (int i = 0; i < debugMessageBuffer.length(); i++)
{
char c = debugMessageBuffer.charAt(i);
if ((c >= 32) && (c <= 126))
continue;
debugMessageBuffer.setCharAt(i, '\uFFFD');
}
log.log(50, "DEBUG Message from remote: '" + debugMessageBuffer.toString() + "'");
}
continue;
}
if (type == Packets.SSH_MSG_UNIMPLEMENTED)
{
throw new IOException("Peer sent UNIMPLEMENTED message, that should not happen.");
}
if (type == Packets.SSH_MSG_USERAUTH_SUCCESS) {
tc.startCompression();
}
if (type == Packets.SSH_MSG_EXT_INFO) {
// Update most-recently seen ext info (server can send this multiple times)
extensionInfo = ExtensionInfo.fromPacketExtInfo(
new PacketExtInfo(msg, 0, msglen));
continue;
}
MessageHandler mh = null;
for (int i = 0; i < messageHandlers.size(); i++)
{
HandlerEntry he = messageHandlers.elementAt(i);
if ((he.low <= type) && (type <= he.high))
{
mh = he.mh;
break;
}
}
if (mh == null)
throw new IOException("Unexpected SSH message (type " + type + ")");
mh.handleMessage(msg, msglen);
}
}
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
receiveLoop
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setResourceClientIdStrategy(ClientIdStrategyEnum theResourceClientIdStrategy) {
Validate.notNull(theResourceClientIdStrategy, "theClientIdStrategy must not be null");
myResourceClientIdStrategy = theResourceClientIdStrategy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceClientIdStrategy
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setResourceClientIdStrategy
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void transmit(AMQCommand c) throws IOException {
synchronized (_channelMutex) {
ensureIsOpen();
quiescingTransmit(c);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transmit
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
transmit
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public double getMaximumWidth() {
return getState(false).maxWidth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaximumWidth
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getMaximumWidth
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public StandardTemplateParams hideTime(boolean hideTime) {
mHideTime = hideTime;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hideTime
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
hideTime
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private File calcInitialDir(boolean exportCall) {
if (exportCall && lastExportFile != null) { // if this is an export-diagram call the diagram was exported once before (for consecutive export calls - see Issue 82)
return lastExportFile;
}
else if (file != null) { // otherwise if diagram has a fixed uxf path, use this
return file;
}
else { // otherwise use the last used save path
return new File(Config.getInstance().getSaveFileHome());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calcInitialDir
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
calcInitialDir
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void discoveryStrategyConfigXmlGenerator(XmlGenerator gen, DiscoveryConfig c) {
if (c == null) {
return;
}
gen.open("discovery-strategies");
String nodeFilterClass = classNameOrImplClass(c.getNodeFilterClass(), c.getNodeFilter());
if (nodeFilterClass != null) {
gen.node("node-filter", null, "class", nodeFilterClass);
}
Collection<DiscoveryStrategyConfig> configs = c.getDiscoveryStrategyConfigs();
if (CollectionUtil.isNotEmpty(configs)) {
for (DiscoveryStrategyConfig config : configs) {
gen.open("discovery-strategy",
"class", classNameOrImplClass(config.getClassName(), config.getDiscoveryStrategyFactory()),
"enabled", "true")
.appendProperties(config.getProperties())
.close();
}
}
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: discoveryStrategyConfigXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
discoveryStrategyConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
token = parseToken(tokenString, AccessToken.class);
idToken = parseToken(idTokenString, IDToken.class);
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2020-1714
- Severity: MEDIUM
- CVSS Score: 6.5
Description: [Keycloak-10162] Usage of ObjectInputStream without checking the object types
Function: readObject
File: core/src/main/java/org/keycloak/KeycloakSecurityContext.java
Repository: keycloak
Fixed Code:
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
DelegatingSerializationFilter filter = new DelegatingSerializationFilter();
filter.setFilter(in, "org.keycloak.KeycloakSecurityContext;!*");
in.defaultReadObject();
token = parseToken(tokenString, AccessToken.class);
idToken = parseToken(idTokenString, IDToken.class);
}
|
[
"CWE-20"
] |
CVE-2020-1714
|
MEDIUM
| 6.5
|
keycloak
|
readObject
|
core/src/main/java/org/keycloak/KeycloakSecurityContext.java
|
d5483d884de797e2ef6e69f92085bc10bf87e864
| 1
|
Analyze the following code function for security vulnerabilities
|
private void notifyIfManagedSubscriptionsAreUnavailable(
UserHandle managedProfile, boolean managedProfileAvailable) {
if (!isManagedProfile(managedProfile.getIdentifier())) {
Slog.wtf(
LOG_TAG,
"Expected managed profile when notified of profile availability change.");
}
if (getManagedSubscriptionsPolicy().getPolicyType()
!= ManagedSubscriptionsPolicy.TYPE_ALL_MANAGED_SUBSCRIPTIONS) {
// There may be a subscription in the personal profile, in which case calls and
// texts may still be available. No need to notify the user.
return;
}
if (managedProfileAvailable) {
// When quiet mode is switched off calls and texts then become available to the user,
// so no need to keep showing the notification.
mInjector
.getNotificationManager()
.cancel(SystemMessage.NOTE_ALL_MANAGED_SUBSCRIPTIONS_AND_MANAGED_PROFILE_OFF);
return;
}
final Intent intent = new Intent(ACTION_TURN_PROFILE_ON_NOTIFICATION);
intent.putExtra(Intent.EXTRA_USER_HANDLE, managedProfile.getIdentifier());
final PendingIntent pendingIntent =
mInjector.pendingIntentGetBroadcast(
mContext,
/* requestCode= */ 0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
final Notification.Action turnProfileOnButton =
new Notification.Action.Builder(
/* icon= */ null, getUnpauseWorkAppsButtonText(), pendingIntent)
.build();
final Bundle extras = new Bundle();
extras.putString(
Notification.EXTRA_SUBSTITUTE_APP_NAME, getWorkProfileContentDescription());
final Notification notification =
new Notification.Builder(mContext, SystemNotificationChannels.DEVICE_ADMIN)
.setSmallIcon(R.drawable.ic_phone_disabled)
.setContentTitle(getUnpauseWorkAppsForTelephonyTitle())
.setContentText(getUnpauseWorkAppsForTelephonyText())
.setStyle(new Notification.BigTextStyle().bigText(
getUnpauseWorkAppsForTelephonyText()))
.addAction(turnProfileOnButton)
.addExtras(extras)
.setOngoing(false)
.setShowWhen(true)
.setAutoCancel(true)
.build();
mInjector
.getNotificationManager()
.notifyAsUser(
/* tag= */ null,
SystemMessage.NOTE_ALL_MANAGED_SUBSCRIPTIONS_AND_MANAGED_PROFILE_OFF,
notification,
UserHandle.of(getProfileParentId(managedProfile.getIdentifier())));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyIfManagedSubscriptionsAreUnavailable
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
notifyIfManagedSubscriptionsAreUnavailable
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void requestBugReportWithDescription(@Nullable String shareTitle,
@Nullable String shareDescription, int bugreportType, long nonce) {
String type = null;
switch (bugreportType) {
case BugreportParams.BUGREPORT_MODE_FULL:
type = "bugreportfull";
break;
case BugreportParams.BUGREPORT_MODE_INTERACTIVE:
type = "bugreportplus";
break;
case BugreportParams.BUGREPORT_MODE_REMOTE:
type = "bugreportremote";
break;
case BugreportParams.BUGREPORT_MODE_WEAR:
type = "bugreportwear";
break;
case BugreportParams.BUGREPORT_MODE_TELEPHONY:
type = "bugreporttelephony";
break;
case BugreportParams.BUGREPORT_MODE_WIFI:
type = "bugreportwifi";
break;
default:
throw new IllegalArgumentException(
"Provided bugreport type is not correct, value: "
+ bugreportType);
}
// Always log caller, even if it does not have permission to dump.
Slog.i(TAG, type + " requested by UID " + Binder.getCallingUid());
enforceCallingPermission(android.Manifest.permission.DUMP, "requestBugReport");
if (!TextUtils.isEmpty(shareTitle)) {
if (shareTitle.length() > MAX_BUGREPORT_TITLE_SIZE) {
String errorStr = "shareTitle should be less than "
+ MAX_BUGREPORT_TITLE_SIZE + " characters";
throw new IllegalArgumentException(errorStr);
}
if (!TextUtils.isEmpty(shareDescription)) {
if (shareDescription.length() > MAX_BUGREPORT_DESCRIPTION_SIZE) {
String errorStr = "shareDescription should be less than "
+ MAX_BUGREPORT_DESCRIPTION_SIZE + " characters";
throw new IllegalArgumentException(errorStr);
}
}
Slog.d(TAG, "Bugreport notification title " + shareTitle
+ " description " + shareDescription);
}
// Create intent to trigger Bugreport API via Shell
Intent triggerShellBugreport = new Intent();
triggerShellBugreport.setAction(INTENT_BUGREPORT_REQUESTED);
triggerShellBugreport.setPackage(SHELL_APP_PACKAGE);
triggerShellBugreport.putExtra(EXTRA_BUGREPORT_TYPE, bugreportType);
triggerShellBugreport.putExtra(EXTRA_BUGREPORT_NONCE, nonce);
triggerShellBugreport.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
triggerShellBugreport.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
if (shareTitle != null) {
triggerShellBugreport.putExtra(EXTRA_TITLE, shareTitle);
}
if (shareDescription != null) {
triggerShellBugreport.putExtra(EXTRA_DESCRIPTION, shareDescription);
}
final long identity = Binder.clearCallingIdentity();
try {
// Send broadcast to shell to trigger bugreport using Bugreport API
mContext.sendBroadcastAsUser(triggerShellBugreport, UserHandle.SYSTEM);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestBugReportWithDescription
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
|
requestBugReportWithDescription
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public NioParams getNioParams() {
return nioParams;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNioParams
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getNioParams
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private Pair<File, File> validateFiles(File npmFolder)
throws ExecutionFailedException {
assert port == 0;
// Skip checks if we have a webpack-dev-server already running
File webpack = new File(npmFolder, WEBPACK_SERVER);
File webpackConfig = new File(npmFolder, FrontendUtils.WEBPACK_CONFIG);
if (!npmFolder.exists()) {
getLogger().warn("No project folder '{}' exists", npmFolder);
throw new ExecutionFailedException(START_FAILURE
+ " the target execution folder doesn't exist.");
}
if (!webpack.exists()) {
getLogger().warn("'{}' doesn't exist. Did you run `npm install`?",
webpack);
throw new ExecutionFailedException(String.format(
"%s '%s' doesn't exist. `npm install` has not run or failed.",
START_FAILURE, webpack));
} else if (!webpack.canExecute()) {
getLogger().warn(
" '{}' is not an executable. Did you run `npm install`?",
webpack);
throw new ExecutionFailedException(String.format(
"%s '%s' is not an executable."
+ " `npm install` has not run or failed.",
START_FAILURE, webpack));
}
if (!webpackConfig.canRead()) {
getLogger().warn(
"Webpack configuration '{}' is not found or is not readable.",
webpackConfig);
throw new ExecutionFailedException(
String.format("%s '%s' doesn't exist or is not readable.",
START_FAILURE, webpackConfig));
}
return new Pair<>(webpack, webpackConfig);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateFiles
File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
validateFiles
|
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendMessage(String toUserId, String toChannel, Object data) {
sendMessage(Collections.singleton(toUserId), toChannel, data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMessage
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
sendMessage
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyUnsafeOperationStateChanged(DevicePolicySafetyChecker checker, int reason,
boolean isSafe) {
// TODO(b/178494483): use EventLog instead
// TODO(b/178494483): log metrics?
if (VERBOSE_LOG) {
Slogf.v(LOG_TAG, "notifyUnsafeOperationStateChanged(): %s=%b",
DevicePolicyManager.operationSafetyReasonToString(reason), isSafe);
}
Preconditions.checkArgument(mSafetyChecker == checker,
"invalid checker: should be %s, was %s", mSafetyChecker, checker);
Bundle extras = new Bundle();
extras.putInt(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_REASON, reason);
extras.putBoolean(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_STATE, isSafe);
if (mOwners.hasDeviceOwner()) {
if (VERBOSE_LOG) Slogf.v(LOG_TAG, "Notifying DO");
sendDeviceOwnerCommand(DeviceAdminReceiver.ACTION_OPERATION_SAFETY_STATE_CHANGED,
extras);
}
for (int profileOwnerId : mOwners.getProfileOwnerKeys()) {
if (VERBOSE_LOG) Slogf.v(LOG_TAG, "Notifying PO for user " + profileOwnerId);
sendProfileOwnerCommand(DeviceAdminReceiver.ACTION_OPERATION_SAFETY_STATE_CHANGED,
extras, profileOwnerId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyUnsafeOperationStateChanged
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
|
notifyUnsafeOperationStateChanged
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test (expected = IllegalArgumentException.class)
public void parseQueryMTypeWGroupByFilterMissingClose() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{host=wildcard(*tsort)}"
+ "{host=wildcard(*quirm)");
parseQuery.invoke(rpc, tsdb, query, expressions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWGroupByFilterMissingClose
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWGroupByFilterMissingClose
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setKeyLength(Integer keyLength) {
this.keyLength = keyLength;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyLength
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setKeyLength
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder pingIntervalMillis(long pingIntervalMillis) {
checkArgument(pingIntervalMillis == 0 || pingIntervalMillis >= MIN_PING_INTERVAL_MILLIS,
"pingIntervalMillis: %s (expected: >= %s or == 0)", pingIntervalMillis,
MIN_PING_INTERVAL_MILLIS);
this.pingIntervalMillis = pingIntervalMillis;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pingIntervalMillis
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
pingIntervalMillis
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public TProtocol getProtocol(TTransport trans) {
TBinaryProtocol proto = new TBinaryProtocol(trans, strictRead_, strictWrite_);
if (readLength_ != 0) {
proto.setReadLength(readLength_);
}
return proto;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProtocol
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
getProtocol
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setInput(Reader in) throws XmlPullParserException {
throw new XmlPullParserException("setInput() not supported");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInput
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
|
setInput
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void closeQuietly(@Nullable AutoCloseable closeable) {
android.os.FileUtils.closeQuietly(closeable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeQuietly
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
|
closeQuietly
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public String decrypt(String msgSignature, String timeStamp, String nonce, String encryptedXml) {
// 密钥,公众账号的app corpSecret
// 提取密文
String cipherText = extractEncryptPart(encryptedXml);
// 验证安全签名
String signature = SHA1.gen(this.token, timeStamp, nonce, cipherText);
if (!signature.equals(msgSignature)) {
throw new RuntimeException("加密消息签名校验失败");
}
// 解密
return decrypt(cipherText);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decrypt
File: weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java
Repository: Wechat-Group/WxJava
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20318
|
HIGH
| 7.5
|
Wechat-Group/WxJava
|
decrypt
|
weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java
|
6272639f02e397fed40828a2d0da66c30264bc0e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void multicastConfigXmlGenerator(XmlGenerator gen, JoinConfig join) {
MulticastConfig mcConfig = join.getMulticastConfig();
gen.open("multicast", "enabled", mcConfig.isEnabled(), "loopbackModeEnabled", mcConfig.getLoopbackModeEnabled())
.node("multicast-group", mcConfig.getMulticastGroup())
.node("multicast-port", mcConfig.getMulticastPort())
.node("multicast-timeout-seconds", mcConfig.getMulticastTimeoutSeconds())
.node("multicast-time-to-live", mcConfig.getMulticastTimeToLive());
trustedInterfacesXmlGenerator(gen, mcConfig.getTrustedInterfaces());
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: multicastConfigXmlGenerator
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
|
multicastConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public Executor getContextExecutor() {
return contextExecutor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContextExecutor
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
getContextExecutor
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isCompatible(WanReplicationRef c1, WanReplicationRef c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.getMergePolicy(), c2.getMergePolicy())
&& nullSafeEqual(c1.getFilters(), c2.getFilters())
&& nullSafeEqual(c1.isRepublishingEnabled(), c2.isRepublishingEnabled());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatible
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
|
isCompatible
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onNothingSelected(AdapterView<?> parent) {
// Do nothing intentionally.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNothingSelected
File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2015-1261
|
MEDIUM
| 5
|
chromium
|
onNothingSelected
|
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
|
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logPerformShow(String prefix) {
if (DEBUG_VISIBILITY
|| (DEBUG_STARTING_WINDOW_VERBOSE && mAttrs.type == TYPE_APPLICATION_STARTING)) {
Slog.v(TAG, prefix + this
+ ": mDrawState=" + mWinAnimator.drawStateToString()
+ " readyForDisplay=" + isReadyForDisplay()
+ " starting=" + (mAttrs.type == TYPE_APPLICATION_STARTING)
+ " during animation: policyVis=" + isVisibleByPolicy()
+ " parentHidden=" + isParentWindowHidden()
+ " tok.visibleRequested="
+ (mActivityRecord != null && mActivityRecord.mVisibleRequested)
+ " tok.visible=" + (mActivityRecord != null && mActivityRecord.isVisible())
+ " animating=" + isAnimating(TRANSITION | PARENTS)
+ " tok animating="
+ (mActivityRecord != null && mActivityRecord.isAnimating(TRANSITION | PARENTS))
+ " Callers=" + Debug.getCallers(4));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logPerformShow
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
logPerformShow
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setColor(Object graphics, int RGB) {
((AndroidGraphics) graphics).setColor((getColor(graphics) & 0xff000000) | RGB);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setColor
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
|
setColor
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void enableScreenIfNeeded() {
synchronized (mWindowMap) {
enableScreenIfNeededLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableScreenIfNeeded
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
|
enableScreenIfNeeded
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void adjustWindowParamsLw(WindowManager.LayoutParams attrs) {
switch (attrs.type) {
case TYPE_SYSTEM_OVERLAY:
case TYPE_SECURE_SYSTEM_OVERLAY:
// These types of windows can't receive input events.
attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
attrs.flags &= ~WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
break;
case TYPE_STATUS_BAR:
// If the Keyguard is in a hidden state (occluded by another window), we force to
// remove the wallpaper and keyguard flag so that any change in-flight after setting
// the keyguard as occluded wouldn't set these flags again.
// See {@link #processKeyguardSetHiddenResultLw}.
if (mKeyguardHidden) {
attrs.flags &= ~WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
}
break;
}
if (attrs.type != TYPE_STATUS_BAR) {
// The status bar is the only window allowed to exhibit keyguard behavior.
attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
}
if (ActivityManager.isHighEndGfx()
&& (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustWindowParamsLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
adjustWindowParamsLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean validatePassword(LockscreenCredential credential) {
final byte[] password = credential.getCredential();
mValidationErrors = PasswordMetrics.validatePassword(
mMinMetrics, mMinComplexity, !mIsAlphaMode, password);
if (mValidationErrors.isEmpty() && mLockPatternUtils.checkPasswordHistory(
password, getPasswordHistoryHashFactor(), mUserId)) {
mValidationErrors =
Collections.singletonList(new PasswordValidationError(RECENTLY_USED));
}
return mValidationErrors.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validatePassword
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
validatePassword
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
BluetoothSocket accept(int timeout) throws IOException {
BluetoothSocket acceptedSocket;
if (mSocketState != SocketState.LISTENING) throw new IOException("bt socket is not in listen state");
if(timeout > 0) {
Log.d(TAG, "accept() set timeout (ms):" + timeout);
mSocket.setSoTimeout(timeout);
}
String RemoteAddr = waitSocketSignal(mSocketIS);
if(timeout > 0)
mSocket.setSoTimeout(0);
synchronized(this)
{
if (mSocketState != SocketState.LISTENING)
throw new IOException("bt socket is not in listen state");
acceptedSocket = acceptSocket(RemoteAddr);
//quick drop the reference of the file handle
}
return acceptedSocket;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: accept
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
accept
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRoleHoldersChanged(@NonNull String roleName, @NonNull UserHandle user) {
mDevicePolicyEngine.handleRoleChanged(roleName, user.getIdentifier());
if (RoleManager.ROLE_DEVICE_POLICY_MANAGEMENT.equals(roleName)) {
handleDevicePolicyManagementRoleChange(user);
return;
}
if (RoleManager.ROLE_FINANCED_DEVICE_KIOSK.equals(roleName)) {
handleFinancedDeviceKioskRoleChange();
return;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRoleHoldersChanged
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
onRoleHoldersChanged
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readAccountInfoLocked() {
int highestAuthorityId = -1;
FileInputStream fis = null;
try {
fis = mAccountInfoFile.openRead();
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG_FILE, "Reading " + mAccountInfoFile.getBaseFile());
}
XmlPullParser parser = Xml.newPullParser();
parser.setInput(fis, null);
int eventType = parser.getEventType();
while (eventType != XmlPullParser.START_TAG &&
eventType != XmlPullParser.END_DOCUMENT) {
eventType = parser.next();
}
if (eventType == XmlPullParser.END_DOCUMENT) {
Log.i(TAG, "No initial accounts");
return;
}
String tagName = parser.getName();
if ("accounts".equals(tagName)) {
String listen = parser.getAttributeValue(null, XML_ATTR_LISTEN_FOR_TICKLES);
String versionString = parser.getAttributeValue(null, "version");
int version;
try {
version = (versionString == null) ? 0 : Integer.parseInt(versionString);
} catch (NumberFormatException e) {
version = 0;
}
String nextIdString = parser.getAttributeValue(null, XML_ATTR_NEXT_AUTHORITY_ID);
try {
int id = (nextIdString == null) ? 0 : Integer.parseInt(nextIdString);
mNextAuthorityId = Math.max(mNextAuthorityId, id);
} catch (NumberFormatException e) {
// don't care
}
String offsetString = parser.getAttributeValue(null, XML_ATTR_SYNC_RANDOM_OFFSET);
try {
mSyncRandomOffset = (offsetString == null) ? 0 : Integer.parseInt(offsetString);
} catch (NumberFormatException e) {
mSyncRandomOffset = 0;
}
if (mSyncRandomOffset == 0) {
Random random = new Random(System.currentTimeMillis());
mSyncRandomOffset = random.nextInt(86400);
}
mMasterSyncAutomatically.put(0, listen == null || Boolean.parseBoolean(listen));
eventType = parser.next();
AuthorityInfo authority = null;
PeriodicSync periodicSync = null;
do {
if (eventType == XmlPullParser.START_TAG) {
tagName = parser.getName();
if (parser.getDepth() == 2) {
if ("authority".equals(tagName)) {
authority = parseAuthority(parser, version);
periodicSync = null;
if (authority.ident > highestAuthorityId) {
highestAuthorityId = authority.ident;
}
} else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
parseListenForTickles(parser);
}
} else if (parser.getDepth() == 3) {
if ("periodicSync".equals(tagName) && authority != null) {
periodicSync = parsePeriodicSync(parser, authority);
}
} else if (parser.getDepth() == 4 && periodicSync != null) {
if ("extra".equals(tagName)) {
parseExtra(parser, periodicSync.extras);
}
}
}
eventType = parser.next();
} while (eventType != XmlPullParser.END_DOCUMENT);
}
} catch (XmlPullParserException e) {
Log.w(TAG, "Error reading accounts", e);
return;
} catch (java.io.IOException e) {
if (fis == null) Log.i(TAG, "No initial accounts");
else Log.w(TAG, "Error reading accounts", e);
return;
} finally {
mNextAuthorityId = Math.max(highestAuthorityId + 1, mNextAuthorityId);
if (fis != null) {
try {
fis.close();
} catch (java.io.IOException e1) {
}
}
}
maybeMigrateSettingsForRenamedAuthorities();
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2016-2424
- Severity: HIGH
- CVSS Score: 7.1
Description: NPE fix for SyncStorageEngine read authority am: a962d9eba7 am: 339c4f2b05
am: 58048c1f17
* commit '58048c1f17d54166c6a048af2365d17dd32f4d57':
NPE fix for SyncStorageEngine read authority
Function: readAccountInfoLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
Fixed Code:
private void readAccountInfoLocked() {
int highestAuthorityId = -1;
FileInputStream fis = null;
try {
fis = mAccountInfoFile.openRead();
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG_FILE, "Reading " + mAccountInfoFile.getBaseFile());
}
XmlPullParser parser = Xml.newPullParser();
parser.setInput(fis, null);
int eventType = parser.getEventType();
while (eventType != XmlPullParser.START_TAG &&
eventType != XmlPullParser.END_DOCUMENT) {
eventType = parser.next();
}
if (eventType == XmlPullParser.END_DOCUMENT) {
Log.i(TAG, "No initial accounts");
return;
}
String tagName = parser.getName();
if ("accounts".equals(tagName)) {
String listen = parser.getAttributeValue(null, XML_ATTR_LISTEN_FOR_TICKLES);
String versionString = parser.getAttributeValue(null, "version");
int version;
try {
version = (versionString == null) ? 0 : Integer.parseInt(versionString);
} catch (NumberFormatException e) {
version = 0;
}
String nextIdString = parser.getAttributeValue(null, XML_ATTR_NEXT_AUTHORITY_ID);
try {
int id = (nextIdString == null) ? 0 : Integer.parseInt(nextIdString);
mNextAuthorityId = Math.max(mNextAuthorityId, id);
} catch (NumberFormatException e) {
// don't care
}
String offsetString = parser.getAttributeValue(null, XML_ATTR_SYNC_RANDOM_OFFSET);
try {
mSyncRandomOffset = (offsetString == null) ? 0 : Integer.parseInt(offsetString);
} catch (NumberFormatException e) {
mSyncRandomOffset = 0;
}
if (mSyncRandomOffset == 0) {
Random random = new Random(System.currentTimeMillis());
mSyncRandomOffset = random.nextInt(86400);
}
mMasterSyncAutomatically.put(0, listen == null || Boolean.parseBoolean(listen));
eventType = parser.next();
AuthorityInfo authority = null;
PeriodicSync periodicSync = null;
do {
if (eventType == XmlPullParser.START_TAG) {
tagName = parser.getName();
if (parser.getDepth() == 2) {
if ("authority".equals(tagName)) {
authority = parseAuthority(parser, version);
periodicSync = null;
if (authority != null) {
if (authority.ident > highestAuthorityId) {
highestAuthorityId = authority.ident;
}
} else {
EventLog.writeEvent(0x534e4554, "26513719", -1,
"Malformed authority");
}
} else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
parseListenForTickles(parser);
}
} else if (parser.getDepth() == 3) {
if ("periodicSync".equals(tagName) && authority != null) {
periodicSync = parsePeriodicSync(parser, authority);
}
} else if (parser.getDepth() == 4 && periodicSync != null) {
if ("extra".equals(tagName)) {
parseExtra(parser, periodicSync.extras);
}
}
}
eventType = parser.next();
} while (eventType != XmlPullParser.END_DOCUMENT);
}
} catch (XmlPullParserException e) {
Log.w(TAG, "Error reading accounts", e);
return;
} catch (java.io.IOException e) {
if (fis == null) Log.i(TAG, "No initial accounts");
else Log.w(TAG, "Error reading accounts", e);
return;
} finally {
mNextAuthorityId = Math.max(highestAuthorityId + 1, mNextAuthorityId);
if (fis != null) {
try {
fis.close();
} catch (java.io.IOException e1) {
}
}
}
maybeMigrateSettingsForRenamedAuthorities();
}
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
readAccountInfoLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 1
|
Analyze the following code function for security vulnerabilities
|
void doSetVisibility(final boolean visible) {
if (getActivity() == null) {
return;
}
getActivity().runOnUiThread(new Runnable() {
public void run() {
currentVisible = visible ? View.VISIBLE : View.INVISIBLE;
v.setVisibility(currentVisible);
if (visible) {
v.bringToFront();
}
}
});
if(visible){
layoutPeer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSetVisibility
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
|
doSetVisibility
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void filterContent(String value, String customXssString) {
if (value == null || "".equals(value)) {
return;
}
// 统一转为小写
value = value.toLowerCase();
//SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE
value = value.replaceAll("/\\*.*\\*/","");
String[] xssArr = XSS_STR.split("\\|");
for (int i = 0; i < xssArr.length; i++) {
if (value.indexOf(xssArr[i]) > -1) {
log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]);
log.error("请注意,值可能存在SQL注入风险!---> {}", value);
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
}
//update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号
if (customXssString != null) {
String[] xssArr2 = customXssString.split("\\|");
for (int i = 0; i < xssArr2.length; i++) {
if (value.indexOf(xssArr2[i]) > -1) {
log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]);
log.error("请注意,值可能存在SQL注入风险!---> {}", value);
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
}
}
//update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号
if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
return;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-45206
- Severity: CRITICAL
- CVSS Score: 9.8
Description: sql注入检查更加严格,修复/sys/duplicate/check存在sql注入漏洞 #4129
Function: filterContent
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SqlInjectionUtil.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
public static void filterContent(String value, String customXssString) {
if (value == null || "".equals(value)) {
return;
}
// 校验sql注释 不允许有sql注释
checkSqlAnnotation(value);
// 统一转为小写
value = value.toLowerCase();
//SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE
//value = value.replaceAll("/\\*.*\\*/","");
String[] xssArr = XSS_STR.split("\\|");
for (int i = 0; i < xssArr.length; i++) {
if (value.indexOf(xssArr[i]) > -1) {
log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]);
log.error("请注意,值可能存在SQL注入风险!---> {}", value);
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
}
//update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号
if (customXssString != null) {
String[] xssArr2 = customXssString.split("\\|");
for (int i = 0; i < xssArr2.length; i++) {
if (value.indexOf(xssArr2[i]) > -1) {
log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]);
log.error("请注意,值可能存在SQL注入风险!---> {}", value);
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
}
}
//update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号
if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){
throw new RuntimeException("请注意,值可能存在SQL注入风险!--->" + value);
}
return;
}
|
[
"CWE-89"
] |
CVE-2022-45206
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
filterContent
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SqlInjectionUtil.java
|
f18ced524c9ec13e876bfb74785a1b112cc8b6bb
| 1
|
Analyze the following code function for security vulnerabilities
|
public Object getPasteDataFromClipboard() {
if (getContext() == null) {
return null;
}
final Object[] response = new Object[1];
runOnUiThreadAndBlock(new Runnable() {
@Override
public void run() {
int sdk = android.os.Build.VERSION.SDK_INT;
if (sdk < 11) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
response[0] = clipboard.getText().toString();
} else {
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData.Item item = clipboard.getPrimaryClip().getItemAt(0);
response[0] = item.getText();
}
}
});
return response[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasteDataFromClipboard
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
|
getPasteDataFromClipboard
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@ProxyFromPrimaryToCurrentUser
public void onToggleRecents() {
if (mSystemServicesProxy.isForegroundUserOwner()) {
toggleRecents();
} else {
Intent intent = createLocalBroadcastIntent(mContext,
RecentsUserEventProxyReceiver.ACTION_PROXY_TOGGLE_RECENTS_TO_USER);
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-0813
- Severity: MEDIUM
- CVSS Score: 6.6
Description: DO NOT MERGE Ensure that the device is provisioned before showing Recents.
Bug: 25476219
Change-Id: I5bb9cca74790521de71c0037b4f2421c3d21b3f6
Function: onToggleRecents
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
Fixed Code:
@ProxyFromPrimaryToCurrentUser
public void onToggleRecents() {
// Ensure the device has been provisioned before allowing the user to interact with
// recents
if (!isDeviceProvisioned()) {
return;
}
if (mSystemServicesProxy.isForegroundUserOwner()) {
toggleRecents();
} else {
Intent intent = createLocalBroadcastIntent(mContext,
RecentsUserEventProxyReceiver.ACTION_PROXY_TOGGLE_RECENTS_TO_USER);
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
}
}
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
onToggleRecents
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 1
|
Analyze the following code function for security vulnerabilities
|
private String getThemeKey(String themeName) {
return "themes/" + themeName + ".css";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThemeKey
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getThemeKey
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public Data getData() {
Data data = new Data();
data.className = getClass().getName();
data.code = code;
data.message = getMessage();
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getData
File: base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getData
|
base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isEPersonInGroup(Context context, Group group, EPerson ePerson)
throws SQLException {
return groupDAO.findByIdAndMembership(context, group.getID(), ePerson) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEPersonInGroup
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
isEPersonInGroup
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public StageResult completeAllJobs(Stage stage, JobResult jobResult) {
for (JobInstance job : stage.getJobInstances()) {
JobInstanceMother.setBuildingState(job);
job.setAgentUuid(AGENT_UUID);
job.completing(jobResult);
job.completed(new DateTime().plusMinutes(5).toDate());
jobInstanceDao.updateAssignedInfo(job);
}
StageResult stageResult;
switch (jobResult) {
case Failed:
stageResult = StageResult.Failed;
break;
case Cancelled:
stageResult = StageResult.Cancelled;
break;
default:
stageResult = StageResult.Passed;
}
stage.calculateResult();
return stageResult;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: completeAllJobs
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
|
completeAllJobs
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onBackPressed() {
// If we are showing the wait fragment, just exit.
if (getWaitFragment() != null) {
finish();
} else {
super.onBackPressed();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBackPressed
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
|
onBackPressed
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onPause() {
mAdminSecondaryLockScreenController.hide();
if (mCurrentSecurityMode != SecurityMode.None) {
getCurrentSecurityController().onPause();
}
mView.onPause();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPause
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
onPause
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
static void openAccess0(AccessibleObject object, boolean isAccessible) {
if (object == null) throw new NullPointerException("object");
usf.putBoolean(object, overrideOffset, isAccessible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openAccess0
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
openAccess0
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void javaKeyStoreSecureStoreXmlGenerator(XmlGenerator gen, JavaKeyStoreSecureStoreConfig secureStoreConfig) {
gen.open("keystore")
.node("path", secureStoreConfig.getPath().getAbsolutePath())
.node("type", secureStoreConfig.getType())
.node("password", getOrMaskValue(secureStoreConfig.getPassword()))
.node("polling-interval", secureStoreConfig.getPollingInterval())
.node("current-key-alias", secureStoreConfig.getCurrentKeyAlias());
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: javaKeyStoreSecureStoreXmlGenerator
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
|
javaKeyStoreSecureStoreXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
ModelAndView getArtifact(String filePath, ArtifactFolderViewFactory folderViewFactory, String pipelineName, String counterOrLabel, String stageName, String stageCounter, String buildName, String sha, String serverAlias) throws Exception {
LOGGER.info("[Artifact Download] Trying to resolve '{}' for '{}/{}/{}/{}/{}'", filePath, pipelineName, counterOrLabel, stageName, stageCounter, buildName);
long before = System.currentTimeMillis();
ArtifactsView view;
//Work out the job that we are trying to retrieve
JobIdentifier translatedId;
try {
translatedId = restfulService.findJob(pipelineName, counterOrLabel, stageName, stageCounter, buildName);
} catch (Exception e) {
return buildNotFound(pipelineName, counterOrLabel, stageName, stageCounter, buildName);
}
if (filePath.contains("..")) {
return FileModelAndView.forbiddenUrl(filePath);
}
view = new LocalArtifactsView(folderViewFactory, artifactsService, translatedId, consoleService);
ModelAndView createdView = view.createView(filePath, sha);
LOGGER.info("[Artifact Download] Successfully resolved '{}' for '{}/{}/{}/{}/{}'. It took: {}ms", filePath, pipelineName, counterOrLabel, stageName, stageCounter, buildName, System.currentTimeMillis() - before);
return createdView;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-43289
- Severity: MEDIUM
- CVSS Score: 5.0
Description: #000 - Validate stage counter in GETs as well.
Continuation of commit c22e0428164af
Function: getArtifact
File: server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
Repository: gocd
Fixed Code:
ModelAndView getArtifact(String filePath, ArtifactFolderViewFactory folderViewFactory, String pipelineName, String counterOrLabel, String stageName, String stageCounter, String buildName, String sha, String serverAlias) throws Exception {
LOGGER.info("[Artifact Download] Trying to resolve '{}' for '{}/{}/{}/{}/{}'", filePath, pipelineName, counterOrLabel, stageName, stageCounter, buildName);
if (!isValidStageCounter(stageCounter)) {
return buildNotFound(pipelineName, counterOrLabel, stageName, stageCounter, buildName);
}
long before = System.currentTimeMillis();
ArtifactsView view;
//Work out the job that we are trying to retrieve
JobIdentifier translatedId;
try {
translatedId = restfulService.findJob(pipelineName, counterOrLabel, stageName, stageCounter, buildName);
} catch (Exception e) {
return buildNotFound(pipelineName, counterOrLabel, stageName, stageCounter, buildName);
}
if (filePath.contains("..")) {
return FileModelAndView.forbiddenUrl(filePath);
}
view = new LocalArtifactsView(folderViewFactory, artifactsService, translatedId, consoleService);
ModelAndView createdView = view.createView(filePath, sha);
LOGGER.info("[Artifact Download] Successfully resolved '{}' for '{}/{}/{}/{}/{}'. It took: {}ms", filePath, pipelineName, counterOrLabel, stageName, stageCounter, buildName, System.currentTimeMillis() - before);
return createdView;
}
|
[
"CWE-22"
] |
CVE-2021-43289
|
MEDIUM
| 5
|
gocd
|
getArtifact
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 1
|
Analyze the following code function for security vulnerabilities
|
public static Document parseDocument(java.io.InputStream is) throws XMLException {
return parseDocument(new InputSource(is));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDocument
File: bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
Repository: dbeaver
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3836
|
MEDIUM
| 4.3
|
dbeaver
|
parseDocument
|
bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
|
4debf8f25184b7283681ed3fb5e9e887d9d4fe22
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, Set<String>> getCaseSetMap(List<IssuesDao> issues) {
List<String> ids = issues.stream().map(Issues::getId).collect(Collectors.toList());
Map<String, Set<String>> map = new HashMap<>();
if (ids.size() == 0) {
return map;
}
TestCaseIssuesExample example = new TestCaseIssuesExample();
example.createCriteria()
.andIssuesIdIn(ids);
List<TestCaseIssues> testCaseIssues = testCaseIssuesMapper.selectByExample(example);
List<String> caseIds = testCaseIssues.stream().map(x ->
x.getRefType().equals(IssueRefType.PLAN_FUNCTIONAL.name()) ? x.getRefId() : x.getResourceId())
.collect(Collectors.toList());
List<TestCaseDTO> notInTrashCase = testCaseService.getTestCaseByIds(caseIds);
if (CollectionUtils.isNotEmpty(notInTrashCase)) {
Set<String> notInTrashCaseSet = notInTrashCase.stream()
.map(TestCaseDTO::getId)
.collect(Collectors.toSet());
testCaseIssues.forEach(i -> {
Set<String> caseIdSet = new HashSet<>();
String caseId = i.getRefType().equals(IssueRefType.PLAN_FUNCTIONAL.name()) ? i.getRefId() : i.getResourceId();
if (notInTrashCaseSet.contains(caseId)) {
caseIdSet.add(caseId);
}
if (map.get(i.getIssuesId()) != null) {
map.get(i.getIssuesId()).addAll(caseIdSet);
} else {
map.put(i.getIssuesId(), caseIdSet);
}
});
}
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCaseSetMap
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getCaseSetMap
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
void scheduleBinderHeavyHitterAutoSampler() {
mHandler.post(() -> {
final int batchSize;
final float threshold;
final long now;
synchronized (mProcLock) {
if (!mConstants.BINDER_HEAVY_HITTER_AUTO_SAMPLER_ENABLED) {
// It's configured OFF
return;
}
if (mConstants.BINDER_HEAVY_HITTER_WATCHER_ENABLED) {
// If the default watcher is active already, don't start the auto sampler
return;
}
now = SystemClock.uptimeMillis();
if (mLastBinderHeavyHitterAutoSamplerStart
+ BINDER_HEAVY_HITTER_AUTO_SAMPLER_THROTTLE_MS > now) {
// Too frequent, throttle it
return;
}
batchSize = mConstants.BINDER_HEAVY_HITTER_AUTO_SAMPLER_BATCHSIZE;
threshold = mConstants.BINDER_HEAVY_HITTER_AUTO_SAMPLER_THRESHOLD;
}
// No lock is needed because we are accessing these variables in handle thread only.
mLastBinderHeavyHitterAutoSamplerStart = now;
// Start the watcher with the auto sampler's config.
Binder.setHeavyHitterWatcherConfig(true, batchSize, threshold,
(a, b, c, d) -> mHandler.post(() -> handleBinderHeavyHitters(a, b, c, d)));
// Schedule to stop it after given timeout.
mHandler.sendMessageDelayed(mHandler.obtainMessage(
BINDER_HEAVYHITTER_AUTOSAMPLER_TIMEOUT_MSG),
BINDER_HEAVY_HITTER_AUTO_SAMPLER_DURATION_MS);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleBinderHeavyHitterAutoSampler
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
|
scheduleBinderHeavyHitterAutoSampler
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeCreateSpace(SpaceReference spaceReference, boolean hidden, Session session)
{
XWikiSpace space = loadXWikiSpace(spaceReference, session);
if (space != null) {
if (space.isHidden() && !hidden) {
makeSpaceVisible(space, session);
}
} else {
insertXWikiSpace(new XWikiSpace(spaceReference, hidden), session);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeCreateSpace
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
maybeCreateSpace
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSyncAutomaticallyAsUser(Account account, String providerName, boolean sync,
int userId) {
if (TextUtils.isEmpty(providerName)) {
throw new IllegalArgumentException("Authority must be non-empty");
}
mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS,
"no permission to write the sync settings");
enforceCrossUserPermission(userId,
"no permission to modify the sync settings for user " + userId);
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
if (syncManager != null) {
syncManager.getSyncStorageEngine().setSyncAutomatically(account, userId,
providerName, sync);
}
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSyncAutomaticallyAsUser
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
setSyncAutomaticallyAsUser
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startObservingNativeCrashes() {
final NativeCrashListener ncl = new NativeCrashListener(this);
ncl.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startObservingNativeCrashes
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
|
startObservingNativeCrashes
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
ActiveAdmin getProfileOwnerOrDeviceOwnerLocked(@UserIdInt int userId) {
ensureLocked();
// Try to find an admin which can use reqPolicy
final ComponentName poAdminComponent = mOwners.getProfileOwnerComponent(userId);
if (poAdminComponent != null) {
return getProfileOwnerLocked(userId);
}
return getDeviceOwnerLocked(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerOrDeviceOwnerLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getProfileOwnerOrDeviceOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private DocumentReference getPreferencesDocumentReference(XWikiContext context)
{
String database = context.getWikiId();
EntityReference spaceReference;
if (database != null) {
spaceReference = new EntityReference(SYSTEM_SPACE, EntityType.SPACE, new WikiReference(database));
} else {
spaceReference = getCurrentMixedEntityReferenceResolver().resolve(SYSTEM_SPACE, EntityType.SPACE);
}
return new DocumentReference("XWikiPreferences", new SpaceReference(spaceReference));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreferencesDocumentReference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getPreferencesDocumentReference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onClick(View v) {
if (mPinFieldContainer.getVisibility() != View.VISIBLE) {
return;
}
if (v == mNameField) {
mButton.requestFocus();
} else if (v == mNumberField) {
mButton.requestFocus();
} else if (v == mButton) {
final String number = PhoneNumberUtils.convertAndStrip(getNumberFromTextField());
if (!isValidNumber(number)) {
handleResult(false, true);
return;
}
// Authenticate the pin AFTER the contact information
// is entered, and if we're not busy.
if (!mDataBusy) {
authenticatePin2();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onClick
File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onClick
|
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTransformCamera(Object nativeGraphics, float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) {
CN1Matrix4f m = (CN1Matrix4f)nativeGraphics;
m.setCamera(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTransformCamera
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
|
setTransformCamera
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder http2MaxStreamsPerConnection(long http2MaxStreamsPerConnection) {
checkArgument(http2MaxStreamsPerConnection > 0 &&
http2MaxStreamsPerConnection <= 0xFFFFFFFFL,
"http2MaxStreamsPerConnection: %s (expected: a positive 32-bit unsigned integer)",
http2MaxStreamsPerConnection);
this.http2MaxStreamsPerConnection = http2MaxStreamsPerConnection;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: http2MaxStreamsPerConnection
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
http2MaxStreamsPerConnection
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public File newFolder() throws IOException {
return createTemporaryFolderIn(getRoot());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newFolder
File: src/main/java/org/junit/rules/TemporaryFolder.java
Repository: junit-team/junit4
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-15250
|
LOW
| 1.9
|
junit-team/junit4
|
newFolder
|
src/main/java/org/junit/rules/TemporaryFolder.java
|
610155b8c22138329f0723eec22521627dbc52ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleInvalidAcceptRequest(HttpServerResponse response) {
response.setStatusCode(406).end();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleInvalidAcceptRequest
File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2022-2466
|
CRITICAL
| 9.8
|
quarkusio/quarkus
|
handleInvalidAcceptRequest
|
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
|
08e5c3106ce4bfb18b24a38514eeba6464668b07
| 0
|
Analyze the following code function for security vulnerabilities
|
private static XDOM parseContent(Syntax syntax, String content, DocumentReference source) throws XWikiException
{
ContentParser parser = Utils.getComponent(ContentParser.class);
try {
return parser.parse(content, syntax, source);
} catch (MissingParserException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to find a parser for syntax [" + syntax.toIdString() + "]", e);
} catch (ParseException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to parse content of syntax [" + syntax.toIdString() + "]", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseContent
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
|
parseContent
|
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 register(ExpandableNotificationRow row, StatusBarNotification sbn) {
Notification notification = sbn.getNotification();
if (notification.contentIntent != null || notification.fullScreenIntent != null) {
row.setOnClickListener(this);
} else {
row.setOnClickListener(null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: register
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
|
register
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEscapeForwardSlashAlways() {
return escapeForwardSlashAlways;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEscapeForwardSlashAlways
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
isEscapeForwardSlashAlways
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
void setSerialVersionUID(long l) {
svUID = l;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSerialVersionUID
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
setSerialVersionUID
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
final void rotateBroadcastStatsIfNeededLocked() {
final long now = SystemClock.elapsedRealtime();
if (mCurBroadcastStats == null ||
(mCurBroadcastStats.mStartRealtime +(24*60*60*1000) < now)) {
mLastBroadcastStats = mCurBroadcastStats;
if (mLastBroadcastStats != null) {
mLastBroadcastStats.mEndRealtime = SystemClock.elapsedRealtime();
mLastBroadcastStats.mEndUptime = SystemClock.uptimeMillis();
}
mCurBroadcastStats = new BroadcastStats();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rotateBroadcastStatsIfNeededLocked
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
|
rotateBroadcastStatsIfNeededLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
static String stringifySize(long size, int order) {
Locale locale = Locale.US;
switch (order) {
case 1:
return String.format(locale, "%,13d", size);
case 1024:
return String.format(locale, "%,9dK", size / 1024);
case 1024 * 1024:
return String.format(locale, "%,5dM", size / 1024 / 1024);
case 1024 * 1024 * 1024:
return String.format(locale, "%,1dG", size / 1024 / 1024 / 1024);
default:
throw new IllegalArgumentException("Invalid size order");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stringifySize
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
|
stringifySize
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void start() {
synchronized (this) {
setupLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: start
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
start
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T extends Fragment> T showFragment(FragmentCreator<T> fragmentCreator, int id) {
final FragmentManager fragmentManager = getSupportFragmentManager();
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
T showFragment = (T) fragmentManager.findFragmentById(id);
if (showFragment == null) {
showFragment = fragmentCreator.create();
fragmentCreator.init(showFragment);
fragmentTransaction.add(id, showFragment);
} else {
fragmentCreator.init(showFragment);
fragmentTransaction.show(showFragment);
}
fragmentTransaction.commit();
return showFragment;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showFragment
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
showFragment
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDescription() {
return delegate.getDescription() + " (JNDI)";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getDescription
|
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.