[enhancement] Allow setting DETECT_SECRETS_SECURITY_TEAM via a command-line argument #436
Labels
enhancement
The issue is related to improving a certain aspect of the project.
triaged
The issue has been reviewed but has not been solved yet.
In #283, @0atman added the DETECT_SECRETS_SECURITY_TEAM environment variable. Trouble is, it's hard to set environment variables via
pre-commit
(andpre-commit
is one of the officially suggested ways of runningdetect-secrets
, per the README). As far as I've been able to find,pre-commit
has no support at all for configuring environment variables in pre-commit.yaml, and you have to resort to a hack like overriding the hook'sentry
inpre-commit.yaml
to be something likewhich is a bit ugly and more importantly isn't a trivial workaround to come up with - you need to have at least a little bit of knowledge of how
pre-commit
works to even know thatentry:
is a thing and that it's possible to override it, and then you need to look into this repo to discover that the default entry is thedetect-secrets-hook
executable, and you need to have sufficient unix knowledge to know that you can useenv
to run another program with added environment variables.It'd probably be easier for people to use this feature if there were also a
--security-team
command-line argument that could be used instead, rather than setting an environment variable being the only way.The text was updated successfully, but these errors were encountered: