Make sure we do not expose secrets in output

This is using the RFC-8959 URI scheme to detect secrets. Thanks
hackernews for the idea ;)
This commit is contained in:
2022-05-27 23:37:54 +02:00
parent 90d188e01e
commit a71711978e
4 changed files with 18 additions and 16 deletions

View File

@@ -18,6 +18,8 @@ def grm(args, cwd=None, is_invalid=False):
print(f"grmcmd: {args}")
print(f"stdout:\n{cmd.stdout}")
print(f"stderr:\n{cmd.stderr}")
assert "secret-token:" not in cmd.stdout
assert "secret-token:" not in cmd.stderr
assert "panicked" not in cmd.stderr
return cmd