Skip to content

Commit

Permalink
Test tfsec
Browse files Browse the repository at this point in the history
  • Loading branch information
prakash-moj committed Dec 8, 2023
1 parent 0ddd8de commit 3a656ed
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 55 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: static-anlysis

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:

jobs:
static-analysis:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Analysis
uses: ministryofjustice/github-actions/terraform-static-analysis@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scan_type: changed
tfsec_exclude: AWS095
tflint_config: $(realpath .tflint.hcl)
tfsec_output_file: tfsec.sarif
tfsec_output_format: sarif
checkov_external_modules: true
checkov_exclude: CKV_TF_1,CKV_AWS_136,CKV_AWS_51,CKV_GIT_4
tflint_exclude: terraform_standard_module_structure
21 changes: 0 additions & 21 deletions deployments/templates/deployment.yml

This file was deleted.

23 changes: 0 additions & 23 deletions deployments/templates/ingress.yml

This file was deleted.

11 changes: 0 additions & 11 deletions deployments/templates/service.yml

This file was deleted.

5 changes: 5 additions & 0 deletions infra/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "random_string" "random" {
length = 16
special = true
override_special = "@£?"
}
5 changes: 5 additions & 0 deletions infra/module/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "random_string" "random" {
length = 16
special = true
override_special = "/@£?)"
}
3 changes: 3 additions & 0 deletions infra/module/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "randomstring" {
value = random_string.random.vaule
}
14 changes: 14 additions & 0 deletions infra/module/rds.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resource "aws_db_parameter_group" "default" {
name = "rds-pg"
family = "mysql5.6"

parameter {
name = "character_set_server"
value = "utf8"
}

parameter {
name = "character_set_client"
value = "utf8"
}
}
1 change: 1 addition & 0 deletions infra/variable.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable environment {}

0 comments on commit 3a656ed

Please sign in to comment.