Skip to content

Commit 42919f3

Browse files
authored
docs: Document that __GIT_WORKING_DIR__ available for terraform_trivy (#654)
1 parent d9addbe commit 42919f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,14 @@ To replicate functionality in `terraform_docs` hook:
883883
- --args=--skip-dirs="**/.terraform"
884884
```
885885

886+
4. When you have multiple directories and want to run `trivy` in all of them and share a single config file - use the `__GIT_WORKING_DIR__` placeholder. It will be replaced by `terraform_trivy` hooks with Git working directory (repo root) at run time. For example:
887+
888+
```yaml
889+
- id: terraform_trivy
890+
args:
891+
- --args=--ignorefile=__GIT_WORKING_DIR__/.trivyignore
892+
```
893+
886894
### terraform_validate
887895

888896
> [!IMPORTANT]

0 commit comments

Comments
 (0)