@@ -2,7 +2,7 @@ name: Scheduled Trivy Scan
2
2
on :
3
3
workflow_dispatch :
4
4
schedule :
5
- - cron : ' 0 10 * * 1'
5
+ - cron : " 0 10 * * 1"
6
6
7
7
jobs :
8
8
trivy :
@@ -23,15 +23,15 @@ jobs:
23
23
with :
24
24
image-ref : ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
25
25
format : json
26
- output : ' ${{ matrix.image }}-trivy-scan-results.json'
26
+ output : " ${{ matrix.image }}-trivy-scan-results.json"
27
27
28
28
- name : Run Trivy vulnerability scanner (table)
29
29
uses :
aquasecurity/[email protected]
30
30
env :
31
31
TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db
32
32
with :
33
33
image-ref : ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
34
- output : ' ${{ matrix.image }}-trivy-scan-results.txt'
34
+ output : " ${{ matrix.image }}-trivy-scan-results.txt"
35
35
36
36
- name : Post all scan results to Github Summary as a table
37
37
env :
48
48
env :
49
49
TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db
50
50
with :
51
- format : ' github'
52
- output : ' dependency-results-${{ matrix.image }}.sbom.json'
51
+ format : " github"
52
+ output : " dependency-results-${{ matrix.image }}.sbom.json"
53
53
image-ref : ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
54
54
github-pat : ${{ secrets.GITHUB_TOKEN }}
55
55
@@ -66,44 +66,29 @@ jobs:
66
66
- name : Send Slack Notification
67
67
68
68
with :
69
+ webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
70
+ webhook-type : incoming-webhook
69
71
payload : |
70
- {
71
- "text": "Trivy scan results",
72
- "blocks": [
73
- {
74
- "type": "header",
75
- "text": {
76
- "type": "plain_text",
77
- "text": "Trivy scan results for sofie-core-${{ matrix.image }}:latest"
78
- }
79
- },
80
- {
81
- "type": "section",
82
- "text": {
83
- "type": "mrkdwn",
84
- "text": ":thisisfine: ${{ env.SUMMARY }}"
85
- }
86
- },
87
- {
88
- "type": "section",
89
- "text": {
90
- "type": "mrkdwn",
91
- "text": "Read the full scan results on Github"
92
- },
93
- "accessory": {
94
- "type": "button",
95
- "text": {
96
- "type": "plain_text",
97
- "text": ":github: Scan results",
98
- "emoji": true
99
- },
100
- "value": "workflow_run",
101
- "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
102
- "action_id": "button-action"
103
- }
104
- }
105
- ]
106
- }
107
- env :
108
- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
109
- SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
72
+ text: "Trivy scan results"
73
+ blocks:
74
+ - type: "header"
75
+ text:
76
+ type: "plain_text"
77
+ text: "Trivy scan results for sofie-core-${{ matrix.image }}:latest"
78
+ - type: "section"
79
+ text:
80
+ type: "mrkdwn"
81
+ text: ":thisisfine: ${{ env.SUMMARY }}"
82
+ - type: "section"
83
+ text:
84
+ type: "mrkdwn"
85
+ text: "Read the full scan results on Github"
86
+ accessory:
87
+ type: "button"
88
+ text:
89
+ type: "plain_text"
90
+ text: ":github: Scan results"
91
+ emoji: true
92
+ value: "workflow_run"
93
+ url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
94
+ action_id: "button-action"
0 commit comments