From 48e94f6b11ba4e4a58c1fefb0716eb64cdb67a2a Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 00:55:31 +0000 Subject: [PATCH 01/14] [WISE] No secrets in files: gitignore, No env files check, AGENTS.md rule --- .github/workflows/no-env-files.yml | 26 ++++++++++++++++++++++++++ .gitignore | 13 +++++++++++++ AGENTS.md | 4 ++++ 3 files changed, 43 insertions(+) create mode 100644 .github/workflows/no-env-files.yml diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml new file mode 100644 index 00000000..90778c91 --- /dev/null +++ b/.github/workflows/no-env-files.yml @@ -0,0 +1,26 @@ +name: No env files + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + no-env-files: + name: No env files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Fail if an env or vars file is tracked + env: + ALLOW_RE: '^$' + run: | + bad=$(git ls-files | grep -E '(^|/)(\.env(\..+)?|[^/]*\.env|[^/]*\.vars)$' | grep -Ev '\.(example|sample|template|dist)$' | grep -Ev "$ALLOW_RE" || true) + if [ -n "$bad" ]; then + echo "::error::Tracked env or vars files are not allowed. All secrets live only in Infisical." + echo "$bad" + exit 1 + fi diff --git a/.gitignore b/.gitignore index 94f53acf..7aaeeda5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,16 @@ _site/ ios/CodeCapsCompanion/build/ __pycache__/ *.pyc + +# --- No secrets in files: all secrets live only in Infisical --- +.env +.env.* +*.env +.dev.vars +.dev.vars.* +.prod.vars +.prod.vars.* +*.vars +!*.example +!*.sample +!*.template diff --git a/AGENTS.md b/AGENTS.md index 79a5e2fe..7d23ca79 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -160,3 +160,7 @@ that goes backwards silently strands every installed copy. - Audit batches use the `audit-#N` branch naming and ship in `docs/audits/-.md`. - UI changes must be covered by automated visual verification where feasible: Playwright screenshot assertions for web surfaces, `xcrun simctl io booted screenshot` for iOS simulator. The owner never takes manual screenshots and does not run local UI preview sessions. Native Mac app UI is verified through code review and CI. + +## No secrets in files + +All secrets live only in Infisical. Never put a secret in a `.env`, `.vars`, `.dev.vars`, `.prod.vars` or any similar file, tracked or untracked, in any repo, ever. Read secrets from Infisical at run time through this repo's documented reader. Only `*.example`, `*.sample` and `*.template` files with empty or placeholder values may be committed. `.gitignore` blocks these file names and the `No env files` CI check fails any PR that tracks one. If a secret file is ever committed, delete it from the tree right away, rotate every value in it, and treat a history purge as a separate owner decision. From 223450710b468aafe44360de43efc6f59b0e85ee Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 01:05:18 +0000 Subject: [PATCH 02/14] [WISE] No secrets in files: backup instead of rotate --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 7d23ca79..7976a26c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -163,4 +163,4 @@ that goes backwards silently strands every installed copy. ## No secrets in files -All secrets live only in Infisical. Never put a secret in a `.env`, `.vars`, `.dev.vars`, `.prod.vars` or any similar file, tracked or untracked, in any repo, ever. Read secrets from Infisical at run time through this repo's documented reader. Only `*.example`, `*.sample` and `*.template` files with empty or placeholder values may be committed. `.gitignore` blocks these file names and the `No env files` CI check fails any PR that tracks one. If a secret file is ever committed, delete it from the tree right away, rotate every value in it, and treat a history purge as a separate owner decision. +All secrets live only in Infisical. Never put a secret in a `.env`, `.vars`, `.dev.vars`, `.prod.vars` or any similar file, tracked or untracked, in any repo, ever. Read secrets from Infisical at run time through this repo's documented reader. Only `*.example`, `*.sample` and `*.template` files with empty or placeholder values may be committed. `.gitignore` blocks these file names and the `No env files` CI check fails any PR that tracks one. If a secret file is ever committed, delete it from the tree right away and keep a backup on our own systems (never in the repo or in chat). A history purge is a separate owner decision. From 333780c89d82c4bc37a3ac6f812b584dda6c93c2 Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 01:37:29 +0000 Subject: [PATCH 03/14] [WISE] No env files: allow non-secret .cursor/infisical.env --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 90778c91..ea2ead76 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Fail if an env or vars file is tracked env: - ALLOW_RE: '^$' + ALLOW_RE: '^\.cursor/infisical\.env$' run: | bad=$(git ls-files | grep -E '(^|/)(\.env(\..+)?|[^/]*\.env|[^/]*\.vars)$' | grep -Ev '\.(example|sample|template|dist)$' | grep -Ev "$ALLOW_RE" || true) if [ -n "$bad" ]; then From 0ca70821146998683a1e3bc5d0c0da7ca4438504 Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 02:38:34 +0000 Subject: [PATCH 04/14] [WISE] No env files: match suffixed .vars files, add job timeout --- .github/workflows/no-env-files.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index ea2ead76..b095d98a 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -12,13 +12,14 @@ jobs: no-env-files: name: No env files runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - name: Fail if an env or vars file is tracked env: ALLOW_RE: '^\.cursor/infisical\.env$' run: | - bad=$(git ls-files | grep -E '(^|/)(\.env(\..+)?|[^/]*\.env|[^/]*\.vars)$' | grep -Ev '\.(example|sample|template|dist)$' | grep -Ev "$ALLOW_RE" || true) + bad=$(git ls-files | grep -E '(^|/)(\.env(\..+)?|[^/]*\.env|[^/]*\.vars(\..+)?)$' | grep -Ev '\.(example|sample|template|dist)$' | grep -Ev "$ALLOW_RE" || true) if [ -n "$bad" ]; then echo "::error::Tracked env or vars files are not allowed. All secrets live only in Infisical." echo "$bad" From fff019e69bfb5e13dc2572f6669a89330db4a215 Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 02:46:22 +0000 Subject: [PATCH 05/14] [WISE] No env files v2: suffix variants, no .dist, infisical.env content check (no-env-files.yml) --- .github/workflows/no-env-files.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index b095d98a..f8682ba5 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -16,12 +16,24 @@ jobs: steps: - uses: actions/checkout@v4 - name: Fail if an env or vars file is tracked - env: - ALLOW_RE: '^\.cursor/infisical\.env$' run: | - bad=$(git ls-files | grep -E '(^|/)(\.env(\..+)?|[^/]*\.env|[^/]*\.vars(\..+)?)$' | grep -Ev '\.(example|sample|template|dist)$' | grep -Ev "$ALLOW_RE" || true) + bad=$(git ls-files | grep -E '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?$' | grep -Ev '\.(example|sample|template)$' | grep -Ev '(^|/)\.cursor/infisical\.env$' || true) if [ -n "$bad" ]; then echo "::error::Tracked env or vars files are not allowed. All secrets live only in Infisical." echo "$bad" exit 1 fi + - name: Check Infisical coordinates files hold no secrets + run: | + status=0 + for f in $(git ls-files | grep -E '(^|/)\.cursor/infisical\.env$'); do + if grep -Ev '^[[:space:]]*(#.*)?$' "$f" | grep -Evq '^INFISICAL_[A-Z_]+=[A-Za-z0-9._:/@-]*$'; then + echo "::error::$f holds something other than INFISICAL_* coordinates" + status=1 + fi + if grep -Eiq '^INFISICAL_[A-Z_]*(SECRET|TOKEN|PASSWORD|CLIENT)[A-Z_]*=' "$f"; then + echo "::error::$f holds a credential-looking key" + status=1 + fi + done + exit $status From e63aa5a5c663f4f5cf0890f3648c4963c39285b2 Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 03:02:46 +0000 Subject: [PATCH 06/14] [WISE] No env files v2: suffix variants, no .dist, infisical.env content check (.gitignore) --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 7aaeeda5..43e1a874 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,10 @@ __pycache__/ .prod.vars .prod.vars.* *.vars +*.vars.* +*.env.* +.envrc !*.example !*.sample !*.template +!.cursor/infisical.env From 0d5f6bb4153a192296298b5d5d190d77b1f39d21 Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 04:29:42 +0000 Subject: [PATCH 07/14] [WISE] No env files: exact infisical keys, safe path loop, exception documented --- .github/workflows/no-env-files.yml | 17 ++++++++--------- AGENTS.md | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index f8682ba5..8f73a7a4 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -17,7 +17,8 @@ jobs: - uses: actions/checkout@v4 - name: Fail if an env or vars file is tracked run: | - bad=$(git ls-files | grep -E '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?$' | grep -Ev '\.(example|sample|template)$' | grep -Ev '(^|/)\.cursor/infisical\.env$' || true) + tracked=$(git ls-files) + bad=$(printf '%s\n' "$tracked" | grep -E '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?$' | grep -Ev '\.(example|sample|template)$' | grep -Ev '(^|/)\.cursor/infisical\.env$' || true) if [ -n "$bad" ]; then echo "::error::Tracked env or vars files are not allowed. All secrets live only in Infisical." echo "$bad" @@ -26,14 +27,12 @@ jobs: - name: Check Infisical coordinates files hold no secrets run: | status=0 - for f in $(git ls-files | grep -E '(^|/)\.cursor/infisical\.env$'); do - if grep -Ev '^[[:space:]]*(#.*)?$' "$f" | grep -Evq '^INFISICAL_[A-Z_]+=[A-Za-z0-9._:/@-]*$'; then - echo "::error::$f holds something other than INFISICAL_* coordinates" + tracked=$(git ls-files) + while IFS= read -r f; do + [ -n "$f" ] || continue + if grep -Ev '^[[:space:]]*(#.*)?$' "$f" | grep -Evq '^INFISICAL_(PROJECT_ID|ENV|DOMAIN)=[A-Za-z0-9._:/@-]*$'; then + echo "::error::$f may hold only INFISICAL_PROJECT_ID, INFISICAL_ENV and INFISICAL_DOMAIN" status=1 fi - if grep -Eiq '^INFISICAL_[A-Z_]*(SECRET|TOKEN|PASSWORD|CLIENT)[A-Z_]*=' "$f"; then - echo "::error::$f holds a credential-looking key" - status=1 - fi - done + done < <(printf '%s\n' "$tracked" | grep -E '(^|/)\.cursor/infisical\.env$' || true) exit $status diff --git a/AGENTS.md b/AGENTS.md index 7976a26c..37d3b2e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -164,3 +164,5 @@ that goes backwards silently strands every installed copy. ## No secrets in files All secrets live only in Infisical. Never put a secret in a `.env`, `.vars`, `.dev.vars`, `.prod.vars` or any similar file, tracked or untracked, in any repo, ever. Read secrets from Infisical at run time through this repo's documented reader. Only `*.example`, `*.sample` and `*.template` files with empty or placeholder values may be committed. `.gitignore` blocks these file names and the `No env files` CI check fails any PR that tracks one. If a secret file is ever committed, delete it from the tree right away and keep a backup on our own systems (never in the repo or in chat). A history purge is a separate owner decision. + +The one exception is `.cursor/infisical.env`, which may hold only the `INFISICAL_PROJECT_ID`, `INFISICAL_ENV` and `INFISICAL_DOMAIN` coordinates and never a credential; CI checks its content. From c40f1cc95ee510bb4ece4f5f365e558f3220ca3b Mon Sep 17 00:00:00 2001 From: "swu-wise[bot]" <344778455+swu-wise[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 04:35:58 +0000 Subject: [PATCH 08/14] [WISE] No env files: case-insensitive, any path component, envrc gitignore variants --- .github/workflows/no-env-files.yml | 4 ++-- .gitignore | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 8f73a7a4..443f7537 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -18,7 +18,7 @@ jobs: - name: Fail if an env or vars file is tracked run: | tracked=$(git ls-files) - bad=$(printf '%s\n' "$tracked" | grep -E '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?$' | grep -Ev '\.(example|sample|template)$' | grep -Ev '(^|/)\.cursor/infisical\.env$' || true) + bad=$(printf '%s\n' "$tracked" | grep -Ei '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?(/|$)' | grep -Eiv '\.(example|sample|template)$' | grep -Ev '(^|/)\.cursor/infisical\.env$' || true) if [ -n "$bad" ]; then echo "::error::Tracked env or vars files are not allowed. All secrets live only in Infisical." echo "$bad" @@ -30,7 +30,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - if grep -Ev '^[[:space:]]*(#.*)?$' "$f" | grep -Evq '^INFISICAL_(PROJECT_ID|ENV|DOMAIN)=[A-Za-z0-9._:/@-]*$'; then + if grep -Ev -- '^[[:space:]]*(#.*)?$' "./$f" | grep -Evq '^INFISICAL_(PROJECT_ID|ENV|DOMAIN)=[A-Za-z0-9._:/@-]*$'; then echo "::error::$f may hold only INFISICAL_PROJECT_ID, INFISICAL_ENV and INFISICAL_DOMAIN" status=1 fi diff --git a/.gitignore b/.gitignore index 43e1a874..ef8ee6ce 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ __pycache__/ *.vars.* *.env.* .envrc +*.envrc +*.envrc.* !*.example !*.sample !*.template From a77681ab4a453460610fbde9875319f050294cd8 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 05:22:40 +0000 Subject: [PATCH 09/14] CI: content-check placeholder env files for real credential values. The No env files job now fails when a tracked .example, .sample or .template env file gives a credential-like key a non-placeholder value, closing the placeholder-suffix bypass. --- .github/workflows/no-env-files.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 443f7537..86499d8a 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -36,3 +36,16 @@ jobs: fi done < <(printf '%s\n' "$tracked" | grep -E '(^|/)\.cursor/infisical\.env$' || true) exit $status + - name: Check placeholder env files hold no real values + run: | + status=0 + tracked=$(git ls-files) + while IFS= read -r f; do + [ -n "$f" ] || continue + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) + if [ -n "$hits" ]; then + echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" + status=1 + fi + done < <(printf '%s\n' "$tracked" | grep -Ei '(^|/)[^/]*(\.env|\.vars|\.envrc)(\.[^/]*)?(/|$)' | grep -Ei '\.(example|sample|template)$' || true) + exit $status From 187ee6d83c7702f64b064a4f67bd07161b7d5a82 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 05:33:23 +0000 Subject: [PATCH 10/14] CI: allow quoted-empty placeholder values in env template check. Assignments like SECRET with an empty quoted value are dropped before the credential check, so legitimate example files stay green while real values still fail. --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 86499d8a..0739b175 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -42,7 +42,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) if [ -n "$hits" ]; then echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" status=1 From 1206f1ab72cf115f31580914ac59f79c2c6fa0d9 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 05:45:31 +0000 Subject: [PATCH 11/14] CI: match placeholder markers against the value only in env template check. Trailing comments are stripped before the placeholder filter, so a marker word in a comment no longer lets a real credential value pass. --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 0739b175..ece75a95 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -42,7 +42,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) if [ -n "$hits" ]; then echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" status=1 From 115eb6950cb1e012663fe5daae9eb5f7ebaa83e5 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 05:53:16 +0000 Subject: [PATCH 12/14] CI: anchor the auth alternative in the env template credential check. Only a whole auth key or an _auth suffix now matches, so non-secret keys like AUTHOR and AUTH_ENABLED no longer fail the check. --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index ece75a95..126d6b69 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -42,7 +42,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|(^|_)auth(=|$))' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) if [ -n "$hits" ]; then echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" status=1 From 74bc8b2d646ceb424f28062567f626818dbdcc45 Mon Sep 17 00:00:00 2001 From: "swu-echo[bot]" <344778617+swu-echo[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 05:54:10 +0000 Subject: [PATCH 13/14] fix(ci): classify placeholder values independently of key names --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 126d6b69..6a792386 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -42,7 +42,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | grep -Ei '(secret|token|password|passwd|api[-_]?key|private|credential|_key|(^|_)auth(=|$))' | grep -Eiv '(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path/to|redacted|dummy|todo)' || true) + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | awk '{ i = index($0, "="); k = tolower(substr($0, 1, i - 1)); v = tolower(substr($0, i + 1)); if (k ~ /(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)/ && v !~ /(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path\/to|redacted|dummy|todo)/) print }' || true) if [ -n "$hits" ]; then echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" status=1 From c2027195fa0342cdc9d5cf0e5947e26a4ad1cdc5 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sat, 28 Nov 2026 06:01:26 +0000 Subject: [PATCH 14/14] CI: broaden auth matching in env template check with a non-secret keep-list. Auth-prefixed credential keys are matched again, and the known non-secret AUTHOR and AUTH_ENABLED keys are excluded explicitly. --- .github/workflows/no-env-files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-env-files.yml b/.github/workflows/no-env-files.yml index 6a792386..8ac6a6ed 100644 --- a/.github/workflows/no-env-files.yml +++ b/.github/workflows/no-env-files.yml @@ -42,7 +42,7 @@ jobs: tracked=$(git ls-files) while IFS= read -r f; do [ -n "$f" ] || continue - hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | awk '{ i = index($0, "="); k = tolower(substr($0, 1, i - 1)); v = tolower(substr($0, i + 1)); if (k ~ /(secret|token|password|passwd|api[-_]?key|private|credential|_key|auth)/ && v !~ /(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path\/to|redacted|dummy|todo)/) print }' || true) + hits=$(grep -E -- '^[A-Za-z_][A-Za-z0-9_]*=[^[:space:]#]+' "./$f" | grep -Ev -- "^[A-Za-z_][A-Za-z0-9_]*=(\"\"|'')[[:space:]]*(#.*)?$" | sed -E 's/[[:space:]]+#.*$//' | awk '{ i = index($0, "="); k = tolower(substr($0, 1, i - 1)); v = tolower(substr($0, i + 1)); if (k ~ /(secret|token|password|passwd|api[-_]?key|private|credential|_key|(^|_)auth)/ && k !~ /^(author|auth_enabled)$/ && v !~ /(xxx|\.\.\.|<|changeme|change-me|your[-_]|example|placeholder|path\/to|redacted|dummy|todo)/) print }' || true) if [ -n "$hits" ]; then echo "::error::$f is a placeholder file but a credential-like key carries a non-placeholder value" status=1