Skip to content

[Hotfix] Rename resources from checkov from tfsec and remove empty step #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@ jobs:
id: validate
run: ${{ inputs.tf_command_validate }}
working-directory: ${{ inputs.command_wrk_dir }}

- name: Terraform plan
id: plan
run: ${{ inputs.tf_command_plan }}
working-directory: ${{ inputs.command_wrk_dir }}

jobs_checkov:
jobs_tfsec:
needs: jobs_terraform
name: Checkov workflow
if: github.event_name == 'pull_request'
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# terraform-default-workflow
Terraform workflow to be reused in your project, with commom Terraform steps and static analysis with [checkov](https://github.com/bridgecrewio/checkov).
Terraform workflow to be reused in your project, with commom Terraform steps and static analysis with [tfsec](https://github.com/aquasecurity/tfsec).

## Actions
* https://github.com/marketplace/actions/hashicorp-setup-terraform
Expand All @@ -19,10 +19,10 @@ A job triggered at all `push` events with the steps:
* Run Terraform init
* Run Terraform validate

### `jobs_checkov`
### `jobs_tfsec`
A job triggered at all `pull_request` events with the steps:
* checkout the code
* setup checkcov
* setup tfsec
* run checkcov static analysis
* If a vulnerability is found, create a comment in PR

Expand Down Expand Up @@ -51,7 +51,7 @@ Calling the workflow with all the default inputs:

jobs:
my-terraform-workflow:
uses: edsoncelio/terraform-default-workflow/.github/workflows/terraform.yml@v1
uses: edsoncelio/terraform-default-workflow/.github/workflows/terraform.yml@v2
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -61,7 +61,7 @@ And with customized inputs:

jobs:
my-terraform-workflow:
uses: edsoncelio/terraform-default-workflow/.github/workflows/terraform.yml@v1
uses: edsoncelio/terraform-default-workflow/.github/workflows/terraform.yml@v2
with:
command_wrk_dir: './infra-code-dir'
secrets:
Expand Down