@@ -2,7 +2,7 @@ name: Scheduled Trivy Scan
22on :
33 workflow_dispatch :
44 schedule :
5- - cron : ' 0 10 * * 1'
5+ - cron : " 0 10 * * 1"
66
77jobs :
88 trivy :
@@ -23,15 +23,15 @@ jobs:
2323 with :
2424 image-ref : ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
2525 format : json
26- output : ' ${{ matrix.image }}-trivy-scan-results.json'
26+ output : " ${{ matrix.image }}-trivy-scan-results.json"
2727
2828 - name : Run Trivy vulnerability scanner (table)
2929 uses :
aquasecurity/[email protected] 3030 env :
3131 TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db
3232 with :
3333 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"
3535
3636 - name : Post all scan results to Github Summary as a table
3737 env :
4848 env :
4949 TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db
5050 with :
51- format : ' github'
52- output : ' dependency-results-${{ matrix.image }}.sbom.json'
51+ format : " github"
52+ output : " dependency-results-${{ matrix.image }}.sbom.json"
5353 image-ref : ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
5454 github-pat : ${{ secrets.GITHUB_TOKEN }}
5555
@@ -66,44 +66,30 @@ jobs:
6666 - name : Send Slack Notification
67676868 with :
69+ method : chat.postMessage
70+ webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
71+ webhook-type : incoming-webhook
6972 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
73+ text: "Trivy scan results"
74+ blocks:
75+ - type: "header"
76+ text:
77+ type: "plain_text"
78+ text: "Trivy scan results for sofie-core-${{ matrix.image }}:latest"
79+ - type: "section"
80+ text:
81+ type: "mrkdwn"
82+ text: ":thisisfine: ${{ env.SUMMARY }}"
83+ - type: "section"
84+ text:
85+ type: "mrkdwn"
86+ text: "Read the full scan results on Github"
87+ - accessory:
88+ type: "button"
89+ text:
90+ type: "plain_text"
91+ text: ":github: Scan results"
92+ emoji: true
93+ value: "workflow_run"
94+ url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
95+ action_id: "button-action"
0 commit comments