mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: add __GIT_WORKING_DIR__ to tfsec (#255)
This commit is contained in:
parent
c0b9b3c562
commit
2973f85f3b
2 changed files with 9 additions and 1 deletions
|
|
@ -372,7 +372,14 @@ Example:
|
||||||
--no-color
|
--no-color
|
||||||
-e aws-s3-enable-bucket-logging,aws-s3-specify-public-access-block
|
-e aws-s3-enable-bucket-logging,aws-s3-specify-public-access-block
|
||||||
```
|
```
|
||||||
|
4. Like terraform_tflint, `__GIT_WORKING_DIR__` can be used when specifying files relative to the git working directory:
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- id: terraform_tfsec
|
||||||
|
args: [--args=--config-file=__GIT_WORKING_DIR__/.tfsec.json]
|
||||||
|
```
|
||||||
|
|
||||||
### terraform_validate
|
### terraform_validate
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,8 @@ parse_cmdline_() {
|
||||||
case $argv in
|
case $argv in
|
||||||
-a | --args)
|
-a | --args)
|
||||||
shift
|
shift
|
||||||
ARGS+=("$1")
|
expanded_arg="${1//__GIT_WORKING_DIR__/$PWD}"
|
||||||
|
ARGS+=("$expanded_arg")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue