├── .github └── workflows │ ├── docker-hub.yml │ ├── go_tests.yml │ └── semgrep.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── examples ├── .tag-nag.yml ├── codebuild.yml ├── github.yml └── gitlab.yml ├── go.mod ├── go.sum ├── img ├── demo.gif └── tag.png ├── internal ├── cloudformation │ ├── helpers.go │ ├── helpers_test.go │ ├── process.go │ ├── resources.go │ ├── resources_test.go │ ├── scan.go │ ├── spec_loader.go │ ├── spec_loader_test.go │ └── types.go ├── config │ └── config.go ├── inputs │ ├── inputs.go │ ├── inputs_test.go │ ├── loader.go │ └── loader_test.go ├── shared │ ├── helpers.go │ ├── helpers_test.go │ └── types.go └── terraform │ ├── default_tags.go │ ├── default_tags_test.go │ ├── helpers.go │ ├── helpers_test.go │ ├── process.go │ ├── references.go │ ├── resources.go │ ├── resources_test.go │ ├── scan.go │ ├── scan_test.go │ └── types.go ├── main.go ├── main_test.go └── testdata ├── cloudformation ├── tags.json ├── tags.yaml └── tags.yml ├── config ├── blank_config.yml ├── empty_settings.yml ├── full_config.yml ├── invalid_structure.yml ├── invalid_syntax.yml ├── missing_tags.yml ├── tag_array.yml ├── tag_keys.yml ├── tag_values.yml └── yaml_extension.yaml └── terraform ├── example_repo ├── locals.tf ├── main.tf ├── provider.tf └── variables.tf ├── functions.tf ├── ignore.tf ├── ignore_all.tf ├── no_tags.tf ├── provider.tf ├── referenced_tags.tf ├── referenced_values.tf └── tags.tf /.github/workflows/docker-hub.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/.github/workflows/docker-hub.yml -------------------------------------------------------------------------------- /.github/workflows/go_tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/.github/workflows/go_tests.yml -------------------------------------------------------------------------------- /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/.github/workflows/semgrep.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/.gitignore -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/README.md -------------------------------------------------------------------------------- /examples/.tag-nag.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/examples/.tag-nag.yml -------------------------------------------------------------------------------- /examples/codebuild.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/examples/codebuild.yml -------------------------------------------------------------------------------- /examples/github.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/examples/github.yml -------------------------------------------------------------------------------- /examples/gitlab.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/examples/gitlab.yml -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/go.sum -------------------------------------------------------------------------------- /img/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/img/demo.gif -------------------------------------------------------------------------------- /img/tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/img/tag.png -------------------------------------------------------------------------------- /internal/cloudformation/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/helpers.go -------------------------------------------------------------------------------- /internal/cloudformation/helpers_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/helpers_test.go -------------------------------------------------------------------------------- /internal/cloudformation/process.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/process.go -------------------------------------------------------------------------------- /internal/cloudformation/resources.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/resources.go -------------------------------------------------------------------------------- /internal/cloudformation/resources_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/resources_test.go -------------------------------------------------------------------------------- /internal/cloudformation/scan.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/scan.go -------------------------------------------------------------------------------- /internal/cloudformation/spec_loader.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/spec_loader.go -------------------------------------------------------------------------------- /internal/cloudformation/spec_loader_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/spec_loader_test.go -------------------------------------------------------------------------------- /internal/cloudformation/types.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/cloudformation/types.go -------------------------------------------------------------------------------- /internal/config/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/config/config.go -------------------------------------------------------------------------------- /internal/inputs/inputs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/inputs/inputs.go -------------------------------------------------------------------------------- /internal/inputs/inputs_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/inputs/inputs_test.go -------------------------------------------------------------------------------- /internal/inputs/loader.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/inputs/loader.go -------------------------------------------------------------------------------- /internal/inputs/loader_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/inputs/loader_test.go -------------------------------------------------------------------------------- /internal/shared/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/shared/helpers.go -------------------------------------------------------------------------------- /internal/shared/helpers_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/shared/helpers_test.go -------------------------------------------------------------------------------- /internal/shared/types.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/shared/types.go -------------------------------------------------------------------------------- /internal/terraform/default_tags.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/default_tags.go -------------------------------------------------------------------------------- /internal/terraform/default_tags_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/default_tags_test.go -------------------------------------------------------------------------------- /internal/terraform/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/helpers.go -------------------------------------------------------------------------------- /internal/terraform/helpers_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/helpers_test.go -------------------------------------------------------------------------------- /internal/terraform/process.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/process.go -------------------------------------------------------------------------------- /internal/terraform/references.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/references.go -------------------------------------------------------------------------------- /internal/terraform/resources.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/resources.go -------------------------------------------------------------------------------- /internal/terraform/resources_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/resources_test.go -------------------------------------------------------------------------------- /internal/terraform/scan.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/scan.go -------------------------------------------------------------------------------- /internal/terraform/scan_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/scan_test.go -------------------------------------------------------------------------------- /internal/terraform/types.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/internal/terraform/types.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/main.go -------------------------------------------------------------------------------- /main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/main_test.go -------------------------------------------------------------------------------- /testdata/cloudformation/tags.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/cloudformation/tags.json -------------------------------------------------------------------------------- /testdata/cloudformation/tags.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/cloudformation/tags.yaml -------------------------------------------------------------------------------- /testdata/cloudformation/tags.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/cloudformation/tags.yml -------------------------------------------------------------------------------- /testdata/config/blank_config.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testdata/config/empty_settings.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - key: Owner 3 | 4 | settings: 5 | 6 | skip: -------------------------------------------------------------------------------- /testdata/config/full_config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/config/full_config.yml -------------------------------------------------------------------------------- /testdata/config/invalid_structure.yml: -------------------------------------------------------------------------------- 1 | tags: "Owner,Project" 2 | -------------------------------------------------------------------------------- /testdata/config/invalid_syntax.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - key: Owner 3 | values: [Dev, Test 4 | -------------------------------------------------------------------------------- /testdata/config/missing_tags.yml: -------------------------------------------------------------------------------- 1 | settings: 2 | dry_run: true 3 | 4 | skip: 5 | - "*.tmp" -------------------------------------------------------------------------------- /testdata/config/tag_array.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - key: Owner 3 | values: "not-an-array" -------------------------------------------------------------------------------- /testdata/config/tag_keys.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/config/tag_keys.yml -------------------------------------------------------------------------------- /testdata/config/tag_values.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/config/tag_values.yml -------------------------------------------------------------------------------- /testdata/config/yaml_extension.yaml: -------------------------------------------------------------------------------- 1 | tags: 2 | - key: Owner -------------------------------------------------------------------------------- /testdata/terraform/example_repo/locals.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/example_repo/locals.tf -------------------------------------------------------------------------------- /testdata/terraform/example_repo/main.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/example_repo/main.tf -------------------------------------------------------------------------------- /testdata/terraform/example_repo/provider.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/example_repo/provider.tf -------------------------------------------------------------------------------- /testdata/terraform/example_repo/variables.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/example_repo/variables.tf -------------------------------------------------------------------------------- /testdata/terraform/functions.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/functions.tf -------------------------------------------------------------------------------- /testdata/terraform/ignore.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/ignore.tf -------------------------------------------------------------------------------- /testdata/terraform/ignore_all.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/ignore_all.tf -------------------------------------------------------------------------------- /testdata/terraform/no_tags.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/no_tags.tf -------------------------------------------------------------------------------- /testdata/terraform/provider.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/provider.tf -------------------------------------------------------------------------------- /testdata/terraform/referenced_tags.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/referenced_tags.tf -------------------------------------------------------------------------------- /testdata/terraform/referenced_values.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/referenced_values.tf -------------------------------------------------------------------------------- /testdata/terraform/tags.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakebark/tag-nag/HEAD/testdata/terraform/tags.tf --------------------------------------------------------------------------------