Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Commit dd9dfd4

Browse files
authored
Merge pull request #55 from secureCodeBox/feature/defect-dojo-integration
Feature/defect dojo integration
2 parents 9513960 + 59c4981 commit dd9dfd4

File tree

28 files changed

+1306
-13
lines changed

28 files changed

+1306
-13
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COPY --from=builder ./scb-scanprocesses/subdomain-scanner-process/target/subdoma
2424

2525
COPY --from=builder ./scb-persistenceproviders/elasticsearch-persistenceprovider/target/elasticsearch-persistenceprovider-0.0.1-SNAPSHOT-jar-with-dependencies.jar /scb-engine/lib/
2626
COPY --from=builder ./scb-persistenceproviders/s3-persistenceprovider/target/s3-persistenceprovider-0.0.1-SNAPSHOT-jar-with-dependencies.jar /scb-engine/lib/
27+
COPY --from=builder ./scb-persistenceproviders/defectdojo-persistenceprovider/target/defectdojo-persistenceprovider-0.0.1-SNAPSHOT-jar-with-dependencies.jar /scb-engine/lib/
2728

2829
WORKDIR /scb-engine
2930

scb-engine/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@
190190
<version>0.0.1-SNAPSHOT</version>
191191
<scope>runtime</scope>
192192
</dependency>
193+
<dependency>
194+
<groupId>io.securecodebox.persistenceproviders</groupId>
195+
<artifactId>defectdojo-persistenceprovider</artifactId>
196+
<version>0.0.1-SNAPSHOT</version>
197+
<scope>runtime</scope>
198+
</dependency>
193199
</dependencies>
194200
<dependencyManagement>
195201
<!-- This will overwrite spring boot dependency management version for elastic search-->

scb-engine/src/main/resources/application-dev.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ logging.level.io.securecodebox: DEBUG
99
# Configure which persistence provider you would like to choose
1010
# - none
1111
# - elasticsearch
12-
securecodebox.persistence.provider: none
13-
12+
securecodebox.persistence.defectdojo.enabled: "true"
1413
securecodebox.rest.user.scanner-default:
1514
user-id: default-scanner
1615
password: scan
16+
17+
securecodebox.persistence.defectdojo.baseurl: http://localhost:8000
18+
securecodebox.persistence.defectdojo.apikey:
19+

scb-engine/src/main/resources/application.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ camunda.bpm:
2929
logging.level: INFO
3030
logging.level.io.securecodebox: INFO
3131

32-
# Configure which persistence provider you would like to choose
33-
# - none
34-
# - elasticsearch
35-
securecodebox.persistence.provider: none
32+
# Persistence Provider Config
33+
securecodebox.persistence.none.enabled: "false"
34+
securecodebox.persistence.elasticsearch.enabled: "false"
35+
securecodebox.persistence.s3.enabled: "false"
36+
securecodebox.persistence.defectdojo.enabled: "false"
3637

3738
# Configuration for the s3 persistence provider:
3839
securecodebox.persistence.s3.bucket: abc-def
@@ -44,6 +45,7 @@ securecodebox.persistence.elasticsearch.port: 9200
4445
securecodebox.persistence.elasticsearch.index.prefix: securecodebox
4546
securecodebox.persistence.elasticsearch.index.delete_on_init: false
4647

48+
4749
securecodebox.default.target.name: BodgeIT Public Host
4850
securecodebox.default.target.location: bodgeit
4951
securecodebox.default.target.uri: http://bodgeit:8080/bodgeit
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<!--
2+
~ /*
3+
~ * SecureCodeBox (SCB)
4+
~ * Copyright 2015-2018 iteratec GmbH
5+
~ *
6+
~ * Licensed under the Apache License, Version 2.0 (the "License");
7+
~ * you may not use this file except in compliance with the License.
8+
~ * You may obtain a copy of the License at
9+
~ *
10+
~ * http://www.apache.org/licenses/LICENSE-2.0
11+
~ *
12+
~ * Unless required by applicable law or agreed to in writing, software
13+
~ * distributed under the License is distributed on an "AS IS" BASIS,
14+
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ * See the License for the specific language governing permissions and
16+
~ * limitations under the License.
17+
~ */
18+
-->
19+
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<groupId>io.securecodebox.persistenceproviders</groupId>
25+
<artifactId>default-persistence-collection</artifactId>
26+
<version>0.0.1-SNAPSHOT</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>defectdojo-persistenceprovider</artifactId>
31+
<version>0.0.1-SNAPSHOT</version>
32+
33+
<dependencies>
34+
<dependency>
35+
<groupId>io.securecodebox.core</groupId>
36+
<artifactId>sdk</artifactId>
37+
<scope>provided</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.springframework</groupId>
41+
<artifactId>spring-web</artifactId>
42+
<scope>compile</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.elasticsearch.client</groupId>
46+
<artifactId>elasticsearch-rest-high-level-client</artifactId>
47+
<version>6.2.4</version>
48+
<scope>compile</scope>
49+
</dependency>
50+
<dependency>
51+
<groupId>org.mockito</groupId>
52+
<artifactId>mockito-core</artifactId>
53+
<scope>test</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>junit</groupId>
57+
<artifactId>junit</artifactId>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.springframework</groupId>
62+
<artifactId>spring-test</artifactId>
63+
<scope>test</scope>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.projectlombok</groupId>
67+
<artifactId>lombok</artifactId>
68+
<version>1.18.4</version>
69+
<scope>provided</scope>
70+
</dependency>
71+
</dependencies>
72+
73+
74+
<build>
75+
<plugins>
76+
<plugin>
77+
<artifactId>maven-assembly-plugin</artifactId>
78+
<version>3.1.0</version>
79+
<configuration>
80+
<descriptorRefs>
81+
<descriptorRef>jar-with-dependencies</descriptorRef>
82+
</descriptorRefs>
83+
</configuration>
84+
<executions>
85+
<execution>
86+
<id>make-assembly</id>
87+
<phase>package</phase>
88+
<goals>
89+
<goal>single</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
</plugin>
94+
</plugins>
95+
</build>
96+
97+
98+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package io.securecodebox.persistence;
2+
3+
public enum DefectDojoMetaFields {
4+
DEFECT_DOJO_USER,
5+
DEFECT_DOJO_PRODUCT
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
*
3+
* SecureCodeBox (SCB)
4+
* Copyright 2015-2018 iteratec GmbH
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
* /
18+
*/
19+
package io.securecodebox.persistence;
20+
21+
public class DefectDojoPersistenceException extends PersistenceException{
22+
public DefectDojoPersistenceException(String message) {
23+
super(message);
24+
}
25+
26+
public DefectDojoPersistenceException(String message, Throwable cause) {
27+
super(message, cause);
28+
}
29+
}

0 commit comments

Comments
 (0)