You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-35Lines changed: 49 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,30 @@
2
2
3
3
## Description
4
4
5
-
This Github Action scans Infrastructure as Code (IaC) files for security risks. When a scan finds violations, this action will write the report in SARIF format to the workspace.
6
-
Currently only terraform plan files are supported for scanning.
5
+
This Github action identifies insecure configurations in Infrastructure as Code (IaC) files for Google Cloud resources.
6
+
This action requires Terraform plan files in JSON format for scanning.
7
+
8
+
Use this action to detect and remediate issues in IaC files for Google Cloud before you deploy the resources.
9
+
10
+
This action lets you:
11
+
- Scan IaC template files (such as Terraform plan files).
12
+
- Display issues with their severity as a SARIF Report in the GitHub Workspace after a scan completes.
13
+
- Define severity-based failure criteria for passing or failing the build.
14
+
15
+
> [!NOTE]
16
+
> 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.
7
17
8
18
## Prerequisites
9
19
10
-
- This action requires a service account which have **Security Posture
11
-
Shift-Left Validator or Security Posture Admin**Role on the Google Cloud
12
-
organization to which IaC resources belong's. See
13
-
[Authorization](#authorization) for more information.
20
+
- This action requires a Google Cloud service account which has the
21
+
**Security Posture Shift-Left Validator**role or the **Security
22
+
Posture Admin** role on the Google Cloud organization that includes
23
+
the IaC resources. For more information, see [Authorization](#authorization).
14
24
15
25
- This action runs using Node 20. If you are using self-hosted GitHub Actions
16
26
runners, you must use a [runner
17
27
version](https://github.com/actions/virtual-environments) that supports this
18
-
version or newer.
28
+
version or later.
19
29
20
30
## Usage
21
31
@@ -54,34 +64,38 @@ jobs:
54
64
55
65
## Inputs
56
66
57
-
- `organization_id`: (Required) ID of the Google Cloud organization which owns
58
-
resources under modification.
67
+
- `organization_id`: (Required) The Google Cloud organization ID for the
68
+
organization which includes the resources that you want to modify.
59
69
60
-
- `scan_file_ref`: (Required) Absolute file path including file name where the
61
-
IaC file is stored in the workspace. Examples: 'tf_plan.json',
62
-
'artifacts/tf_plan.json'.
70
+
- `scan_file_ref`: (Required) The absolute file path, including the file name,
71
+
for the IaC file in the workspace. For example: './tf_plan.json', or
72
+
'./artifacts/tf_plan.json'.
63
73
64
-
- `iac_type`: (Required) IaC template type. Currently only Terraform is
74
+
- `iac_type`: (Required) The IaC template type. Currently only Terraform is
status. It contains threshold for count of critical, high, medium, and low
79
-
severity issues and `AND/OR` based aggregator to evaluate the criteria. The
80
-
threshold for each severity is evaluated against count of issues with
81
-
similar severity in IaC scan result and then severity level evaluations are
82
-
aggregated using `AND\OR` to arrive at failure_criteria value.
88
+
- `failure_criteria`: (Optional) The failure criteria that determines the
89
+
workflow build status. You can set a threshold for the number of critical,
90
+
high, medium, and low severity issues and use an aggregator (either `and`
91
+
or `or`) to evaluate the criteria. To determine whether a build has failed,
92
+
the threshold for each severity is evaluated against the count of issues
93
+
with that severity in the IaC scan results and then severity level evaluations
94
+
are aggregated using `AND` or `OR` to arrive at `failure_criteria` value.
83
95
84
-
If `failure_criteria` evaluates to true, workflow is marked as `FAILED` otherwise workflow is marked as `SUCCESS`. Default: "Critical:1, High:1, Medium:1, Low:1, Operator:or".
96
+
If the `failure_criteria` evaluates to `true`, the workflow is marked as
97
+
`FAILED`. Otherwise, the workflow is marked as `SUCCESS`. The default is
0 commit comments