forked from juice-shop/juice-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
37 lines (33 loc) · 930 Bytes
/
Jenkinsfile
File metadata and controls
37 lines (33 loc) · 930 Bytes
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
environment {
SOCKET_SECURITY_API_TOKEN = credentials('socket-api-key')
REPO_NAME = "${env.REPO_NAME ?: 'project-x'}"
}
stages {
stage('Install Dependencies') {
steps {
sh 'npm install --ignore-scripts'
}
}
stage('Socket Security Scan') {
steps {
sh """
socketcli \
--target-path . \
--repo ${env.REPO_NAME ?: 'project-x'} \
--default-branch \
--reach \
--reach-ecosystems npm \
--disable-blocking \
--integration api
"""
}
}
}
post {
always {
echo 'Scan complete. View results at https://socket.dev/dashboard'
}
}
}