@@ -2,18 +2,21 @@ name: CI-AppSec [Master]
2
2
on :
3
3
schedule :
4
4
# At 13:00 on every day-of-week from Sunday through Thursday.
5
- - cron : ' 0 13 * * SUN-THU'
5
+ - cron : " 0 13 * * SUN-THU"
6
6
workflow_dispatch :
7
7
# The workflow will only run when a push that includes a change to the build.gradle file is made in the main branch.
8
8
push :
9
9
branches :
10
10
- main
11
11
paths :
12
- - ' build.gradle'
12
+ - " build.gradle"
13
+ pull_request :
14
+ branches :
15
+ - main
13
16
14
17
jobs :
15
18
blackduck-scan :
16
- runs-on : [ ubuntu-latest ]
19
+ runs-on : [ubuntu-latest]
17
20
steps :
18
21
- uses : actions/checkout@v3
19
22
- uses : actions/setup-java@v3
24
27
- name : Setup Gradle
25
28
uses : gradle/gradle-build-action@v2
26
29
27
- - name : Make gradlew executable
28
- run : chmod +x ./gradlew
29
-
30
30
- name : Execute Gradle build
31
31
run : ./gradlew check
32
32
env :
@@ -45,46 +45,45 @@ jobs:
45
45
blackduck_url : ${{ secrets.BLACKDUCK_URL }}
46
46
blackduck_token : ${{ secrets.BLACKDUCK_API_TOKEN }}
47
47
blackduck_scan_full : true
48
-
48
+
49
49
# ## Accepts Multiple Values
50
- blackduck_scan_failure_severities : ' BLOCKER,CRITICAL'
51
-
50
+ blackduck_scan_failure_severities : " BLOCKER,CRITICAL"
51
+
52
52
# ## Uncomment below configuration to enable automatic fix pull request creation if vulnerabilities are reported
53
53
blackduck_fixpr_enabled : true
54
54
blackduck_fixpr_maxCount : 5
55
- blackduck_fixpr_filter_severities : ' CRITICAL,HIGH'
56
- blackduck_fixpr_useUpgradeGuidance : ' SHORT_TERM,LONG_TERM'
55
+ blackduck_fixpr_filter_severities : " CRITICAL,HIGH"
56
+ blackduck_fixpr_useUpgradeGuidance : " SHORT_TERM,LONG_TERM"
57
57
github_token : ${{ secrets.GITHUB_TOKEN }} # Mandatory when blackduck_fixpr_enabled is set to 'true'
58
-
58
+
59
59
# ## Uncomment below configuration if Synopsys Bridge diagnostic files needs to be uploaded
60
60
# include_diagnostics: true
61
61
62
62
- name : If failed - Configure 1Password Service Account For Slack Webhook URL Secret
63
63
uses : 1password/load-secrets-action/configure@v1
64
64
if : ${{ failure() }}
65
65
with :
66
- service-account-token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
66
+ service-account-token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
67
67
- name : If failed - Load Slack Webhook URL Secret
68
68
uses : 1password/load-secrets-action@v1
69
69
if : ${{ failure() }}
70
70
with :
71
- export-env : true
71
+ export-env : true
72
72
env :
73
- SLACK_WEBHOOK_URL : op://Security/slack-appsec-blackduck-alerts/webhook-url
74
- - name : If failed - Report failure to Slack
73
+ SLACK_WEBHOOK_URL : op://Security/slack-appsec-blackduck-alerts/webhook-url
74
+ - name : If failed - Report failure to Slack
75
75
# Slack channel: appsec-blackduck-alerts
76
- uses : ravsamhq/notify-slack-action@v2
76
+ uses : ravsamhq/notify-slack-action@v2
77
77
if : ${{ failure() }}
78
78
with :
79
- status : ${{ job.status }}
80
- token : ${{ secrets.GITHUB_TOKEN }}
81
- notification_title : " {workflow} has {status_message}"
82
- message_format : " {emoji} *{workflow}* {status_message} in <{run_url}|{repo}>"
83
- footer : " Linked Run <{run_url}|{repo}>"
84
- notify_when : " failure"
85
- mention_users : " U040AD4BT42"
86
- mention_users_when : " failure,warnings"
87
- mention_groups : " !channel"
79
+ status : ${{ job.status }}
80
+ token : ${{ secrets.GITHUB_TOKEN }}
81
+ notification_title : " {workflow} has {status_message}"
82
+ message_format : " {emoji} *{workflow}* {status_message} in <{run_url}|{repo}>"
83
+ footer : " Linked Run <{run_url}|{repo}>"
84
+ notify_when : " failure"
85
+ mention_users : " U040AD4BT42"
86
+ mention_users_when : " failure,warnings"
87
+ mention_groups : " !channel"
88
88
env :
89
- SLACK_WEBHOOK_URL : ${{ env.SLACK_WEBHOOK_URL }}
90
-
89
+ SLACK_WEBHOOK_URL : ${{ env.SLACK_WEBHOOK_URL }}
0 commit comments