summaryrefslogtreecommitdiffstats
path: root/bin/filter-secrets
diff options
context:
space:
mode:
Diffstat (limited to 'bin/filter-secrets')
-rwxr-xr-xbin/filter-secrets6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/filter-secrets b/bin/filter-secrets
new file mode 100755
index 000000000..6fcce73c1
--- /dev/null
+++ b/bin/filter-secrets
@@ -0,0 +1,6 @@
+#! /bin/sh
+# filter_secrets : lines string |> lines secrets-file-candidate
+set -euf
+
+# Notice how false positives are possible.
+sed -n 's:^\(.*/\)\?\(secrets/.*\):'"${PWD//:/\\:}"'/\2:p'