1
- # [ NOT PRODUCTION READY] EC2 Vulnerability Scanfor Amazon Inspector (Plus Jira Intergration)
1
+ # [ NOT PRODUCTION READY] EC2 Vulnerability Scan for Amazon Inspector (Plus Jira Intergration)
2
2
3
3
Amazon Inspector is a vulnerability management service that scans AWS workloads for known software vulnerabilities.
4
4
@@ -29,15 +29,11 @@ jobs:
29
29
daily_job :
30
30
runs-on : ubuntu-latest
31
31
32
- # change this to match your GitHub Secrets environment
33
32
environment :
34
33
name : your_github_secrets_environment
35
34
36
35
steps :
37
36
38
- # modify this block based on how you authenticate to AWS
39
- # make sure you have permission to access the Inspector ScanEC2 API
40
- # https://docs.aws.amazon.com/inspector/latest/user/configure-cicd-account.html#cicd-iam-role
41
37
- name : Configure AWS credentials
42
38
uses : aws-actions/configure-aws-credentials@v4
43
39
with :
@@ -65,27 +61,15 @@ jobs:
65
61
jira-api-token : ${{ secrets.JIRA_API_TOKEN }}
66
62
jira-project-key : ${{ secrets.JIRA_PROJECT_KEY }}
67
63
68
- # If enabled, this setting will display Inspector's vulnerability scan findings
69
- # as a GitHub actions step summary. See here for an example step summary:
70
- # https://github.com/aws-actions/vulnerability-scan-github-action-for-amazon-inspector/actions/runs/8800085041
71
64
display_vulnerability_findings : " enabled"
72
65
73
- # Set vulnerability thresholds; if the number of vulnerabilities is
74
- # equal to or greater than any of the specified thresholds, this
75
- # action will set the 'vulnerability_threshold_exceeded'
76
- # output flag to 1.
77
66
critical_threshold : 1
78
67
high_threshold : 1
79
68
medium_threshold : 1
80
69
low_threshold : 1
81
70
other_threshold : 1
82
71
83
- # Additional input arguments are available to control scan behavior.
84
- # See 'action.yml' for additional input/output options.
85
72
86
-
87
- # The following steps illustrate how to
88
- # display scan results in the GitHub Actions job terminal.
89
73
- name : Display Inspector vulnerability scan results (JSON)
90
74
run : cat ${{ steps.inspector.outputs.inspector_scan_results }}
91
75
95
79
- name : Display Inspector vulnerability scan results (Markdown)
96
80
run : cat ${{ steps.inspector.outputs.inspector_scan_results_markdown }}
97
81
98
-
99
- # The following steps illustrate how to
100
- # upload scan results as a GitHub actions job artifact
101
82
- name : Upload Scan Results
102
83
uses : actions/upload-artifact@v4
103
84
with :
@@ -106,12 +87,6 @@ jobs:
106
87
${{ steps.inspector.outputs.inspector_scan_results }}
107
88
${{ steps.inspector.outputs.inspector_scan_results_csv }}
108
89
${{ steps.inspector.outputs.inspector_scan_results_markdown }}
109
-
110
- # This step illustrates how to add custom logic if
111
- # the vulnerability threshold is exceeded. This example
112
- # simply prints the 'vulnerability_threshold_exceeded' value
113
- # to the GitHub actions job terminal.
114
- # Replace 'echo' with 'exit' if you want to fail the job.
115
90
- name : On vulnerability threshold exceeded
116
91
run : echo ${{ steps.inspector.outputs.vulnerability_threshold_exceeded }}
117
92
0 commit comments