This repository was archived by the owner on Oct 22, 2023. It is now read-only.
forked from juice-shop/juice-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
70 lines (64 loc) · 1.82 KB
/
.gitlab-ci.yml
File metadata and controls
70 lines (64 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
stages:
- build
- security_scan
- reporting
- deploy
build:
stage: build
image: docker:latest
services:
- docker:dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
dast_scan:
stage: security_scan
needs: [build]
image: registry.gitlab.com/gitlab-org/security-products/zaproxy:latest
allow_failure: true
artifacts:
when: always
expire_in: "10 days"
paths:
- "security_scan/testreport.html"
script:
- mkdir security_scan
- /analyze -t https://owasp-juice-shop-demo-0d931ec9d675.herokuapp.com/ -r $(pwd)/security_scan/testreport.html
owasp_dependency_check:
stage: security_scan
needs: [build]
image: nbaars/owasp-dependency-check-as-one:latest
allow_failure: true
artifacts:
when: always
paths:
- "owasp_dependency_check/dependency-check-report.html"
- "owasp_dependency_check/dependency-check-report.xml"
expire_in: "10 days"
script:
- mkdir owasp_dependency_check
- dependency-check --data /data --noupdate -s . -o ./owasp_dependency_check -f HTML -f XML --failOnCVSS 8
owasp_zap_scan:
stage: security_scan
needs: [build]
image: owasp/zap2docker-stable:2.12.0
allow_failure: true
artifacts:
when: always
expire_in: "30 days"
paths:
- "owasp_zap_scan/testreport.xml"
script:
- mkdir -p /zap/wrk owasp_zap_scan
- /zap/zap-baseline.py -t https://owasp-juice-shop-demo-0d931ec9d675.herokuapp.com/ -g gen.conf -x $(pwd)/owasp_zap_scan/testreport.xml
deploy_report_to_orchestron:
stage: reporting
needs: [owasp_zap_scan]
script:
- echo "Sending to orchstron"
deploy_to_heroku:
stage: deploy
needs: [owasp_dependency_check]
script:
- echo "Deploying to Heroku"