-
Notifications
You must be signed in to change notification settings - Fork 14
/
Jenkinsfile
37 lines (36 loc) · 831 Bytes
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage("threat modeling") {
agent {
docker {
image "rusakovichma/tic-taac:latest"
args '''\
--user 0 \
--volume ${WORKSPACE}/threat-model:/threat-model:ro \
--volume ${WORKSPACE}/report:/report:rw \
--entrypoint ""
'''
reuseNode true
}
}
steps {
script {
def result = sh label: "tic-taac", returnStatus: true,
script: """\
mkdir -p report &>/dev/null
/usr/share/tic-taac/bin/tic-taac.sh \
--failOnThreatRisk High \
--threatModel /threat-model/threat-model.yml \
--mitigations /threat-model/whitelisting.yml \
--outFormat html \
--out /report
"""
if (result > 0) {
unstable(message: "Unmitigated Threats found")
}
}
}
}
}
}