Skip to content

Commit f7aae06

Browse files
committed
commented to test output
1 parent cc3de29 commit f7aae06

File tree

3 files changed

+57
-83
lines changed

3 files changed

+57
-83
lines changed

.github/workflows/scan.yml

+2-31
Original file line numberDiff line numberDiff line change
@@ -70,39 +70,10 @@ jobs:
7070

7171
SendSlackNotification:
7272
needs: BuildAndScan
73-
uses: ./.github/workflows/send-slack-notification.yml
74-
if: github.event_name == 'schedule' && needs.BuildAndScan.steps.cve-threshold.outcome == 'failure'
73+
uses: ./.github/workflows/send-notification.yml
74+
# if: github.event_name == 'schedule' && needs.BuildAndScan.steps.cve-threshold.outcome == 'failure'
7575
with:
7676
CVE_CRITICAL: ${{needs.BuildAndScan.outputs.CVE_CRITICAL}}
7777
CVE_HIGH: ${{needs.BuildAndScan.outputs.CVE_HIGH}}
7878
CVE_MEDIUM: ${{needs.BuildAndScan.outputs.CVE_MEDIUM}}
7979
secrets: inherit
80-
81-
82-
# - name: Send notification to Slack
83-
# id: slack
84-
# if: always() && github.event_name == 'schedule' && steps.cve-threshold.outcome == 'failure'
85-
# uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
86-
# with:
87-
# payload: |
88-
# {
89-
# "blocks": [
90-
# {
91-
# "type": "header",
92-
# "text": {
93-
# "type": "plain_text",
94-
# "text": "[ ${{ github.event.repository.name }} ]"
95-
# }
96-
# },
97-
# {
98-
# "type": "section",
99-
# "text": {
100-
# "type": "mrkdwn",
101-
# "text": " `CRITICAL` : *${{ env.CVE_CRITICAL }}*\n\n`HIGH` : *${{ env.CVE_HIGH }}*\n\n`MEDIUM` : *${{ env.CVE_MEDIUM }}*\n\n<https://github.com/${{ github.repository }}/security/code-scanning |See details on GitHub>"
102-
# }
103-
# }
104-
# ]
105-
# }
106-
# env:
107-
# SLACK_WEBHOOK_URL: ${{ secrets.CVE_SCAN_SLACK_WEBHOOK }}
108-
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Send notification"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
CVE_CRITICAL:
7+
required: true
8+
type: string
9+
CVE_HIGH:
10+
required: true
11+
type: string
12+
CVE_MEDIUM:
13+
required: true
14+
type: string
15+
secrets:
16+
CVE_SCAN_SLACK_WEBHOOK:
17+
required: true
18+
19+
jobs:
20+
SendNotify:
21+
name: Notify Slack
22+
runs-on: ubuntu-latest
23+
# environment: prod
24+
steps:
25+
- name: Send notification to Slack
26+
id: slack
27+
run: |
28+
echo "CVE_CRITICAL"
29+
echo "CVE_HIGH"
30+
echo "CVE_MEDIUM"
31+
32+
# uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
33+
# with:
34+
# payload: |
35+
# {
36+
# "blocks": [
37+
# {
38+
# "type": "header",
39+
# "text": {
40+
# "type": "plain_text",
41+
# "text": "[ ${{ github.event.repository.name }} ]"
42+
# }
43+
# },
44+
# {
45+
# "type": "section",
46+
# "text": {
47+
# "type": "mrkdwn",
48+
# "text": " `CRITICAL` : *${{ env.CVE_CRITICAL }}*\n\n`HIGH` : *${{ env.CVE_HIGH }}*\n\n`MEDIUM` : *${{ env.CVE_MEDIUM }}*\n\n<https://github.com/${{ github.repository }}/security/code-scanning |See details on GitHub>"
49+
# }
50+
# }
51+
# ]
52+
# }
53+
# env:
54+
# SLACK_WEBHOOK_URL: ${{ secrets.CVE_SCAN_SLACK_WEBHOOK }}
55+
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

.github/workflows/send-slack-notification.yml

-52
This file was deleted.

0 commit comments

Comments
 (0)