File tree Expand file tree Collapse file tree 6 files changed +53
-4
lines changed
docker/sonarqube/extensions/plugins Expand file tree Collapse file tree 6 files changed +53
-4
lines changed Original file line number Diff line number Diff line change 16
16
.ipynb_checkpoints
17
17
venv
18
18
.venv
19
- docker
19
+ docker /marklogic
20
+ docker /sonarqube /data
21
+ docker /sonarqube /logs
20
22
export
Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ you've introduced on the feature branch you're working on. You can then click on
83
83
Note that if you only need results on code smells and vulnerabilities, you can repeatedly run ` ./gradlew sonar `
84
84
without having to re-run the tests.
85
85
86
+ Our Sonar instance is also configured to scan for dependency vulnerabilities
87
+ [ via the dependency-check plugin] ( https://github.com/dependency-check/dependency-check-sonar-plugin ) . For more
88
+ information, see the ` dependencyCheck ` block in this project's ` build.gradle ` file.
89
+
86
90
## Accessing MarkLogic logs in Grafana
87
91
88
92
This project's ` docker-compose-3nodes.yaml ` file includes
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ plugins {
7
7
id ' signing'
8
8
id " jacoco"
9
9
id " org.sonarqube" version " 4.4.1.3373"
10
+ id " org.owasp.dependencycheck" version " 10.0.3"
10
11
}
11
12
12
13
group ' com.marklogic'
@@ -88,6 +89,16 @@ dependencies {
88
89
testImplementation " org.skyscreamer:jsonassert:1.5.1"
89
90
}
90
91
92
+ // See https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html for more information.
93
+ dependencyCheck {
94
+ // Need a JSON report to integrate with Sonar. And HTML is easier for humans to read.
95
+ formats = [" HTML" , " JSON" ]
96
+ // We don't include compileOnly since that includes Spark, and Spark and its dependencies are not actual dependencies
97
+ // of our connector.
98
+ scanConfigurations = [" shadowDependencies" ]
99
+ suppressionFile = " config/dependency-check-suppressions.xml"
100
+ }
101
+
91
102
test {
92
103
useJUnitPlatform()
93
104
finalizedBy jacocoTestReport
@@ -106,6 +117,8 @@ sonar {
106
117
properties {
107
118
property " sonar.projectKey" , " marklogic-spark"
108
119
property " sonar.host.url" , " http://localhost:9000"
120
+ // See https://github.com/dependency-check/dependency-check-sonar-plugin for more information.
121
+ property " sonar.dependencyCheck.jsonReportPath" , " build/reports/dependency-check-report.json"
109
122
}
110
123
}
111
124
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <suppressions xmlns =" https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd" >
3
+ <suppress >
4
+ <notes ><![CDATA[
5
+ file name: jackson-databind-2.14.3.jar
6
+
7
+ See https://nvd.nist.gov/vuln/detail/CVE-2023-35116 and https://github.com/FasterXML/jackson-databind/issues/3972 .
8
+ The Jackson team heartily refutes that this is a vulnerability, and we agree.
9
+ ]]> </notes >
10
+ <packageUrl regex =" true" >^pkg:maven/com\.fasterxml\.jackson\.core/jackson-databind@.*$</packageUrl >
11
+ <cve >CVE-2023-35116</cve >
12
+ </suppress >
13
+ <suppress >
14
+ <notes ><![CDATA[
15
+ file name: commons-compress-1.24.0.jar
16
+ This is brought in by Jena 4.10. It's a medium, and we don't want to interfere with Jena dependencies.
17
+ ]]> </notes >
18
+ <packageUrl regex =" true" >^pkg:maven/org\.apache\.commons/commons-compress@.*$</packageUrl >
19
+ <cve >CVE-2024-25710</cve >
20
+ </suppress >
21
+ <suppress >
22
+ <notes ><![CDATA[
23
+ file name: commons-compress-1.24.0.jar
24
+ This is brought in by Jena 4.10. It's a medium, and we don't want to interfere with Jena dependencies.
25
+ ]]> </notes >
26
+ <packageUrl regex =" true" >^pkg:maven/org\.apache\.commons/commons-compress@.*$</packageUrl >
27
+ <cve >CVE-2024-26308</cve >
28
+ </suppress >
29
+ </suppressions >
Original file line number Diff line number Diff line change @@ -28,9 +28,10 @@ services:
28
28
SONAR_JDBC_USERNAME : sonar
29
29
SONAR_JDBC_PASSWORD : sonar
30
30
volumes :
31
- - sonarqube_data:/opt/sonarqube/data
32
- - sonarqube_extensions:/opt/sonarqube/extensions
33
- - sonarqube_logs:/opt/sonarqube/logs
31
+ - ./docker/sonarqube/data:/opt/sonarqube/data
32
+ - ./docker/sonarqube/logs:/opt/sonarqube/logs
33
+ # Allows for Sonar plugins to be installed by including plugin jar files in this directory.
34
+ - ./docker/sonarqube/extensions:/opt/sonarqube/extensions
34
35
ports :
35
36
- " 9000:9000"
36
37
You can’t perform that action at this time.
0 commit comments