instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private ComponentName resolveDelegateReceiver(String scope, String action, int userId) {
final List<String> delegates;
synchronized (getLockObject()) {
delegates = getDelegatePackagesInternalLocked(scope, userId);
}
if (delegates.size() == 0) {
return null;
} else if (delegates.size() > 1) {
Slogf.wtf(LOG_TAG, "More than one delegate holds " + scope);
return null;
}
final String pkg = delegates.get(0);
Intent intent = new Intent(action);
intent.setPackage(pkg);
final List<ResolveInfo> receivers;
try {
receivers = mIPackageManager.queryIntentReceivers(
intent, null, 0, userId).getList();
} catch (RemoteException e) {
return null;
}
final int count = receivers.size();
if (count >= 1) {
if (count > 1) {
Slogf.w(LOG_TAG, pkg + " defines more than one delegate receiver for " + action);
}
return receivers.get(0).activityInfo.getComponentName();
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveDelegateReceiver
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
|
resolveDelegateReceiver
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Structure> getStructures(String condition, String orderBy,int limit,int offset,String direction) {
//Forms are an enterprise feature...
if ( LicenseUtil.getLevel() <= 100 ) {
if ( condition.equals( "" ) ) {
condition += "structuretype not in(" + Structure.STRUCTURE_TYPE_FORM + ") ";
}
}
List<Structure> list = InodeFactory.getInodesOfClassByConditionAndOrderBy(Structure.class,condition,orderBy,limit,offset,direction);
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStructures
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getStructures
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Date getDeletionDate(String mediaPackageId) throws NotFoundException, SearchServiceDatabaseException {
EntityManager em = null;
EntityTransaction tx = null;
try {
em = emf.createEntityManager();
tx = em.getTransaction();
tx.begin();
SearchEntity searchEntity = getSearchEntity(mediaPackageId, em);
if (searchEntity == null) {
throw new NotFoundException("No media package with id=" + mediaPackageId + " exists");
}
// Ensure this user is allowed to read this media package
String accessControlXml = searchEntity.getAccessControl();
if (accessControlXml != null) {
AccessControlList acl = AccessControlParser.parseAcl(accessControlXml);
User currentUser = securityService.getUser();
Organization currentOrg = securityService.getOrganization();
if (!AccessControlUtil.isAuthorized(acl, currentUser, currentOrg, READ.toString()))
throw new UnauthorizedException(currentUser + " is not authorized to read media package " + mediaPackageId);
}
return searchEntity.getDeletionDate();
} catch (NotFoundException e) {
throw e;
} catch (Exception e) {
logger.error("Could not get deletion date {}: {}", mediaPackageId, e.getMessage());
if (tx.isActive()) {
tx.rollback();
}
throw new SearchServiceDatabaseException(e);
} finally {
if (em != null)
em.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeletionDate
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
getDeletionDate
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
public String next(int n) throws JSONException {
int i = this.myIndex;
int j = i + n;
if (j >= this.mySource.length()) {
throw syntaxError("Substring bounds error");
}
this.myIndex += n;
return this.mySource.substring(i, j);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: next
File: src/main/java/org/codehaus/jettison/json/JSONTokener.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
next
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SuppressWarnings("unchecked")
public FF4jConfiguration parseConfigurationFile(InputStream inputStream) {
Util.assertNotNull(inputStream, "Cannot read file stream is empty, check readability and path.");
// Strengthen serialization
Map<?,?> yamlConfigFile = safeYaml.load(inputStream);
Map<?,?> ff4jYamlMap = (Map<?, ?>) yamlConfigFile.get(FF4J_TAG);
FF4jConfiguration ff4jConfig = new FF4jConfiguration();
if (ff4jYamlMap != null) {
// Audit
if (ff4jYamlMap.containsKey(GLOBAL_AUDIT_TAG)) {
ff4jConfig.setAudit(Boolean.valueOf(ff4jYamlMap.get(GLOBAL_AUDIT_TAG).toString()));
}
// AutoCreate
if (ff4jYamlMap.containsKey(GLOBAL_AUTOCREATE)) {
ff4jConfig.setAutoCreate(Boolean.valueOf(ff4jYamlMap.get(GLOBAL_AUTOCREATE).toString()));
}
// Properties
ff4jConfig.getProperties()
.putAll(parseProperties((List<Map<String, Object>>) ff4jYamlMap.get(PROPERTIES_TAG))
);
// Features
parseFeatures(ff4jConfig, (List<Map<String, Object>>) ff4jYamlMap.get(FEATURES_TAG));
}
return ff4jConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseConfigurationFile
File: ff4j-config-yaml/src/main/java/org/ff4j/parser/yaml/YamlParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseConfigurationFile
|
ff4j-config-yaml/src/main/java/org/ff4j/parser/yaml/YamlParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean inKeyguardRestrictedKeyInputMode() {
if (mKeyguardDelegate == null) return false;
return mKeyguardDelegate.isInputRestricted();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inKeyguardRestrictedKeyInputMode
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
|
inKeyguardRestrictedKeyInputMode
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "9.9RC1")
public void loadAttachmentContent(XWikiAttachment attachment, XWikiContext context) throws XWikiException
{
String database = context.getWikiId();
try {
// We might need to switch database to
// get the translated content
if (getDatabase() != null) {
context.setWikiId(getDatabase());
}
attachment.loadAttachmentContent(context);
} finally {
if (database != null) {
context.setWikiId(database);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadAttachmentContent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
loadAttachmentContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindLargeIconAndApplyMargin(RemoteViews contentView,
@NonNull StandardTemplateParams p,
@Nullable TemplateBindResult result) {
if (result == null) {
result = new TemplateBindResult();
}
bindLargeIcon(contentView, p, result);
if (!p.mHeaderless) {
// views in states with a header (big states)
result.mHeadingExtraMarginSet.applyToView(contentView, R.id.notification_header);
result.mTitleMarginSet.applyToView(contentView, R.id.title);
// If there is no title, the text (or big_text) needs to wrap around the image
result.mTitleMarginSet.applyToView(contentView, p.mTextViewId);
contentView.setInt(p.mTextViewId, "setNumIndentLines", p.hasTitle() ? 0 : 1);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindLargeIconAndApplyMargin
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
bindLargeIconAndApplyMargin
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTopologyRecoveryFilter(TopologyRecoveryFilter topologyRecoveryFilter) {
this.topologyRecoveryFilter = topologyRecoveryFilter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTopologyRecoveryFilter
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
|
setTopologyRecoveryFilter
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContent(String content)
{
getDoc().setContent(content);
updateAuthor();
updateContentAuthor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
setContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void noRemoteServices(RemoteServiceCallback callback) {
setRemoteServices(callback, Collections.EMPTY_LIST, Collections.EMPTY_LIST);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noRemoteServices
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
noRemoteServices
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Bean
@Lazy
public RequestValidatingInterceptor requestValidatingInterceptor(IValidatorModule theInstanceValidator) {
RequestValidatingInterceptor requestValidator = new RequestValidatingInterceptor();
requestValidator.setFailOnSeverity(null);
requestValidator.setAddResponseHeaderOnSeverity(null);
requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION);
requestValidator.addValidatorModule(theInstanceValidator);
requestValidator.setIgnoreValidatorExceptions(true);
return requestValidator;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestValidatingInterceptor
File: hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
requestValidatingInterceptor
|
hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
private static long dumpJavaTracesTombstoned(int pid, String fileName, long timeoutMs) {
final long timeStart = SystemClock.elapsedRealtime();
if (!Debug.dumpJavaBacktraceToFileTimeout(pid, fileName, (int) (timeoutMs / 1000))) {
Debug.dumpNativeBacktraceToFileTimeout(pid, fileName,
(NATIVE_DUMP_TIMEOUT_MS / 1000));
}
return SystemClock.elapsedRealtime() - timeStart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpJavaTracesTombstoned
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
|
dumpJavaTracesTombstoned
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasProperty(final String property) {
return propertyValues.containsKey(property);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasProperty
File: stroom-core-server/src/main/java/stroom/importexport/server/Config.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
hasProperty
|
stroom-core-server/src/main/java/stroom/importexport/server/Config.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAdminUsername()
{
return adminUsername;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdminUsername
File: src/main/java/org/projectforge/web/admin/SetupForm.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
getAdminUsername
|
src/main/java/org/projectforge/web/admin/SetupForm.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addURL(URL url) {
super.addURL(url);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: addURL
File: src/main/java/dev/hypera/dragonfly/loading/DragonflyClassLoader.java
Repository: HyperaDev/Dragonfly
Fixed Code:
@Override
public void addURL(@NotNull URL url) {
super.addURL(url);
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
addURL
|
src/main/java/dev/hypera/dragonfly/loading/DragonflyClassLoader.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setUri(URI uri)
throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException
{
if ("amqp".equals(uri.getScheme().toLowerCase())) {
// nothing special to do
} else if ("amqps".equals(uri.getScheme().toLowerCase())) {
setPort(DEFAULT_AMQP_OVER_SSL_PORT);
// SSL context factory not set yet, we use the default one
if (this.sslContextFactory == null) {
useSslProtocol();
}
} else {
throw new IllegalArgumentException("Wrong scheme in AMQP URI: " +
uri.getScheme());
}
String host = uri.getHost();
if (host != null) {
setHost(host);
}
int port = uri.getPort();
if (port != -1) {
setPort(port);
}
String userInfo = uri.getRawUserInfo();
if (userInfo != null) {
String userPass[] = userInfo.split(":");
if (userPass.length > 2) {
throw new IllegalArgumentException("Bad user info in AMQP " +
"URI: " + userInfo);
}
setUsername(uriDecode(userPass[0]));
if (userPass.length == 2) {
setPassword(uriDecode(userPass[1]));
}
}
String path = uri.getRawPath();
if (path != null && path.length() > 0) {
if (path.indexOf('/', 1) != -1) {
throw new IllegalArgumentException("Multiple segments in " +
"path of AMQP URI: " +
path);
}
setVirtualHost(uriDecode(uri.getPath().substring(1)));
}
String rawQuery = uri.getRawQuery();
if (rawQuery != null && rawQuery.length() > 0) {
setQuery(rawQuery);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUri
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
|
setUri
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String formatDate(Date date)
{
return this.xwiki.formatDate(date, null, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatDate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
formatDate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
static MetaData createMetaData(WikiParameters parameters)
{
MetaData metaData = new MetaData();
int prefixSize = METADATA_ATTRIBUTE_PREFIX.length();
for (WikiParameter parameter : parameters) {
if (parameter.getKey().startsWith(METADATA_ATTRIBUTE_PREFIX)) {
String metaDataKey = parameter.getKey().substring(prefixSize).toLowerCase();
metaData.addMetaData(metaDataKey, parameter.getValue());
}
}
return metaData;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMetaData
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
createMetaData
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dispatchSetBackground(Bitmap bmp) {
if (DEBUG) Log.d(TAG, "dispatchSetBackground");
final int count = mCallbacks.size();
for (int i = 0; i < count; i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onSetBackground(bmp);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchSetBackground
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
dispatchSetBackground
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateCameraVisibility() {
if (mRightAffordanceView == null) {
// Things are not set up yet; reply hazy, ask again later
return;
}
mRightAffordanceView.setVisibility(!mDozing && mRightButton.getIcon().isVisible
? View.VISIBLE : View.GONE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCameraVisibility
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
updateCameraVisibility
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setTitleFromBackStackEntry(FragmentManager.BackStackEntry bse) {
final CharSequence title;
final int titleRes = bse.getBreadCrumbTitleRes();
if (titleRes > 0) {
title = getText(titleRes);
} else {
title = bse.getBreadCrumbTitle();
}
if (title != null) {
setTitle(title);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTitleFromBackStackEntry
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
setTitleFromBackStackEntry
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeTrackedEntity( TrackedEntityInstance trackedEntityInstance )
{
trackedEntityInstanceStore.delete( trackedEntityInstance );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTrackedEntity
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
removeTrackedEntity
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void failureDetectorConfigXmlGenerator(XmlGenerator gen, NetworkConfig networkConfig) {
IcmpFailureDetectorConfig icmpFailureDetectorConfig = networkConfig.getIcmpFailureDetectorConfig();
if (icmpFailureDetectorConfig == null) {
return;
}
gen.open("failure-detector");
gen.open("icmp", "enabled", icmpFailureDetectorConfig.isEnabled())
.node("ttl", icmpFailureDetectorConfig.getTtl())
.node("interval-milliseconds", icmpFailureDetectorConfig.getIntervalMilliseconds())
.node("max-attempts", icmpFailureDetectorConfig.getMaxAttempts())
.node("timeout-milliseconds", icmpFailureDetectorConfig.getTimeoutMilliseconds())
.node("fail-fast-on-startup", icmpFailureDetectorConfig.isFailFastOnStartup())
.node("parallel-mode", icmpFailureDetectorConfig.isParallelMode())
.close();
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: failureDetectorConfigXmlGenerator
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
|
failureDetectorConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void build() throws SVGException
{
super.build();
StyleAttribute sty = new StyleAttribute();
if (getPres(sty.setName("x")))
{
x = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("y")))
{
y = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("width")))
{
width = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("height")))
{
height = sty.getFloatValueWithUnits();
}
try
{
if (getPres(sty.setName("xlink:href")))
{
URI src = sty.getURIValue(getXMLBase());
if ("data".equals(src.getScheme()))
{
imageSrc = new URL(null, src.toASCIIString(), new Handler());
}
else
{
if (!diagram.getUniverse().isImageDataInlineOnly())
{
try
{
imageSrc = src.toURL();
} catch (Exception e)
{
Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
"Could not parse xlink:href " + src, e);
// e.printStackTrace();
imageSrc = null;
}
}
}
}
} catch (Exception e)
{
throw new SVGException(e);
}
diagram.getUniverse().registerImage(imageSrc);
//Set widths if not set
BufferedImage img = diagram.getUniverse().getImage(imageSrc);
if (img == null)
{
xform = new AffineTransform();
bounds = new Rectangle2D.Float();
return;
}
if (width == 0)
{
width = img.getWidth();
}
if (height == 0)
{
height = img.getHeight();
}
//Determine image xform
xform = new AffineTransform();
// xform.setToScale(this.width / img.getWidth(), this.height / img.getHeight());
// xform.translate(this.x, this.y);
xform.translate(this.x, this.y);
xform.scale(this.width / img.getWidth(), this.height / img.getHeight());
bounds = new Rectangle2D.Float(this.x, this.y, this.width, this.height);
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2017-5617
- Severity: MEDIUM
- CVSS Score: 5.8
Description: #11 - svgSalamander fix for CVE-2017-5617 was incomplete
Function: build
File: svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
Repository: blackears/svgSalamander
Fixed Code:
@Override
protected void build() throws SVGException
{
super.build();
StyleAttribute sty = new StyleAttribute();
if (getPres(sty.setName("x")))
{
x = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("y")))
{
y = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("width")))
{
width = sty.getFloatValueWithUnits();
}
if (getPres(sty.setName("height")))
{
height = sty.getFloatValueWithUnits();
}
try
{
if (getPres(sty.setName("xlink:href")))
{
URI src = sty.getURIValue(getXMLBase());
if ("data".equals(src.getScheme()))
{
imageSrc = new URL(null, src.toASCIIString(), new Handler());
}
else if (!diagram.getUniverse().isImageDataInlineOnly())
{
try
{
imageSrc = src.toURL();
} catch (Exception e)
{
Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
"Could not parse xlink:href " + src, e);
imageSrc = null;
}
}
}
} catch (Exception e)
{
throw new SVGException(e);
}
if (imageSrc != null)
{
diagram.getUniverse().registerImage(imageSrc);
//Set widths if not set
BufferedImage img = diagram.getUniverse().getImage(imageSrc);
if (img == null)
{
xform = new AffineTransform();
bounds = new Rectangle2D.Float();
return;
}
if (width == 0)
{
width = img.getWidth();
}
if (height == 0)
{
height = img.getHeight();
}
//Determine image xform
xform = new AffineTransform();
xform.translate(this.x, this.y);
xform.scale(this.width / img.getWidth(), this.height / img.getHeight());
}
bounds = new Rectangle2D.Float(this.x, this.y, this.width, this.height);
}
|
[
"CWE-918"
] |
CVE-2017-5617
|
MEDIUM
| 5.8
|
blackears/svgSalamander
|
build
|
svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
|
826555b0a3229b6cf4671fe4de7aa51b5946b63d
| 1
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private int getLocationInWindowX() {
return mLocationInWindowX;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocationInWindowX
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getLocationInWindowX
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private void updateImeAdapter(long nativeImeAdapterAndroid, int textInputType,
int textInputFlags, String text, int selectionStart, int selectionEnd,
int compositionStart, int compositionEnd, boolean showImeIfNeeded,
boolean isNonImeChange) {
try {
TraceEvent.begin("ContentViewCore.updateImeAdapter");
mFocusedNodeEditable = (textInputType != TextInputType.NONE);
if (!mFocusedNodeEditable) hidePastePopup();
mImeAdapter.updateKeyboardVisibility(
nativeImeAdapterAndroid, textInputType, textInputFlags, showImeIfNeeded);
if (mInputConnection != null) {
mInputConnection.updateState(text, selectionStart, selectionEnd, compositionStart,
compositionEnd, isNonImeChange);
}
if (mActionMode != null) actionModeInvalidateWAR();
} finally {
TraceEvent.end("ContentViewCore.updateImeAdapter");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateImeAdapter
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
updateImeAdapter
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] getSecretKeyPRF()
{
return XMSSUtil.cloneArray(secretKeyPRF);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecretKeyPRF
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getSecretKeyPRF
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block)
throws WorldEditException {
return setBlock(BlockVector3.at(x, y, z), block);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBlock
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
setBlock
|
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroy() {
LOG.info("Destroying hawtio authentication filter");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: hawtio-system/src/main/java/io/hawt/web/AuthenticationFilter.java
Repository: hawtio
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2014-0121
|
HIGH
| 7.5
|
hawtio
|
destroy
|
hawtio-system/src/main/java/io/hawt/web/AuthenticationFilter.java
|
5289715e4f2657562fdddcbad830a30969b96e1e
| 0
|
Analyze the following code function for security vulnerabilities
|
InsetsState getInsetsState(boolean includeTransient) {
final InsetsState rotatedState = mToken.getFixedRotationTransformInsetsState();
final InsetsPolicy insetsPolicy = getDisplayContent().getInsetsPolicy();
if (rotatedState != null) {
return insetsPolicy.adjustInsetsForWindow(this, rotatedState);
}
final InsetsSourceProvider provider = getControllableInsetProvider();
final @InternalInsetsType int insetTypeProvidedByWindow = provider != null
? provider.getSource().getType() : ITYPE_INVALID;
final InsetsState rawInsetsState =
mFrozenInsetsState != null ? mFrozenInsetsState : getMergedInsetsState();
final InsetsState insetsStateForWindow = insetsPolicy
.enforceInsetsPolicyForTarget(insetTypeProvidedByWindow,
getWindowingMode(), isAlwaysOnTop(), rawInsetsState);
return insetsPolicy.adjustInsetsForWindow(this, insetsStateForWindow,
includeTransient);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInsetsState
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
|
getInsetsState
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public IRemoteCallback getAnimationFinishedListener() {
return mAnimationFinishedListener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAnimationFinishedListener
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getAnimationFinishedListener
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private String readMlString() throws IOException {
// Parse a multiline string value.
StringBuilder sb=new StringBuilder();
int triple=0;
// we are at '''
int indent=index-lineOffset-4;
// skip white/to (newline)
for (; ; ) {
if (isWhiteSpace(current) && current!='\n') read();
else break;
}
if (current=='\n') { read(); skipIndent(indent); }
// When parsing for string values, we must look for " and \ characters.
while (true) {
if (current<0) throw error("Bad multiline string");
else if (current=='\'') {
triple++;
read();
if (triple==3) {
if (sb.charAt(sb.length()-1)=='\n') sb.deleteCharAt(sb.length()-1);
return sb.toString();
}
else continue;
}
else {
while (triple>0) {
sb.append('\'');
triple--;
}
}
if (current=='\n') {
sb.append('\n');
read();
skipIndent(indent);
}
else {
if (current!='\r') sb.append((char)current);
read();
}
}
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2023-39685
- Severity: HIGH
- CVSS Score: 7.5
Description: fix out of bounds
Function: readMlString
File: src/main/org/hjson/HjsonParser.java
Repository: hjson/hjson-java
Fixed Code:
private String readMlString() throws IOException {
// Parse a multiline string value.
StringBuilder sb=new StringBuilder();
int triple=0;
// we are at '''
int indent=index-lineOffset-4;
// skip white/to (newline)
for (; ; ) {
if (isWhiteSpace(current) && current!='\n') read();
else break;
}
if (current=='\n') { read(); skipIndent(indent); }
// When parsing for string values, we must look for " and \ characters.
while (true) {
if (current<0) throw error("Bad multiline string");
else if (current=='\'') {
triple++;
read();
if (triple==3) {
if (sb.length() > 0 && sb.charAt(sb.length()-1)=='\n') sb.deleteCharAt(sb.length()-1);
return sb.toString();
}
else continue;
}
else {
while (triple>0) {
sb.append('\'');
triple--;
}
}
if (current=='\n') {
sb.append('\n');
read();
skipIndent(indent);
}
else {
if (current!='\r') sb.append((char)current);
read();
}
}
}
|
[
"CWE-94"
] |
CVE-2023-39685
|
HIGH
| 7.5
|
hjson/hjson-java
|
readMlString
|
src/main/org/hjson/HjsonParser.java
|
5f80339a8d4dd973c5c39e8241f112ba5c0b2600
| 1
|
Analyze the following code function for security vulnerabilities
|
public Optional<String> value() {
return Optional.ofNullable(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: value
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
value
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Collection<SsurgeonWordlist> getResources() {
return wordListResources.values();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResources
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
getResources
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
private TaskEntity getTaskEntity(String taskId) {
return (TaskEntity) taskService.createTaskQuery().taskId(taskId).singleResult();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskEntity
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
getTaskEntity
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showBootMessage(CharSequence msg, boolean always) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showBootMessage
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
showBootMessage
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getIconFilePath(Action a) {
String name = a.getIconFileName();
if (name==null) return null;
if (name.startsWith("/"))
return name.substring(1);
else
return "images/24x24/"+name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIconFilePath
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getIconFilePath
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public XMSSMTPrivateKeyParameters getNextKey()
{
BDSStateMap newState = new BDSStateMap(bdsState, params, this.getIndex(), publicSeed, secretKeySeed);
return new XMSSMTPrivateKeyParameters.Builder(params).withIndex(index + 1)
.withSecretKeySeed(secretKeySeed).withSecretKeyPRF(secretKeyPRF)
.withPublicSeed(publicSeed).withRoot(root)
.withBDSState(newState).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextKey
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getNextKey
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasIncompatibleAccountsOnAnyUser() {
if (mHasIncompatibleAccounts == null) {
// Hasn't loaded for the first time yet - assume the worst
return true;
}
for (boolean hasIncompatible : mHasIncompatibleAccounts.values()) {
if (hasIncompatible) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasIncompatibleAccountsOnAnyUser
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
|
hasIncompatibleAccountsOnAnyUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected int compare(long idA, long idB) {
String tga = map.get(idA), tgb = map.get(idB);
int result = (tga!=null?-1:0) + (tgb!=null?1:0); // Will be non-zero if only one is null
if (result==0 && tga!=null)
result = tga.compareToIgnoreCase(tgb);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compare
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
compare
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] engineGetEncoded(String format)
throws IOException
{
if (!isASN1FormatString(format))
{
throw new IOException("unknown format specified");
}
return ccmParams.getEncoded();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineGetEncoded
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineGetEncoded
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ResponseEntity proxyForGet(String url, Class responseEntityClazz) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: proxyForGet
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
proxyForGet
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void onResize() {
final ArrayList<WindowState> resizingWindows = mWmService.mResizingWindows;
if (mHasSurface && !isGoneForLayout() && !resizingWindows.contains(this)) {
ProtoLog.d(WM_DEBUG_RESIZE, "onResize: Resizing %s", this);
resizingWindows.add(this);
}
if (isGoneForLayout()) {
mResizedWhileGone = true;
}
super.onResize();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResize
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
|
onResize
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
static public File allocateFile(File dir, String name) {
int q = name.indexOf('?');
if (q > 0) {
name = name.substring(0, q);
}
File file = new File(dir, name);
int dot = name.indexOf('.');
String prefix = dot < 0 ? name : name.substring(0, dot);
String suffix = dot < 0 ? "" : name.substring(dot);
int index = 2;
while (file.exists()) {
file = new File(dir, prefix + "-" + index++ + suffix);
}
file.getParentFile().mkdirs();
return file;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-19859
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Fix zip slip vulnerability. Closes #1840.
Function: allocateFile
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
Fixed Code:
static public File allocateFile(File dir, String name) {
int q = name.indexOf('?');
if (q > 0) {
name = name.substring(0, q);
}
File file = new File(dir, name);
// For CVE-2018-19859, issue #1840
if (!file.toPath().normalize().startsWith(dir.toPath().normalize())) {
throw new IllegalArgumentException("Zip archives with files escaping their root directory are not allowed.");
}
int dot = name.indexOf('.');
String prefix = dot < 0 ? name : name.substring(0, dot);
String suffix = dot < 0 ? "" : name.substring(dot);
int index = 2;
while (file.exists()) {
file = new File(dir, prefix + "-" + index++ + suffix);
}
file.getParentFile().mkdirs();
return file;
}
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
allocateFile
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 1
|
Analyze the following code function for security vulnerabilities
|
public XWikiDeletedDocument[] getDeletedDocuments(String fullname, String locale, XWikiContext context)
throws XWikiException
{
if (hasRecycleBin(context)) {
XWikiDocument doc = new XWikiDocument(getCurrentMixedDocumentReferenceResolver().resolve(fullname));
doc.setLanguage(locale);
return getRecycleBinStore().getAllDeletedDocuments(doc, context, true);
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeletedDocuments
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
|
getDeletedDocuments
|
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 boolean containsObject(K name, Object value) {
return contains(name, fromObject(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsObject
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
containsObject
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized void write(byte[] b, int off, int len) throws IOException {
update(len);
out.write(b, off, len);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: android/guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
write
|
android/guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
public Iterable<RequestHandler> getRequestHandlers() {
return requestHandlers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestHandlers
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
getRequestHandlers
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSystemProcess() {
try {
ServiceManager.addService(Context.ACTIVITY_SERVICE, this, /* allowIsolated= */ true,
DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_NORMAL | DUMP_FLAG_PROTO);
ServiceManager.addService(ProcessStats.SERVICE_NAME, mProcessStats);
ServiceManager.addService("meminfo", new MemBinder(this), /* allowIsolated= */ false,
DUMP_FLAG_PRIORITY_HIGH);
ServiceManager.addService("gfxinfo", new GraphicsBinder(this));
ServiceManager.addService("dbinfo", new DbBinder(this));
if (MONITOR_CPU_USAGE) {
ServiceManager.addService("cpuinfo", new CpuBinder(this),
/* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL);
}
ServiceManager.addService("permission", new PermissionController(this));
ServiceManager.addService("processinfo", new ProcessInfoService(this));
ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
"android", STOCK_PM_FLAGS | MATCH_SYSTEM_ONLY);
mSystemThread.installSystemApplicationInfo(info, getClass().getClassLoader());
synchronized (this) {
ProcessRecord app = newProcessRecordLocked(info, info.processName, false, 0);
app.persistent = true;
app.pid = MY_PID;
app.maxAdj = ProcessList.SYSTEM_ADJ;
app.makeActive(mSystemThread.getApplicationThread(), mProcessStats);
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.put(app.pid, app);
}
updateLruProcessLocked(app, false, null);
updateOomAdjLocked();
}
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(
"Unable to find android system package", e);
}
// Start watching app ops after we and the package manager are up and running.
mAppOpsService.startWatchingMode(AppOpsManager.OP_RUN_IN_BACKGROUND, null,
new IAppOpsCallback.Stub() {
@Override public void opChanged(int op, int uid, String packageName) {
if (op == AppOpsManager.OP_RUN_IN_BACKGROUND && packageName != null) {
if (mAppOpsService.checkOperation(op, uid, packageName)
!= AppOpsManager.MODE_ALLOWED) {
runInBackgroundDisabled(uid);
}
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemProcess
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
|
setSystemProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
QueryHelper buildSelectQueryHelper(
boolean transactionMode, String table, String fieldName,
String where, boolean returnIdField, List<FacetField> facets, String distinctOn
) {
String addIdField = "";
if (returnIdField) {
addIdField = COMMA + ID_FIELD;
}
if (!"null".equals(fieldName) && fieldName.contains("*")) {
// if we are requesting all fields (*) , then dont add the id field to the select
// this will return two id columns which will create ambiguity in facet queries
addIdField = "";
}
QueryHelper queryHelper = new QueryHelper(transactionMode, table, facets);
String distinctOnClause = "";
if (distinctOn != null && !distinctOn.isEmpty()) {
distinctOnClause = String.format("DISTINCT ON (%s) ", distinctOn);
}
queryHelper.selectQuery = SELECT + distinctOnClause + fieldName + addIdField + FROM + schemaName + DOT + table + SPACE + where;
return queryHelper;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSelectQueryHelper
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
buildSelectQueryHelper
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<RoamingPartner> getPreferredRoamingPartnerList() {
return mPreferredRoamingPartnerList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreferredRoamingPartnerList
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
getPreferredRoamingPartnerList
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void define() {
addPersistenceUnit("derbyDb", Jpa1.class, derbyConfig());
addPersistenceUnit("hsqlDb", Jpa2.class, hsqlConfig());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: define
File: src/test/java/uk/q3c/krail/jpa/persist/TestJpaModule.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
define
|
src/test/java/uk/q3c/krail/jpa/persist/TestJpaModule.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TaskSnapshot getTaskSnapshot(int taskId, boolean isLowResolution) {
mAmInternal.enforceCallingPermission(READ_FRAME_BUFFER, "getTaskSnapshot()");
final long ident = Binder.clearCallingIdentity();
try {
final Task task;
synchronized (mGlobalLock) {
task = mRootWindowContainer.anyTaskForId(taskId,
MATCH_ATTACHED_TASK_OR_RECENT_TASKS);
if (task == null) {
Slog.w(TAG, "getTaskSnapshot: taskId=" + taskId + " not found");
return null;
}
}
// Don't call this while holding the lock as this operation might hit the disk.
return mWindowManager.mTaskSnapshotController.getSnapshot(taskId, task.mUserId,
true /* restoreFromDisk */, isLowResolution);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskSnapshot
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getTaskSnapshot
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPassword() {
return password;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPassword
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2022-23596
|
MEDIUM
| 5
|
junrar
|
getPassword
|
src/main/java/com/github/junrar/Archive.java
|
7b16b3d90b91445fd6af0adfed22c07413d4fab7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSaslConfig(SaslConfig saslConfig) {
this.saslConfig = saslConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSaslConfig
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
|
setSaslConfig
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void removeKeystoreDataIfNeeded(int userId, int appId) {
if (appId < 0) {
return;
}
final KeyStore keyStore = KeyStore.getInstance();
if (keyStore != null) {
if (userId == UserHandle.USER_ALL) {
for (final int individual : sUserManager.getUserIds()) {
keyStore.clearUid(UserHandle.getUid(individual, appId));
}
} else {
keyStore.clearUid(UserHandle.getUid(userId, appId));
}
} else {
Slog.w(TAG, "Could not contact keystore to clear entries for app id " + appId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeKeystoreDataIfNeeded
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
removeKeystoreDataIfNeeded
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getUserName(int userId){
String userName = null;
Driver driver = new SQLServerDriver();
String connectionUrl = "jdbc:sqlserver://n8bu1j6855.database.windows.net:1433;database=VoyagerDB;user=VoyageLogin@n8bu1j6855;password={GroupP@ssword};encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;";
try {
Connection con = driver.connect(connectionUrl, new Properties());
PreparedStatement statement = con.prepareStatement("Select userName from UserTable where userId = '" + userId + "'");
ResultSet rs = statement.executeQuery();
rs.next();
userName = rs.getString("userName");
} catch (SQLException e) {
e.printStackTrace();
}
return userName;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2014-125074
- Severity: MEDIUM
- CVSS Score: 5.2
Description: fixed problems in register controller, and worked at preventing sql-injection in database access
Function: getUserName
File: Voyager/src/models/DatabaseAccess.java
Repository: Nayshlok/Voyager
Fixed Code:
@Override
public String getUserName(int userId){
String userName = null;
Driver driver = new SQLServerDriver();
try {
Connection con = driver.connect(connectionUrl, new Properties());
PreparedStatement statement = con.prepareStatement("Select userName from UserTable where userId = ?");
statement.setInt(1, userId);
ResultSet rs = statement.executeQuery();
rs.next();
userName = rs.getString("userName");
} catch (SQLException e) {
e.printStackTrace();
}
return userName;
}
|
[
"CWE-89"
] |
CVE-2014-125074
|
MEDIUM
| 5.2
|
Nayshlok/Voyager
|
getUserName
|
Voyager/src/models/DatabaseAccess.java
|
f1249f438cd8c39e7ef2f6c8f2ab76b239a02fae
| 1
|
Analyze the following code function for security vulnerabilities
|
static boolean parseBooleanAttribute(TypedXmlPullParser parser, String attribute, boolean def) {
return parseLongAttribute(parser, attribute, (def ? 1 : 0)) == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseBooleanAttribute
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
parseBooleanAttribute
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasContentType() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasContentType
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hasContentType
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter,
StanzaListener callback, ExceptionCallback exceptionCallback)
throws NotConnectedException, InterruptedException {
sendStanzaWithResponseCallback(stanza, replyFilter, callback, exceptionCallback,
getPacketReplyTimeout());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendStanzaWithResponseCallback
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
sendStanzaWithResponseCallback
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getAPType(String id) {
if (apIds == null) {
getAPIds();
}
NetworkInfo info = (NetworkInfo) apIds.get(id);
if (info == null) {
return NetworkManager.ACCESS_POINT_TYPE_UNKNOWN;
}
int type = info.getType();
int subType = info.getSubtype();
if (type == ConnectivityManager.TYPE_WIFI) {
return NetworkManager.ACCESS_POINT_TYPE_WLAN;
} else if (type == ConnectivityManager.TYPE_MOBILE) {
switch (subType) {
case TelephonyManager.NETWORK_TYPE_1xRTT:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G; // ~ 50-100 kbps
case TelephonyManager.NETWORK_TYPE_CDMA:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G; // ~ 14-64 kbps
case TelephonyManager.NETWORK_TYPE_EDGE:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G; // ~ 50-100 kbps
case TelephonyManager.NETWORK_TYPE_EVDO_0:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 400-1000 kbps
case TelephonyManager.NETWORK_TYPE_EVDO_A:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 600-1400 kbps
case TelephonyManager.NETWORK_TYPE_GPRS:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G; // ~ 100 kbps
case TelephonyManager.NETWORK_TYPE_HSDPA:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 2-14 Mbps
case TelephonyManager.NETWORK_TYPE_HSPA:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 700-1700 kbps
case TelephonyManager.NETWORK_TYPE_HSUPA:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 1-23 Mbps
case TelephonyManager.NETWORK_TYPE_UMTS:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 400-7000 kbps
/*
* Above API level 7, make sure to set android:targetSdkVersion
* to appropriate level to use these
*/
case TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 1-2 Mbps
case TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 5 Mbps
case TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 10-20 Mbps
case TelephonyManager.NETWORK_TYPE_IDEN: // API level 8
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G; // ~25 kbps
case TelephonyManager.NETWORK_TYPE_LTE: // API level 11
return NetworkManager.ACCESS_POINT_TYPE_NETWORK3G; // ~ 10+ Mbps
// Unknown
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
default:
return NetworkManager.ACCESS_POINT_TYPE_NETWORK2G;
}
} else {
return NetworkManager.ACCESS_POINT_TYPE_UNKNOWN;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAPType
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
|
getAPType
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public GlobalRequestFuture request(Buffer buffer, String request, GlobalRequestFuture.ReplyHandler replyHandler)
throws IOException {
GlobalRequestFuture globalRequest;
if (!wantReply(buffer)) {
if (!isOpen()) {
throw new IOException("Global request " + request + ": session is closing or closed.");
}
// Fire-and-forget global requests (want-reply = false) are always allowed; we don't need to register the
// future, nor do we have to wait for anything. Client code can wait on the returned future if it wants to
// be sure the message has been sent.
globalRequest = new GlobalRequestFuture(request, replyHandler) {
@Override
public void operationComplete(IoWriteFuture future) {
if (future.isWritten()) {
if (log.isDebugEnabled()) {
log.debug("makeGlobalRequest({})[{}] want-reply=false sent", this, getId());
}
setValue(new ByteArrayBuffer(new byte[0]));
GlobalRequestFuture.ReplyHandler handler = getHandler();
if (handler != null) {
handler.accept(SshConstants.SSH_MSG_REQUEST_SUCCESS, getBuffer());
}
}
super.operationComplete(future);
}
};
writePacket(buffer).addListener(globalRequest);
return globalRequest;
}
// We do expect a reply. The packet may get queued or otherwise delayed for an unknown time. We must
// consider this request pending only once its sequence number is known. If sending the message fails,
// the writeFuture will set an exception on the globalRequest, or will fail it.
globalRequest = new GlobalRequestFuture(request, replyHandler) {
@Override
public void operationComplete(IoWriteFuture future) {
if (!future.isWritten()) {
// If it was not written after all, make sure it's not considered pending anymore.
pendingGlobalRequests.removeFirstOccurrence(this);
}
// Super call will fulfill the future if not written
super.operationComplete(future);
if (future.isWritten() && getHandler() != null) {
// Fulfill this future now. The GlobalRequestFuture can thus be used to wait for the
// successful sending of the request, the framework will invoke the handler whenever
// the reply arrives. The buffer cannot be obtained though the future.
setValue(null);
}
}
};
if (!isOpen()) {
throw new IOException("Global request " + request + ": session is closing or closed.");
}
// This consumer will be invoked once before the packet actually goes out. Some servers respond to global
// requests with SSH_MSG_UNIMPLEMENTED instead of SSH_MSG_REQUEST_FAILURE (see SSHD-968), so we need to make
// sure we do know the sequence number.
globalSequenceNumbers.put(buffer, seqNo -> {
globalRequest.setSequenceNumber(seqNo);
if (log.isDebugEnabled()) {
log.debug("makeGlobalRequest({})[{}] want-reply=true with seqNo={}", this, globalRequest.getId(), seqNo);
}
// Insert at front
pendingGlobalRequests.push(globalRequest);
});
writePacket(buffer).addListener(f -> {
Throwable t = f.getException();
if (t != null) {
// Just in case we get an exception before preProcessEncodeBuffer was even called
globalSequenceNumbers.remove(buffer);
}
}).addListener(globalRequest); // Report errors through globalRequest, fulfilling globalRequest
return globalRequest;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: request
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
request
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCancelClicked() {
mKeyguardViewControllerLazy.get().onCancelClicked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCancelClicked
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
|
onCancelClicked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isShapeSupported(Object graphics) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isShapeSupported
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
|
isShapeSupported
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_USER_REMOVED)) {
mRemovingUserId = -1;
} else if (intent.getAction().equals(Intent.ACTION_USER_INFO_CHANGED)) {
int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
if (userHandle != -1) {
mUserIcons.remove(userHandle);
}
}
mHandler.sendEmptyMessage(MESSAGE_UPDATE_LIST);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
onReceive
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(FIELD_CACHE_TTL_OVERRIDE_UNIT)
public abstract Builder cacheTTLOverrideUnit(@Nullable TimeUnit cacheTTLOverrideUnit);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheTTLOverrideUnit
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
cacheTTLOverrideUnit
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Collection[] processCollectionFile(Context c, String path, String filename) throws IOException, SQLException
{
File file = new File(path + File.separatorChar + filename);
ArrayList<Collection> collections = new ArrayList<Collection>();
Collection[] result = null;
System.out.println("Processing collections file: " + filename);
if(file.exists())
{
BufferedReader br = null;
try
{
br = new BufferedReader(new FileReader(file));
String line = null;
while ((line = br.readLine()) != null)
{
DSpaceObject obj = null;
if (line.indexOf('/') != -1)
{
obj = HandleManager.resolveToObject(c, line);
if (obj == null || obj.getType() != Constants.COLLECTION)
{
obj = null;
}
}
else
{
obj = Collection.find(c, Integer.parseInt(line));
}
if (obj == null) {
throw new IllegalArgumentException("Cannot resolve " + line + " to a collection.");
}
collections.add((Collection)obj);
}
result = new Collection[collections.size()];
for (int i = 0; i < result.length; i++) {
result[i] = collections.get(i);
}
}
catch (FileNotFoundException e)
{
System.out.println("No collections file found.");
}
finally
{
if (br != null)
{
try {
br.close();
} catch (IOException e) {
System.out.println("Non-critical problem releasing resources.");
}
}
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processCollectionFile
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
processCollectionFile
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onEvent(Event event, Object source, Object data)
{
try {
if (event instanceof DocumentUpdatedEvent) {
XWikiDocument document = (XWikiDocument) source;
if (Locale.ROOT.equals(document.getLocale())) {
// Index all the translations of a document when its default translation has been updated because
// the default translation holds meta data shared by all translations (attachments, objects).
indexTranslations(document, (XWikiContext) data);
} else {
// Index only the updated translation.
this.solrIndexer.get().index(document.getDocumentReferenceWithLocale(), false);
}
} else if (event instanceof DocumentCreatedEvent) {
XWikiDocument document = (XWikiDocument) source;
if (!Locale.ROOT.equals(document.getLocale())) {
// If a new translation is added to a document reindex the whole document (could be optimized a bit
// by reindexing only the parent locales but that would always include objects and attachments
// anyway)
indexTranslations(document, (XWikiContext) data);
} else {
this.solrIndexer.get().index(document.getDocumentReferenceWithLocale(), false);
}
} else if (event instanceof DocumentDeletedEvent) {
XWikiDocument document = ((XWikiDocument) source).getOriginalDocument();
// We must pass the document reference with the REAL locale because when the indexer is going to delete
// the document from the Solr index (later, on a different thread) the real locale won't be accessible
// anymore since the XWiki document has been already deleted from the database. The real locale (taken
// from the XWiki document) is used to compute the id of the Solr document when the document reference
// locale is ROOT (i.e. for default document translations).
// Otherwise the document won't be deleted from the Solr index (because the computed id won't match any
// document from the Solr index) and we're going to have deleted documents that are still in the Solr
// index. These documents will be filtered from the search results but not from the facet counts.
// See XWIKI-10003: Cache problem with Solr facet filter results count
this.solrIndexer.get().delete(
new DocumentReference(document.getDocumentReference(), document.getRealLocale()), false);
} else if (event instanceof AttachmentUpdatedEvent || event instanceof AttachmentAddedEvent) {
XWikiDocument document = (XWikiDocument) source;
String fileName = ((AbstractAttachmentEvent) event).getName();
XWikiAttachment attachment = document.getAttachment(fileName);
this.solrIndexer.get().index(attachment.getReference(), false);
} else if (event instanceof AttachmentDeletedEvent) {
XWikiDocument document = ((XWikiDocument) source).getOriginalDocument();
String fileName = ((AbstractAttachmentEvent) event).getName();
XWikiAttachment attachment = document.getAttachment(fileName);
this.solrIndexer.get().delete(attachment.getReference(), false);
} else if (event instanceof XObjectUpdatedEvent || event instanceof XObjectAddedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().index(entityEvent.getReference(), false);
} else if (event instanceof XObjectDeletedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().delete(entityEvent.getReference(), false);
} else if (event instanceof XObjectPropertyUpdatedEvent || event instanceof XObjectPropertyAddedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().index(entityEvent.getReference(), false);
} else if (event instanceof XObjectPropertyDeletedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().delete(entityEvent.getReference(), false);
} else if (event instanceof WikiDeletedEvent) {
String wikiName = (String) source;
WikiReference wikiReference = new WikiReference(wikiName);
this.solrIndexer.get().delete(wikiReference, false);
}
} catch (Exception e) {
this.logger.error("Failed to handle event [{}] with source [{}]", event, source.toString(), e);
}
}
|
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: onEvent
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrIndexEventListener.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void onEvent(Event event, Object source, Object data)
{
try {
if (event instanceof DocumentUpdatedEvent) {
XWikiDocument document = (XWikiDocument) source;
if (Locale.ROOT.equals(document.getLocale())) {
// Index all the translations of a document when its default translation has been updated because
// the default translation holds meta data shared by all translations (attachments, objects).
indexTranslations(document, (XWikiContext) data);
} else {
// Index only the updated translation.
this.solrIndexer.get().index(document.getDocumentReferenceWithLocale(), false);
}
} else if (event instanceof DocumentCreatedEvent) {
XWikiDocument document = (XWikiDocument) source;
if (!Locale.ROOT.equals(document.getLocale())) {
// If a new translation is added to a document reindex the whole document (could be optimized a bit
// by reindexing only the parent locales but that would always include objects and attachments
// anyway)
indexTranslations(document, (XWikiContext) data);
} else {
this.solrIndexer.get().index(document.getDocumentReferenceWithLocale(), false);
}
} else if (event instanceof DocumentDeletedEvent) {
XWikiDocument document = ((XWikiDocument) source).getOriginalDocument();
// We must pass the document reference with the REAL locale because when the indexer is going to delete
// the document from the Solr index (later, on a different thread) the real locale won't be accessible
// anymore since the XWiki document has been already deleted from the database. The real locale (taken
// from the XWiki document) is used to compute the id of the Solr document when the document reference
// locale is ROOT (i.e. for default document translations).
// Otherwise the document won't be deleted from the Solr index (because the computed id won't match any
// document from the Solr index) and we're going to have deleted documents that are still in the Solr
// index. These documents will be filtered from the search results but not from the facet counts.
// See XWIKI-10003: Cache problem with Solr facet filter results count
this.solrIndexer.get().delete(
new DocumentReference(document.getDocumentReference(), document.getRealLocale()), false);
} else if (event instanceof AttachmentUpdatedEvent || event instanceof AttachmentAddedEvent) {
XWikiDocument document = (XWikiDocument) source;
String fileName = ((AbstractAttachmentEvent) event).getName();
XWikiAttachment attachment = document.getAttachment(fileName);
this.solrIndexer.get().index(attachment.getReference(), false);
} else if (event instanceof AttachmentDeletedEvent) {
XWikiDocument document = ((XWikiDocument) source).getOriginalDocument();
String fileName = ((AbstractAttachmentEvent) event).getName();
XWikiAttachment attachment = document.getAttachment(fileName);
this.solrIndexer.get().delete(attachment.getReference(), false);
} else if (event instanceof XObjectUpdatedEvent || event instanceof XObjectAddedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().index(entityEvent.getReference(), false);
} else if (event instanceof XObjectDeletedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().delete(entityEvent.getReference(), false);
} else if (event instanceof XObjectPropertyUpdatedEvent || event instanceof XObjectPropertyAddedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().index(entityEvent.getReference(), false);
} else if (event instanceof XObjectPropertyDeletedEvent) {
EntityEvent entityEvent = (EntityEvent) event;
this.solrIndexer.get().delete(entityEvent.getReference(), false);
} else if (event instanceof WikiDeletedEvent) {
String wikiName = (String) source;
WikiReference wikiReference = new WikiReference(wikiName);
this.solrIndexer.get().delete(wikiReference, false);
} else if (event instanceof GeneralMailConfigurationUpdatedEvent) {
// Refresh the index when the mail configuration is changed because the mail configuration is used to
// decide if emails shall be indexed or not.
if (source instanceof String) {
this.solrIndexer.get().index(new WikiReference((String) source), true);
} else {
this.solrIndexer.get().index(null, true);
}
}
} catch (Exception e) {
this.logger.error("Failed to handle event [{}] with source [{}]", event, source.toString(), e);
}
}
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
onEvent
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/SolrIndexEventListener.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 1
|
Analyze the following code function for security vulnerabilities
|
PackageManager getPackageManager() {
return mContext.getPackageManager();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageManager
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
|
getPackageManager
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void engineInit(
AlgorithmParameterSpec genParamSpec,
SecureRandom random)
throws InvalidAlgorithmParameterException
{
// TODO: add support for GCMParameterSpec as a template.
throw new InvalidAlgorithmParameterException("No supported AlgorithmParameterSpec for AES parameter generation.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineInit
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineInit
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
private int resolveOwningUserIdForSecureSettingLocked(int userId, String setting) {
return resolveOwningUserIdLocked(userId, sSecureCloneToManagedSettings, setting);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveOwningUserIdForSecureSettingLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
resolveOwningUserIdForSecureSettingLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Reference
public void setWorkflowService(WorkflowService workflowService) {
this.workflowService = workflowService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWorkflowService
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
setWorkflowService
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendWipeProfileNotification(String wipeReasonForUser, UserHandle user) {
Notification notification =
new Notification.Builder(mContext, SystemNotificationChannels.DEVICE_ADMIN)
.setSmallIcon(android.R.drawable.stat_sys_warning)
.setContentTitle(getWorkProfileDeletedTitle())
.setContentText(wipeReasonForUser)
.setColor(mContext.getColor(R.color.system_notification_accent_color))
.setStyle(new Notification.BigTextStyle().bigText(wipeReasonForUser))
.build();
mInjector.getNotificationManager().notifyAsUser(
/* tag= */ null, SystemMessage.NOTE_PROFILE_WIPED, notification, user);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendWipeProfileNotification
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
|
sendWipeProfileNotification
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void readExceptionWithOperationApplicationExceptionFromParcel(
Parcel reply) throws OperationApplicationException {
int code = reply.readExceptionCode();
if (code == 0) return;
String msg = reply.readString();
if (code == 10) {
throw new OperationApplicationException(msg);
} else {
DatabaseUtils.readExceptionFromParcel(reply, msg, code);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readExceptionWithOperationApplicationExceptionFromParcel
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
readExceptionWithOperationApplicationExceptionFromParcel
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private String xFormat() {
long timespan = (end_time & UNSIGNED) - (start_time & UNSIGNED);
if (timespan < 2100) { // 35m
return "%H:%M:%S";
} else if (timespan < 86400) { // 1d
return "%H:%M";
} else if (timespan < 604800) { // 1w
return "%a %H:%M";
} else if (timespan < 1209600) { // 2w
return "%a %d %H:%M";
} else if (timespan < 7776000) { // 90d
return "%b %d";
} else {
return "%Y/%m/%d";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xFormat
File: src/graph/Plot.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2020-35476
|
HIGH
| 7.5
|
OpenTSDB/opentsdb
|
xFormat
|
src/graph/Plot.java
|
b762338664c3ee6e3f773bc04da2a8af24a5c486
| 0
|
Analyze the following code function for security vulnerabilities
|
public TaskWithBLOBs getById(String taskId) {
return taskMapper.selectByPrimaryKey(taskId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getById
File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java
Repository: fit2cloud/rackshift
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-42405
|
CRITICAL
| 9.8
|
fit2cloud/rackshift
|
getById
|
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
|
305aea3b20d36591d519f7d04e0a25be05a51e93
| 0
|
Analyze the following code function for security vulnerabilities
|
@ManagedAttribute(value = "The set of userIds known to this Seti", readonly = true)
public Set<String> getUserIds() {
synchronized (_uid2Location) {
return new HashSet<>(_uid2Location.keySet());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserIds
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
|
getUserIds
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public DateFormat getDateFormat() {
return dateFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDateFormat
File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getDateFormat
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRemoteRttRequest(String callId, Session.Info sessionInfo)
throws RemoteException {
Log.startSession(sessionInfo, "CSW.oRRR", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.onRemoteRttRequest();
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRemoteRttRequest
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
onRemoteRttRequest
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpDebug(ProtoOutputStream proto, @WindowTraceLogLevel int logLevel) {
writeNameToProto(proto, NAME);
super.dumpDebug(proto, WINDOW_TOKEN, logLevel);
proto.write(LAST_SURFACE_SHOWING, mLastSurfaceShowing);
proto.write(IS_WAITING_FOR_TRANSITION_START, isWaitingForTransitionStart());
proto.write(IS_ANIMATING, isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION));
if (mThumbnail != null){
mThumbnail.dumpDebug(proto, THUMBNAIL);
}
proto.write(FILLS_PARENT, fillsParent());
proto.write(APP_STOPPED, mAppStopped);
proto.write(TRANSLUCENT, !occludesParent());
proto.write(VISIBLE, mVisible);
proto.write(VISIBLE_REQUESTED, mVisibleRequested);
proto.write(CLIENT_VISIBLE, isClientVisible());
proto.write(DEFER_HIDING_CLIENT, mDeferHidingClient);
proto.write(REPORTED_DRAWN, mReportedDrawn);
proto.write(REPORTED_VISIBLE, reportedVisible);
proto.write(NUM_INTERESTING_WINDOWS, mNumInterestingWindows);
proto.write(NUM_DRAWN_WINDOWS, mNumDrawnWindows);
proto.write(ALL_DRAWN, allDrawn);
proto.write(LAST_ALL_DRAWN, mLastAllDrawn);
if (mStartingWindow != null) {
mStartingWindow.writeIdentifierToProto(proto, STARTING_WINDOW);
}
proto.write(STARTING_DISPLAYED, startingDisplayed);
proto.write(STARTING_MOVED, startingMoved);
proto.write(VISIBLE_SET_FROM_TRANSFERRED_STARTING_WINDOW,
mVisibleSetFromTransferredStartingWindow);
proto.write(STATE, mState.toString());
proto.write(FRONT_OF_TASK, isRootOfTask());
if (hasProcess()) {
proto.write(PROC_ID, app.getPid());
}
proto.write(PIP_AUTO_ENTER_ENABLED, pictureInPictureArgs.isAutoEnterEnabled());
proto.write(IN_SIZE_COMPAT_MODE, inSizeCompatMode());
proto.write(MIN_ASPECT_RATIO, getMinAspectRatio());
// Only record if max bounds sandboxing is applied, if the caller has the necessary
// permission to access the device configs.
proto.write(PROVIDES_MAX_BOUNDS, providesMaxBounds());
proto.write(ENABLE_RECENTS_SCREENSHOT, mEnableRecentsScreenshot);
proto.write(LAST_DROP_INPUT_MODE, mLastDropInputMode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDebug
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
dumpDebug
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addContainerViewObserver(ContainerViewObserver observer) {
mContainerViewObservers.addObserver(observer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addContainerViewObserver
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
addContainerViewObserver
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ByteBuf encode(Object in) throws IOException {
ByteBuf out = ByteBufAllocator.DEFAULT.buffer();
try {
ByteBufOutputStream result = new ByteBufOutputStream(out);
ObjectOutputStream outputStream = new ObjectOutputStream(result);
outputStream.writeObject(in);
outputStream.close();
return result.buffer();
} catch (IOException e) {
out.release();
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encode
File: redisson/src/main/java/org/redisson/codec/SerializationCodec.java
Repository: redisson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-42809
|
HIGH
| 8.8
|
redisson
|
encode
|
redisson/src/main/java/org/redisson/codec/SerializationCodec.java
|
fe6a2571801656ff1599ef87bdee20f519a5d1fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(KEY_ADD_CALLED, mAddAccountCalled);
if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "saved");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSaveInstanceState
File: src/com/android/settings/accounts/AddAccountSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-8609
|
HIGH
| 7.2
|
android
|
onSaveInstanceState
|
src/com/android/settings/accounts/AddAccountSettings.java
|
f5d3e74ecc2b973941d8adbe40c6b23094b5abb7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_UPDATE_LIST:
updateUserList();
break;
case MESSAGE_SETUP_USER:
onUserCreated(msg.arg1);
break;
case MESSAGE_CONFIG_USER:
onManageUserClicked(msg.arg1, true);
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleMessage
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
handleMessage
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder addClassDefinition(ClassDefinition cd) {
classDefinitions.add(cd);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addClassDefinition
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
addClassDefinition
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public String buildSqlQuery( Set<String> programUids, Set<String> userOrgUnitPaths, User currentUser )
{
Stream<String> queryParts = Stream.of(
SHARING_OUTER_QUERY_BEGIN,
innerQueryProvider( programUids, userOrgUnitPaths, currentUser ),
SHARING_OUTER_QUERY_END );
if ( nonSuperUser( currentUser ) )
{
queryParts = Stream.concat(
queryParts,
Stream.of(
"where",
getSharingConditions( LIKE_READ_METADATA ) ) );
}
return queryParts.collect( joining( " " ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSqlQuery
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
buildSqlQuery
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
|
3b245d04a58b78f0dc9bae8559f36ee4ca36dfac
| 0
|
Analyze the following code function for security vulnerabilities
|
private void invokeNextValve(Request request, Response response) throws IOException, ServletException {
getNext().invoke(request, response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeNextValve
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
invokeNextValve
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
private String readIdentification(Buffer.PlainBuffer buffer)
throws IOException {
String ident = new IdentificationStringParser(buffer, loggerFactory).parseIdentificationString();
if (ident.isEmpty()) {
return ident;
}
if (!ident.startsWith("SSH-2.0-") && !ident.startsWith("SSH-1.99-"))
throw new TransportException(DisconnectReason.PROTOCOL_VERSION_NOT_SUPPORTED,
"Server does not support SSHv2, identified as: " + ident);
return ident;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readIdentification
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
readIdentification
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean guestUserRegistration(TestUtils testUtils, AbstractRegistrationPage registrationPage)
{
registrationPage.clickRegister();
List<WebElement> infos = testUtils.getDriver().findElements(By.className("infomessage"));
for (WebElement info : infos) {
if (info.getText().contains("Registration successful.")) {
return true;
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2024-21650
- Severity: CRITICAL
- CVSS Score: 9.8
Description: XWIKI-21173: Improve escaping in registration success message
* Use $xwiki.getUserName to link to the user profile.
* Add an integration test to test proper escaping.
Function: guestUserRegistration
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
Fixed Code:
private boolean guestUserRegistration(AbstractRegistrationPage registrationPage)
{
registrationPage.clickRegister();
return ((RegistrationPage) registrationPage).getRegistrationSuccessMessage().isPresent();
}
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
guestUserRegistration
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 1
|
Analyze the following code function for security vulnerabilities
|
private void addLockoutResetMonitor(FingerprintServiceLockoutResetMonitor monitor) {
if (!mLockoutMonitors.contains(monitor)) {
mLockoutMonitors.add(monitor);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLockoutResetMonitor
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
|
addLockoutResetMonitor
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onDeviceProvisioned() {
sendUserPresentBroadcast();
synchronized (KeyguardViewMediator.this) {
// If system user is provisioned, we might want to lock now to avoid showing launcher
if (mustNotUnlockCurrentUser()) {
doKeyguardLocked(null);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDeviceProvisioned
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
|
onDeviceProvisioned
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void upsertSingleQuote(TestContext context) {
createFoo(context)
.upsert(FOO, randomUuid(), singleQuotePojo, context.asyncAssertSuccess());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: upsertSingleQuote
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
upsertSingleQuote
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRequestedOrientation(IBinder token, int requestedOrientation)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
data.writeInt(requestedOrientation);
mRemote.transact(SET_REQUESTED_ORIENTATION_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestedOrientation
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setRequestedOrientation
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeCancelPendingReload(long nativeContentViewCoreImpl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeCancelPendingReload
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeCancelPendingReload
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final void handleAppDiedLocked(ProcessRecord app, int pid,
boolean restarting, boolean allowRestart, boolean fromBinderDied) {
boolean kept = cleanUpApplicationRecordLocked(app, pid, restarting, allowRestart, -1,
false /*replacingPid*/, fromBinderDied);
if (!kept && !restarting) {
removeLruProcessLocked(app);
if (pid > 0) {
ProcessList.remove(pid);
}
}
mAppProfiler.onAppDiedLocked(app);
mAtmInternal.handleAppDied(app.getWindowProcessController(), restarting, () -> {
Slog.w(TAG, "Crash of app " + app.processName
+ " running instrumentation " + app.getActiveInstrumentation().mClass);
Bundle info = new Bundle();
info.putString("shortMsg", "Process crashed.");
finishInstrumentationLocked(app, Activity.RESULT_CANCELED, info);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAppDiedLocked
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
|
handleAppDiedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private List<ActiveAdmin> getActiveAdminsForLockscreenPoliciesLocked(int userHandle) {
if (isSeparateProfileChallengeEnabled(userHandle)) {
if (isPermissionCheckFlagEnabled()) {
return getActiveAdminsForAffectedUserInclPermissionBasedAdminLocked(userHandle);
}
// If this user has a separate challenge, only return its restrictions.
return getUserDataUnchecked(userHandle).mAdminList;
}
// If isSeparateProfileChallengeEnabled is false and userHandle points to a managed profile
// we need to query the parent user who owns the credential.
if (isPermissionCheckFlagEnabled()) {
return getActiveAdminsForUserAndItsManagedProfilesInclPermissionBasedAdminLocked(getProfileParentId(userHandle),
(user) -> !mLockPatternUtils.isSeparateProfileChallengeEnabled(user.id));
} else {
return getActiveAdminsForUserAndItsManagedProfilesLocked(getProfileParentId(userHandle),
(user) -> !mLockPatternUtils.isSeparateProfileChallengeEnabled(user.id));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminsForLockscreenPoliciesLocked
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
|
getActiveAdminsForLockscreenPoliciesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateShouldShowDialogsLocked(Configuration config) {
final boolean inputMethodExists = !(config.keyboard == Configuration.KEYBOARD_NOKEYS
&& config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH
&& config.navigation == Configuration.NAVIGATION_NONAV);
int modeType = config.uiMode & Configuration.UI_MODE_TYPE_MASK;
final boolean uiModeSupportsDialogs = (modeType != Configuration.UI_MODE_TYPE_CAR
&& !(modeType == Configuration.UI_MODE_TYPE_WATCH && Build.IS_USER)
&& modeType != Configuration.UI_MODE_TYPE_TELEVISION
&& modeType != Configuration.UI_MODE_TYPE_VR_HEADSET);
final boolean hideDialogsSet = Settings.Global.getInt(mContext.getContentResolver(),
HIDE_ERROR_DIALOGS, 0) != 0;
mShowDialogs = inputMethodExists && uiModeSupportsDialogs && !hideDialogsSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateShouldShowDialogsLocked
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
|
updateShouldShowDialogsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void quickEdit(String previousValue, @StringRes int hint, OnValueEdited callback) {
quickEdit(previousValue, callback, hint, false, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: quickEdit
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
quickEdit
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<FileEntry> previewCode(GeneratorOptionDTO generateOptionDTO) {
// 获取生成后的文件项 map
Map<String, FileEntry> map = getStringFileEntryMap(generateOptionDTO);
// 忽略大小写的排序
return CollectionUtil.sort(map.values(),
Comparator.comparing(FileEntry::getFilename, String.CASE_INSENSITIVE_ORDER));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: previewCode
File: ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java
Repository: ballcat-projects/ballcat-codegen
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2022-24881
|
HIGH
| 7.5
|
ballcat-projects/ballcat-codegen
|
previewCode
|
ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java
|
84a7cb38daf0295b93aba21d562ec627e4eb463b
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.