Describe the bug
detect-secrets tool does not detect secrets that are base64 encoded
To Reproduce
Steps to reproduce the behavior:
- create a simple module
def main():
print("Hello world")
if __name__ == "__main__":
main()
- create a json file that contains cloud object storage secrets:
{"my-bucket-name": {"access-key-id": "my-access-key", "secret-access-key": "my-secret"} }
- encode it with base64:
base64 -i /path/to/json/file
- Assign the encoded credentials to a variable
def main():
s = "e215LWJ1Y2tldC1uYW1lOiB7YWNjZXNzLWtleS1pZDogbXktYWNjZXNzLWtleSwgc2VjcmV0LWFjY2Vzcy1rZXk6IG15LXNlY3JldH0gfQo="
print(s)
if __name__ == "__main__":
main()
- add to the repo and commit
git add hello.py
git commit -am "message"
Expected behavior
I expected that detect-secrets tool would detect the hardcoded base64 secret
Describe the bug
detect-secrets tool does not detect secrets that are base64 encoded
To Reproduce
Steps to reproduce the behavior:
{"my-bucket-name": {"access-key-id": "my-access-key", "secret-access-key": "my-secret"} }git add hello.py git commit -am "message"Expected behavior
I expected that detect-secrets tool would detect the hardcoded base64 secret