File tree Expand file tree Collapse file tree 3 files changed +104
-0
lines changed
actions/security-scan-branch Expand file tree Collapse file tree 3 files changed +104
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Security SCA scan for branch
2
+ description : Scan nextflow branch for security vulnerabilities on third-party dependencies
3
+
4
+ inputs :
5
+ branch :
6
+ description : The branch to scan for security vulnerabilities
7
+ required : true
8
+
9
+ runs :
10
+ using : " composite"
11
+ steps :
12
+ - name : Checkout repository first
13
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14
+
15
+ - name : Checkout target branch
16
+ if : ${{ inputs.branch != '' }}
17
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18
+ with :
19
+ ref : ${{ inputs.branch }}
20
+ fetch-depth : 0
21
+ path : target-branch
22
+
23
+ - name : Setup Java
24
+ uses : actions/setup-java@v4
25
+ with :
26
+ java-version : ${{ inputs.java_version || '21' }}
27
+ distribution : ' temurin'
28
+ architecture : x64
29
+ cache : gradle
30
+
31
+ - name : Compile
32
+ shell : bash
33
+ run : |
34
+ if [ -d target-branch ]; then
35
+ cd target-branch
36
+ fi
37
+ make assemble
38
+
39
+ - name : assume role
40
+ uses : aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
41
+ with :
42
+ aws-region : " eu-west-1"
43
+ role-to-assume : " arn:aws:iam::730335503331:role/AmazonInspectorScanRoleForNextflow"
44
+
45
+ - name : Run SCA scan
46
+ id : inspector
47
+ uses : aws-actions/vulnerability-scan-github-action-for-amazon-inspector@5dc8a4bafed85c4c3d7070b4a7ada5b9d94041e3 # v1.2.1
48
+ with :
49
+ artifact_type : " repository"
50
+ artifact_path : ${{ inputs.branch != '' && './target-branch' || '.' }}
51
+ display_vulnerability_findings : " enabled"
52
+ critical_threshold : 1
53
+ high_threshold : 1
54
+
55
+ - name : On vulnerability threshold exceeded
56
+ run : exit ${{ steps.inspector.outputs.vulnerability_threshold_exceeded }}
57
+ shell : bash
58
+
59
+
60
+
Original file line number Diff line number Diff line change
1
+ name : Security SCA Scan Cron weekly
2
+ # This workflow runs a security scan on the specified branches of the Nextflow repository once a week
3
+
4
+ on :
5
+ schedule :
6
+ - cron : ' 0 0 * * 0'
7
+
8
+ jobs :
9
+ security-scan :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : read
13
+ id-token : write
14
+ strategy :
15
+ fail-fast : false
16
+ matrix :
17
+ branch :
18
+ - " STABLE-24.10.x"
19
+ - " STABLE-25.04.x"
20
+
21
+ steps :
22
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23
+ - name : Run Security SCA Scan
24
+ uses : ./.github/actions/security-scan-branch
25
+ with :
26
+ branch : ${{ matrix.branch }}
Original file line number Diff line number Diff line change
1
+ name : Security SCA Scan Cron weekly
2
+ # This workflow runs a security scan on master push
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - master
8
+ jobs :
9
+ security-scan :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : read
13
+ id-token : write
14
+
15
+ steps :
16
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17
+ - name : Run Security SCA Scan
18
+ uses : ./.github/actions/security-scan-branch
You can’t perform that action at this time.
0 commit comments