-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
25 lines (25 loc) · 859 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
pipeline {
agent {
label 'master'
}
stages {
stage('Scan') {
steps {
withCredentials([
string(credentialsId: 'DEV_AQUA_KEY', variable: 'AQUA_KEY'),
string(credentialsId: 'DEV_AQUA_SECRET', variable: 'AQUA_SECRET'),
string(credentialsId: 'GITHUB_TOKEN', variable: 'GITHUB_TOKEN')]
) {
sh '''
export TRIVY_RUN_AS_PLUGIN=aqua
export trivyVersion=0.32.0
export AQUA_URL=https://api-dev.aquasec.com
export CSPM_URL=https://stage.api.cloudsploit.com
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . v${trivyVersion}
./trivy fs --security-checks config,vuln,secret .
'''
}
}
}
}
}