Skip to content

Commit 56a2ba4

Browse files
authored
Update deps and switch to actions-gen-readme for autodoc (#34)
1 parent f8c2a85 commit 56a2ba4

File tree

4 files changed

+298
-256
lines changed

4 files changed

+298
-256
lines changed

README.md

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,42 +82,72 @@ jobs:
8282
8383
## Inputs
8484
85+
<!-- BEGIN_AUTOGEN_INPUTS -->
8586
86-
* `organization_id`: (Required) The Google Cloud organization ID for the organization which includes the resources that you want to modify.
87+
- <a name="organization_id"></a><a href="#user-content-organization_id"><code>organization_id</code></a>: _(Required)_ Google Cloud organization ID for the organization which includes the
88+
resources that you want to modify.
8789
90+
- <a name="scan_file_ref"></a><a href="#user-content-scan_file_ref"><code>scan_file_ref</code></a>: _(Required)_ Path to a file, relative to the local workspace, for the IaC file to scan.
91+
For example:
8892
89-
* `scan_file_ref`: (Required) The absolute file path, including the file name, for the IaC file in the workspace. For example: './tf_plan.json', or './artifacts/tf_plan.json'.
93+
./tf_plan.json
9094
95+
or
9196
92-
* `iac_type`: (Required) The IaC template type. Currently only Terraform is supported.
97+
./artifacts/tf_plan.json
9398
99+
- <a name="iac_type"></a><a href="#user-content-iac_type"><code>iac_type</code></a>: _(Required, default: `terraform`)_ IaC template type. Currently only `terraform` is supported.
94100

95-
* `scan_time_out`: (Optional) The maximum time before the action stops. The time must be between '1m' and '10m'. The default is `1m`.
101+
- <a name="scan_timeout"></a><a href="#user-content-scan_timeout"><code>scan_timeout</code></a>: _(Optional, default: `1m`)_ Maximum time before the scanning stops. This is specified as a time
102+
duration value, such as "1m" or "5s". The value must be between "1m" and
103+
"10m".
96104

105+
- <a name="ignore_violations"></a><a href="#user-content-ignore_violations"><code>ignore_violations</code></a>: _(Optional)_ Whether violations found in IaC file should be ignored when determining
106+
the build status. This input does not apply to violations that are related
107+
to generating SARIF reports and determining the `iac_scan_result`.
97108

98-
* `ignore_violations`: (Optional) Whether violations found in IaC file should be ignored when determining the build status. This input doesn’t apply to violations that are related to generating SARIF reports and determining the `iac_scan_result`. The default is `false`.
109+
- <a name="failure_criteria"></a><a href="#user-content-failure_criteria"><code>failure_criteria</code></a>: _(Optional, default: `Critical:1, High:1, Medium:1, Low:1, Operator:OR`)_ Ffailure criteria that determines the workflow build status. You can set a
110+
threshold for the number of critical, high, medium, and low severity
111+
issues and use an aggregator (either `and` or `or`) to evaluate the
112+
criteria.
99113

114+
To determine whether a build has failed, the threshold for each severity
115+
is evaluated against the count of issues with that severity in the IaC
116+
scan results and then severity level evaluations are aggregated using
117+
`AND` or `OR` to arrive at `failure_criteria` value.
100118

101-
* `failure_criteria`: (Optional) The failure criteria that determines the workflow build status. You can set a threshold for the number of critical, high, medium, and low severity issues and use an aggregator (either `and` or `or`) to evaluate the criteria. To determine whether a build has failed, the threshold for each severity is evaluated against the count of issues with that severity in the IaC scan results and then severity level evaluations are aggregated using `AND` or `OR` to arrive at `failure_criteria` value.
119+
If the `failure_criteria` evaluates to `true`, the workflow is marked as
120+
`FAILED`. Otherwise, the workflow is marked as `SUCCESS`.
102121

122+
- <a name="fail_silently"></a><a href="#user-content-fail_silently"><code>fail_silently</code></a>: _(Optional)_ If set to true, the workflow will not fail in case of any internal error
123+
including invalid credentials and plugin dependency failure.
103124

104-
If the `failure_criteria` evaluates to `true`, the workflow is marked as `FAILED`. Otherwise, the workflow is marked as `SUCCESS`. The default is "Critical:1, High:1, Medium:1, Low:1, Operator:or".
125+
Note: This GitHub Action will always fail in case of any input validation
126+
errors.
105127

106128

107-
* `fail_silently`: (Optional) Whether the workflow passes when an internal error (such as an invalid credential or plugin dependency failure) occurs. Note: The action always fails when the input is invalid. The default is `false`.
129+
<!-- END_AUTOGEN_INPUTS -->
108130

109131

110132
## Outputs
111133

134+
<!-- BEGIN_AUTOGEN_OUTPUTS -->
112135

113-
* `iac_scan_result`: The result of the security scan. One of:
114-
1. `passed` - No violations were found or the `failure_criteria` was not satisfied.
115-
2. `failed` - The `failure_criteria` was satisfied.
116-
3. `error` - The action ran into an execution error, generally due to a misconfiguration or invalid credentials.
136+
- `iac_scan_result`: The result of the security scan. One of:
117137

138+
- `passed`: No violations were found or the `failure_criteria` was not
139+
satisfied.
118140

119-
* `iac_scan_result_sarif_path`: The path for the SARIF report file. This file is only available when violations are found in the scan file.
141+
- `failed`: The `failure_criteria` was satisfied.
120142

143+
- `error`: The action ran into an execution error, generally due to a
144+
misconfiguration or invalid credentials.
145+
146+
- `iac_scan_result_sarif_path`: Path for the SARIF report file. This file is only available when
147+
violations are found in the scan file.
148+
149+
150+
<!-- END_AUTOGEN_OUTPUTS -->
121151

122152
## Authorization
123153

action.yml

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,61 +20,88 @@ description: |-
2020
inputs:
2121
organization_id:
2222
description: |-
23-
The Google Cloud organization ID for the organization which includes
24-
the resources that you want to modify.
23+
Google Cloud organization ID for the organization which includes the
24+
resources that you want to modify.
2525
required: true
26+
2627
scan_file_ref:
2728
description: |-
28-
The absolute file path, including the file name, for the IaC file in the
29-
workspace. For example: './tf_plan.json', or './artifacts/tf_plan.json'.
29+
Path to a file, relative to the local workspace, for the IaC file to scan.
30+
For example:
31+
32+
./tf_plan.json
33+
34+
or
35+
36+
./artifacts/tf_plan.json
3037
required: true
38+
3139
iac_type:
3240
description: |-
33-
The IaC template type. Currently only Terraform is supported.
41+
IaC template type. Currently only `terraform` is supported.
42+
default: 'terraform'
3443
required: true
44+
3545
scan_timeout:
3646
description: |-
37-
The maximum time before the action stops. The time must be between '1m' and '10m'.
47+
Maximum time before the scanning stops. This is specified as a time
48+
duration value, such as "1m" or "5s". The value must be between "1m" and
49+
"10m".
3850
default: '1m'
3951
required: false
52+
4053
ignore_violations:
4154
description: |-
42-
Whether violations found in IaC file should be ignored when determining
43-
the build status. This input doesn’t apply to violations that are
44-
related to generating SARIF reports and determining the `iac_scan_result`.
55+
Whether violations found in IaC file should be ignored when determining
56+
the build status. This input does not apply to violations that are related
57+
to generating SARIF reports and determining the `iac_scan_result`.
4558
default: false
4659
required: false
60+
4761
failure_criteria:
4862
description: |-
49-
The failure criteria that determines the workflow build status. You can set
50-
a threshold for the number of critical, high, medium, and low severity
51-
issues and use an aggregator (either `and` or `or`) to evaluate the criteria.
52-
To determine whether a build has failed, the threshold for each severity is
53-
evaluated against the count of issues with that severity in the IaC scan
54-
results and then severity level evaluations are aggregated using `AND` or `OR`
55-
to arrive at `failure_criteria` value.
56-
If the `failure_criteria` evaluates to `true`, the workflow is marked as `FAILED`.
57-
Otherwise, the workflow is marked as `SUCCESS`.
63+
Ffailure criteria that determines the workflow build status. You can set a
64+
threshold for the number of critical, high, medium, and low severity
65+
issues and use an aggregator (either `and` or `or`) to evaluate the
66+
criteria.
67+
68+
To determine whether a build has failed, the threshold for each severity
69+
is evaluated against the count of issues with that severity in the IaC
70+
scan results and then severity level evaluations are aggregated using
71+
`AND` or `OR` to arrive at `failure_criteria` value.
72+
73+
If the `failure_criteria` evaluates to `true`, the workflow is marked as
74+
`FAILED`. Otherwise, the workflow is marked as `SUCCESS`.
5875
default: 'Critical:1, High:1, Medium:1, Low:1, Operator:OR'
5976
required: false
77+
6078
fail_silently:
6179
description: |-
62-
If set to true, workflow will not fail in case of any internal error including
63-
invalid credentials and plugin dependency failure.
64-
Note: Action will always fail in case of any input validationfailure.
80+
If set to true, the workflow will not fail in case of any internal error
81+
including invalid credentials and plugin dependency failure.
82+
83+
Note: This GitHub Action will always fail in case of any input validation
84+
errors.
6585
default: false
6686
required: false
6787

6888
outputs:
6989
iac_scan_result:
7090
description: |-
7191
The result of the security scan. One of:
72-
`passed` - No violations were found or the `failure_criteria` was not satisfied.
73-
`failed` - The `failure_criteria` was satisfied.
74-
`error` - The action ran into an execution error, generally due to a misconfiguration or invalid credentials.
92+
93+
- `passed`: No violations were found or the `failure_criteria` was not
94+
satisfied.
95+
96+
- `failed`: The `failure_criteria` was satisfied.
97+
98+
- `error`: The action ran into an execution error, generally due to a
99+
misconfiguration or invalid credentials.
100+
75101
iac_scan_result_sarif_path:
76102
description: |-
77-
The path for the SARIF report file. This file is only available when violations are found in the scan file.
103+
Path for the SARIF report file. This file is only available when
104+
violations are found in the scan file.
78105
79106
runs:
80107
using: 'node20'

0 commit comments

Comments
 (0)