Skip to content

Commit 7df8d24

Browse files
authored
Merge pull request #27 from angrymeir/26-using-docker-readme-update
Describe docker usage in readme
2 parents 3414ace + f7ecc16 commit 7df8d24

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Procedure:
2727
2. Convert report
2828
3. Upload converted report as junit report
2929

30-
**Example for Secret Scanning**
30+
### Example for Secret Scanning
3131
This example can be used as is.
3232
```yaml
3333
stages:
@@ -55,7 +55,7 @@ secret_convert:
5555
junit: gl-secret-detection-report.xml
5656
```
5757
58-
**Example for SAST**
58+
### Example for SAST
5959
Since GitLab decides dynamically which scanners to use depending on project languages, it makes sense to first perform a testrun only including the template. This way one can see which jobs are executed and then overwrite them.
6060
```yaml
6161
stages:
@@ -105,9 +105,9 @@ brakeman-sast-convert:
105105

106106
```
107107

108-
**Example for Container Scanning**
108+
### Example for Container Scanning
109109

110-
```yml
110+
```yaml
111111
- include:
112112
- template: Jobs/Build.gitlab-ci.yml #Build and push the container image
113113
- template: Security/Container-Scanning.gitlab-ci.yml #Scan the built image
@@ -130,7 +130,7 @@ container_scanning-convert:
130130
junit: gl-container-scanning-report.xml
131131
```
132132
133-
**Suppression**
133+
### Suppression
134134
135135
You can provide a file with suppression which will allow to ignore some vulnerabilities.
136136
@@ -151,6 +151,27 @@ And now you can modify execution commands as follows:
151151
- ss2ju sast gl-sast-semgrep-report.json gl-sast-semgrep-report.xml .gitlab/ss2ju-config.yml
152152
```
153153

154+
155+
### Usage with docker
156+
For easier usage in CI, `Secscanner2JUnit` is also shipped in a docker container: https://hub.docker.com/r/angrymeir/secscanner2junit
157+
Its' usage is similar to the ways described above:
158+
```yaml
159+
...
160+
161+
secret_convert:
162+
stage: convert
163+
image:
164+
name: angrymeir/secscanner2junit:latest
165+
entrypoint: [""]
166+
dependencies:
167+
- secret_detection
168+
script:
169+
- ss2ju secrets gl-secret-detection-report.json gl-secret-detection-report.xml
170+
artifacts:
171+
reports:
172+
junit: gl-secret-detection-report.xml
173+
```
174+
154175
## Future Plans
155176

156177
- [ ] Implement IaC Scanning

0 commit comments

Comments
 (0)