From 9fb78aee49297769f6d75c6f5712a8a49c711e29 Mon Sep 17 00:00:00 2001 From: Andrii Riabchenko Date: Sun, 21 Jan 2024 12:42:13 +0200 Subject: [PATCH] new file: projects/aquasecurity.github.io/tfsec/package.yml --- .../aquasecurity.github.io/tfsec/package.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 projects/aquasecurity.github.io/tfsec/package.yml diff --git a/projects/aquasecurity.github.io/tfsec/package.yml b/projects/aquasecurity.github.io/tfsec/package.yml new file mode 100644 index 00000000..c02b4017 --- /dev/null +++ b/projects/aquasecurity.github.io/tfsec/package.yml @@ -0,0 +1,38 @@ +distributable: + url: git+https://github.com/aquasecurity/tfsec.git + ref: ${{version.tag}} + +versions: + github: aquasecurity/tfsec + +build: + dependencies: + go.dev: '>=1.19' + script: + - scripts/install.sh v{{version}} + - mkdir -p {{prefix}}/bin + - install tfsec {{prefix}}/bin/ + +provides: + - bin/tfsec + +test: + - mkdir -p good bad + - run: | + cat < good/main.tf + resource "aws_alb_listener" "my-alb-listener" { + port = "443" + protocol = "HTTPS" + } + EOF + - run: | + cat < bad/main.tf + resource "aws_security_group_rule" "world" { + description = "A security group triggering tfsec AWS006." + type = "ingress" + cidr_blocks = ["0.0.0.0/0"] + } + EOF + - tfsec good | grep 'No problems' + - tfsec bad || true # tfsec returns 1 on problems detected, it's ok + - tfsec --version | grep {{version}} \ No newline at end of file