Skip to content

Commit

Permalink
feat: add CI on merge on master (triat#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
triat authored Jul 29, 2020
1 parent 67fc475 commit f79f779
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:

jobs:
shellcheck:
name: Shellcheck
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
- name: ShellCheck
uses: ludeeus/[email protected]
21 changes: 21 additions & 0 deletions .github/workflows/MasterCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Master CI
on:
push:
branches: [ master ]

jobs:
CI:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ShellCheck
uses: ludeeus/[email protected]
- name: Terraform security scan
uses: triat/terraform-security-scan@master
with:
tfsec_actions_comment: false
tfsec_actions_working_dir: "test/"
tfsec_exclude: "AWS018,AWS006,AWS004,AWS003,AZU003"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The action requires the https://github.com/actions/checkout before to download t

* `tfsec_actions_comment` - (Optional) Whether or not to comment on GitHub pull requests. Defaults to `true`.
* `tfsec_actions_working_dir` - (Optional) Terraform working directory location. Defaults to `'.'`.
* `tfsec_exclude` - (Optional) Provide checks via , without space to exclude from run. No default
* `tfsec_exclude` - (Optional) Provide checks via `,` without space to exclude from run. No default
* `tfsec_version` - (Optional) Specify the version of tfsec to install. Defaults to the latest

## Outputs
Expand Down
28 changes: 28 additions & 0 deletions test/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
resource "aws_security_group_rule" "my-rule" {
type = "ingress"
cidr_blocks = ["0.0.0.0/0"]
}

resource "aws_alb_listener" "my-valid-alb-listener"{
port = "80"
protocol = "HTTPS"
}

resource "aws_alb_listener" "my-wrong-alb-listener"{
port = "80"
protocol = "HTTP"
}

resource "aws_db_security_group" "my-group" {

}

variable "enableEncryption" {
default = false
}

resource "azurerm_managed_disk" "source" {
encryption_settings {
enabled = var.enableEncryption
}
}

0 comments on commit f79f779

Please sign in to comment.