Skip to content

Commit 9c4927a

Browse files
Separated GH action steps in different sets to better locate Sysdig image scan results
1 parent e4e2271 commit 9c4927a

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/build.yaml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: Lint, test and security scan
22
on:
33
push:
44
branches:
@@ -12,7 +12,8 @@ on:
1212
- created
1313

1414
jobs:
15-
check_installer:
15+
check_bash_installer:
16+
name: Bash shell lint check
1617
runs-on: ubuntu-16.04
1718
steps:
1819
- name: Checkout repo
@@ -29,6 +30,7 @@ jobs:
2930
exclude: './test/*'
3031

3132
check_yaml:
33+
name: YAML lint check
3234
runs-on: ubuntu-16.04
3335
steps:
3436
- name: Checkout repo
@@ -43,7 +45,8 @@ jobs:
4345
env:
4446
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547

46-
check_main:
48+
check_dotnet:
49+
name: .NET lint, test and build check
4750
runs-on: ubuntu-16.04
4851
env:
4952
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
@@ -79,15 +82,21 @@ jobs:
7982
- name: Dotnet test solution
8083
run: dotnet test AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver.sln
8184

85+
sysdig_dockerfile_cis_benchmark:
86+
name: Sysdig Dockerfile CIS benchmark
87+
needs: [check_bash_installer, check_yaml, check_dotnet]
88+
runs-on: ubuntu-16.04
89+
steps:
90+
- name: Checkout repo
91+
uses: actions/checkout@v2
8292
- name: Sysdig CIS dockerfile benchmark
8393
uses: sysdiglabs/[email protected]
8494
id: cis_dockerfile_benchmark
8595
with:
8696
directory: './AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver/'
8797
dockerfilePattern: 'Dockerfile'
8898
disallowedPackages: 'netcat'
89-
secretPatterns: 'aws_secret,pass'
90-
99+
secretPatterns: 'aws_secret,pass'
91100
- name: Post run Sysdig CIS dockerfile benchmark
92101
env:
93102
SYSDIG_SECURE_TOKEN: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
@@ -104,11 +113,16 @@ jobs:
104113
# send result to Sysdig monitor
105114
curl -X POST -s https://app.sysdigcloud.com/api/events -H 'Content-Type: application/json; charset=UTF-8' -H 'Authorization: Bearer '"${SYSDIG_SECURE_TOKEN}"'' -d '{"event":{"name":"CIS Dockerfile Benchmark - PR: '"${PR_TITLE}"' ","description":"'"${reportString}"'","severity":"6"}}' --compressed
106115
echo "###"
107-
108116
117+
sysdig_image_scan:
118+
name: Sysdig image scan
119+
needs: [check_bash_installer, check_yaml, check_dotnet]
120+
runs-on: ubuntu-16.04
121+
steps:
122+
- name: Checkout repo
123+
uses: actions/checkout@v2
109124
- name: Build the Docker image
110125
run: docker build -f ./AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver/Dockerfile ./AKSKubeAuditReceiverSolution --tag sysdiglabs/aks-audit-log-forwarder:auto
111-
112126
- name: Sysdig Secure inline image scan
113127
uses: sysdiglabs/scan-action@v2
114128
with:

0 commit comments

Comments
 (0)