Skip to content

Commit 1874879

Browse files
Update README.md (#38)
<!-- Thank you for proposing a pull request! Please note that SOME TESTS WILL LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from forks. Someone from the team will review your Pull Request and respond. Please describe your change and any implementation details below. --> --------- Signed-off-by: pankhurisaxena28 <[email protected]> Co-authored-by: Seth Vargo <[email protected]>
1 parent a4faae5 commit 1874879

File tree

2 files changed

+34
-27
lines changed

2 files changed

+34
-27
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ Cloud product, please contact [Google Cloud
2121
support](https://cloud.google.com/support).**
2222

2323
> [!IMPORTANT]
24-
> This is a Security Command Center Premium tier offering for subscription customers only. You must activate the Security Command Center Premium tier in the Google Cloud organization to use this feature.
25-
>
26-
> This offering is covered by the Pre-GA Offerings Terms of the Google Cloud Terms of Service.
24+
> This action requires the Security Command Center Premium tier or Enterprise
25+
> tier. In the Premium tier, you must be a subscription customer to use this
26+
> action. You must activate Security Command Center at the organization level to
27+
> use this feature.
2728
2829
> [!CAUTION]
2930
> Don’t enter any sensitive information such as passwords and other personal identifiable information in the Terraform plan files.
@@ -136,12 +137,12 @@ jobs:
136137
- `iac_scan_result`: The result of the security scan. One of:
137138

138139
- `passed`: No violations were found or the `failure_criteria` was not
139-
satisfied.
140+
satisfied.
140141

141142
- `failed`: The `failure_criteria` was satisfied.
142143

143144
- `error`: The action ran into an execution error, generally due to a
144-
misconfiguration or invalid credentials.
145+
misconfiguration or invalid credentials.
145146

146147
- `iac_scan_result_sarif_path`: Path for the SARIF report file. This file is only available when
147148
violations are found in the scan file.
@@ -159,22 +160,22 @@ to authenticate the action. You can use [Workload Identity Federation][wif] or
159160

160161
```yaml
161162
jobs:
162-
job_id:
163-
permissions:
164-
contents: 'read'
165-
id-token: 'write'
163+
job_id:
164+
permissions:
165+
contents: 'read'
166+
id-token: 'write'
166167
167168
168-
steps:
169-
- id: 'auth'
170-
uses: 'google-github-actions/auth@v2'
171-
with:
172-
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
173-
service_account: '[email protected]'
169+
steps:
170+
- id: 'auth'
171+
uses: 'google-github-actions/auth@v2'
172+
with:
173+
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
174+
service_account: '[email protected]'
174175
175176
176-
- id: 'analyze-code-security-scc'
177-
uses: 'google-github-actions/analyze-code-security-scc@v0'
177+
- id: 'analyze-code-security-scc'
178+
uses: 'google-github-actions/analyze-code-security-scc@v0'
178179
```
179180

180181

action.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ inputs:
2121
organization_id:
2222
description: |-
2323
Google Cloud organization ID for the organization which includes the
24-
resources that you want to modify.
24+
resources that you want to modify. For example, '1234'.
2525
required: true
2626

2727
scan_file_ref:
@@ -38,37 +38,43 @@ inputs:
3838

3939
iac_type:
4040
description: |-
41-
IaC template type. Currently only `terraform` is supported.
41+
The IaC template type. Currently only Terraform is supported.
4242
default: 'terraform'
4343
required: true
4444

4545
scan_timeout:
4646
description: |-
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".
50-
default: '1m'
47+
The maximum time before the scanning stops. The value must be between "1m"
48+
and `10m`.
49+
default: '3m'
5150
required: false
5251

5352
ignore_violations:
5453
description: |-
5554
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
55+
the build status. This input doesn't apply to violations that are related
5756
to generating SARIF reports and determining the `iac_scan_result`.
5857
default: false
5958
required: false
6059

6160
failure_criteria:
6261
description: |-
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
62+
The failure criteria that determines the workflow build status. You can
63+
set a threshold for the number of critical, high, medium, and low severity
6564
issues and use an aggregator (either `and` or `or`) to evaluate the
6665
criteria.
6766
6867
To determine whether a build has failed, the threshold for each severity
6968
is evaluated against the count of issues with that severity in the IaC
7069
scan results and then severity level evaluations are aggregated using
71-
`AND` or `OR` to arrive at `failure_criteria` value.
70+
`AND` or `OR` to arrive at `failure_criteria` value. You must include an
71+
aggregator in the string. The aggregator value is case-sensitive.
72+
73+
For example, if you set the failure criteria to `HIGH:1,LOW:1,OPERATOR:OR`,
74+
the workflow fails if there is 1 or more HIGH severity findings or 1 or
75+
more LOW severity findings. If you set the failure criteria to
76+
`HIGH:1,LOW:1,OPERATOR:AND`, the workflow fails if there is 1 or more HIGH
77+
severity findings and 1 or more LOW severity findings.
7278
7379
If the `failure_criteria` evaluates to `true`, the workflow is marked as
7480
`FAILED`. Otherwise, the workflow is marked as `SUCCESS`.

0 commit comments

Comments
 (0)