I am struggling to use an environment variable into the arguments section of pre-commit hooks config
following is an example spinet to show what I am trying to do
- repo: https://github.com/returntocorp/semgrep
rev: "v0.1.2"
hooks:
- id: semgrep
name: semgrep my_custom_rule
args:
[
"--config",
"https://PRIVATE-TOKEN:{$TOKEN}@gitlab.com/api/proj/packages/test-rule.yml",
"--error",
]
I have already set the value of TOKEN into environment variable. But still in processing the URL is taken as https://PRIVATE-TOKEN:{$TOKEN}@gitlab.com/api/proj/packages/test-rule.yml instead of with actual token value. I want to avoid putting actual token into config for security reasons.