Skip to content

Commit 02acd54

Browse files
refactor: organize action.yml into logical groups (#148)
- Group inputs by function: Artifact Config, SBOM Generation, Thresholds, Output - Improve artifact_path description with clearer examples per artifact type - Clarify threshold descriptions to explain vulnerability_threshold_exceeded output - Maintain full backward compatibility with existing input names and defaults
1 parent 00f556b commit 02acd54

File tree

1 file changed

+65
-61
lines changed

1 file changed

+65
-61
lines changed

action.yml

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,81 +5,27 @@ branding:
55
icon: cloud
66

77
inputs:
8+
# Artifact Configuration
89
artifact_type:
910
description: 'The artifact you would like to scan with Amazon Inspector. Valid choices are "repository", "container", "binary", or "archive".'
1011
required: True
1112
default: 'repository'
1213

1314
artifact_path:
14-
description: 'The file path to the artifact you would like to scan with Amazon Inspector. File paths are relative to the root project directory. If scanning a container image, you must provide a value that follows the docker pull convention: "NAME[:TAG|@DIGEST]", for example, "alpine:latest", or a path to an image exported as tarball using "docker save".'
15+
description: 'Path to the artifact to scan. For repositories/files: relative path from project root (e.g., "./", "src/"). For containers: image reference that follows the docker pull convention: "NAME[:TAG|@DIGEST]" (e.g., "alpine:latest") or path to saved tarball. For binaries/archives: file path relative to project root.'
1516
required: True
1617
default: './'
1718

18-
display_vulnerability_findings:
19-
description: 'If set to "enabled", the action will display detailed vulnerability findings in the step summary page; see here for an example report: https://github.com/aws-actions/vulnerability-scan-github-action-for-amazon-inspector/actions/runs/8878213714'
20-
required: True
21-
default: "disabled"
22-
23-
output_sbom_path:
24-
description: "The destination file path for the generated SBOM."
25-
required: False
26-
default: './sbom_${{ github.run_id }}.json'
27-
28-
output_inspector_scan_path:
29-
description: "The destination file path for Inspector's vulnerability scan (JSON format)."
30-
required: False
31-
default: 'inspector_scan_${{ github.run_id }}.json'
32-
33-
output_inspector_scan_path_csv:
34-
description: "The destination file path for Inspector's vulnerability scan (CSV format)."
35-
required: False
36-
default: 'inspector_scan_${{ github.run_id }}.csv'
37-
38-
output_inspector_scan_path_markdown:
39-
description: "The destination file path for Inspector's vulnerability scan (markdown format)."
40-
required: False
41-
default: 'inspector_scan_${{ github.run_id }}.md'
42-
43-
output_inspector_dockerfile_scan_path_csv:
44-
description: "The destination file path for Inspector's Dockerfile vulnerability scan (CSV format)."
45-
required: False
46-
default: 'inspector_dockerfile_scan_${{ github.run_id }}.csv'
47-
48-
output_inspector_dockerfile_scan_path_markdown:
49-
description: "The destination file path for Inspector's Dockerfile vulnerability scan (markdown format)."
19+
platform:
20+
description: "Specifies the OS and CPU arch of the container image you wish to scan. Valid inputs are of the form 'os/cpu/variant' for example, 'linux/amd64', 'linux/arm64/v8', etc. If no platform is specified, the system will use the same platform as the host that is performing the scan. This argument only affects container image scans. Requires inspector-sbomgen 1.5.1 or later."
5021
required: False
51-
default: 'inspector_dockerfile_scan_${{ github.run_id }}.md'
5222

23+
# SBOM Generation Configuration
5324
sbomgen_version:
5425
description: "The inspector-sbomgen version you wish to use for SBOM generation. See here for more info: https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html"
5526
required: False
5627
default: "latest"
5728

58-
critical_threshold:
59-
description: "Specifies the number of critical vulnerabilities needed to set the 'vulnerability_threshold_exceeded' flag."
60-
required: False
61-
default: 0
62-
63-
high_threshold:
64-
description: "Specifies the number of high vulnerabilities needed to set the 'vulnerability_threshold_exceeded' flag."
65-
required: False
66-
default: 0
67-
68-
medium_threshold:
69-
description: "Specifies the number of medium vulnerabilities needed to set the 'vulnerability_threshold_exceeded' flag."
70-
required: False
71-
default: 0
72-
73-
low_threshold:
74-
description: "Specifies the number of low vulnerabilities needed to set the 'vulnerability_threshold_exceeded' flag."
75-
required: False
76-
default: 0
77-
78-
other_threshold:
79-
description: "Specifies the number of other vulnerabilities needed to set the 'vulnerability_threshold_exceeded' flag."
80-
required: False
81-
default: 0
82-
8329
scanners:
8430
description: "Specifies the file scanners that you would like inspector-sbomgen to execute. By default, inspector-sbomgen will try to run all file scanners that are applicable to the target artifact. If this argument is set, inspector-sbomgen will only execute the specified file scanners. Provide your input as a single string. Separate each file scanner with a comma. To view a list of available file scanners, execute 'inspector-sbomgen list-scanners'. See here for more info: https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html"
8531
required: False
@@ -106,22 +52,80 @@ inputs:
10652
required: False
10753
default: 600 # 10 minutes
10854

109-
platform:
110-
description: "Specifies the OS and CPU arch of the container image you wish to scan. Valid inputs are of the form 'os/cpu/variant' for example, 'linux/amd64', 'linux/arm64/v8', etc. If no platform is specified, the system will use the same platform as the host that is performing the scan. This argument only affects container image scans. Requires inspector-sbomgen 1.5.1 or later."
55+
# Vulnerability Threshold Configuration
56+
critical_threshold:
57+
description: "Set 'vulnerability_threshold_exceeded' output to true if critical vulnerabilities found >= this number. Set to 0 to ignore critical vulnerabilities."
58+
required: False
59+
default: 0
60+
61+
high_threshold:
62+
description: "Set 'vulnerability_threshold_exceeded' output to true if critical vulnerabilities found >= this number. Set to 0 to ignore high vulnerabilities."
63+
required: False
64+
default: 0
65+
66+
medium_threshold:
67+
description: "Set 'vulnerability_threshold_exceeded' output to true if critical vulnerabilities found >= this number. Set to 0 to ignore medium vulnerabilities."
68+
required: False
69+
default: 0
70+
71+
low_threshold:
72+
description: "Set 'vulnerability_threshold_exceeded' output to true if critical vulnerabilities found >= this number. Set to 0 to ignore low vulnerabilities."
11173
required: False
74+
default: 0
75+
76+
other_threshold:
77+
required: False
78+
description: "Set 'vulnerability_threshold_exceeded' output to true if critical vulnerabilities found >= this number. Set to 0 to ignore other vulnerabilities."
79+
default: 0
11280

11381
threshold_fixable_only:
11482
description: 'If set to true, only count vulnerabilities with a fix towards threshold exceeded condition.'
11583
required: False
11684
default: false
11785
type: boolean
11886

87+
# Output Configuration
88+
display_vulnerability_findings:
89+
description: 'If set to "enabled", the action will display detailed vulnerability findings in the step summary page; see here for an example report: https://github.com/aws-actions/vulnerability-scan-github-action-for-amazon-inspector/actions/runs/8878213714'
90+
required: True
91+
default: "disabled"
92+
11993
show_only_fixable_vulns:
12094
description: "If set to true, this action will show only fixed vulnerabilities in the GitHub Actions step summary page. All vulnerability metadata is still retained in the raw Inspector scan files."
12195
required: False
12296
default: false
12397
type: boolean
12498

99+
output_sbom_path:
100+
description: "The destination file path for the generated SBOM."
101+
required: False
102+
default: './sbom_${{ github.run_id }}.json'
103+
104+
output_inspector_scan_path:
105+
description: "The destination file path for Inspector's vulnerability scan (JSON format)."
106+
required: False
107+
default: 'inspector_scan_${{ github.run_id }}.json'
108+
109+
output_inspector_scan_path_csv:
110+
description: "The destination file path for Inspector's vulnerability scan (CSV format)."
111+
required: False
112+
default: 'inspector_scan_${{ github.run_id }}.csv'
113+
114+
output_inspector_scan_path_markdown:
115+
description: "The destination file path for Inspector's vulnerability scan (markdown format)."
116+
required: False
117+
default: 'inspector_scan_${{ github.run_id }}.md'
118+
119+
output_inspector_dockerfile_scan_path_csv:
120+
description: "The destination file path for Inspector's Dockerfile vulnerability scan (CSV format)."
121+
required: False
122+
default: 'inspector_dockerfile_scan_${{ github.run_id }}.csv'
123+
124+
output_inspector_dockerfile_scan_path_markdown:
125+
description: "The destination file path for Inspector's Dockerfile vulnerability scan (markdown format)."
126+
required: False
127+
default: 'inspector_dockerfile_scan_${{ github.run_id }}.md'
128+
125129
outputs:
126130
artifact_sbom:
127131
description: "The filepath to the artifact's software bill of materials."

0 commit comments

Comments
 (0)