Skip to content

fix(ci): exclude docs/ and secrets/ from validate-pr scans#42

Merged
JackMaarek merged 1 commit into
mainfrom
fix/ci-validate-pr-false-positives
Apr 26, 2026
Merged

fix(ci): exclude docs/ and secrets/ from validate-pr scans#42
JackMaarek merged 1 commit into
mainfrom
fix/ci-validate-pr-false-positives

Conversation

@JackMaarek

Copy link
Copy Markdown
Collaborator

Summary

Two false positives in .github/workflows/validate-pr.yml are blocking
every PR targeting main (including #41). Both flag pre-existing files
that are correct by design.

Root causes

Job False positive Fix
check-no-secrets docs/templates/local/vault/manifests/cluster-secret-store.yaml:22 — Vault dev-mode root token in a local Kind dev template Add --exclude-dir=docs
check-placeholders kubernetes/manifests/secrets/grafana-admin-externalsecret.yaml:27,31__ENV__ in ExternalSecret remoteRef key paths (resolved by platform-bot at hydrate time) Add --exclude-dir=secrets

Per CLAUDE.md, placeholders ARE allowed in *.yaml (resolved by the bot's
placeholders.go ResolvePlaceholders walking the tree at hydrate time). The
existing check was too strict for kubernetes/manifests/secrets/ where ESO
remoteRef keys are env-scoped by design.

Validation

Locally simulated both patched grep commands against the current main:

  • check-placeholders → no violations
  • check-no-secrets → no violations

Both checks remain in place for every other path. Inline comments document
the rationale so the broader scope is not reintroduced by future contributors.

Out of scope

  • gitleaks integration (referenced in the existing comment but not added here).
  • Migrating ESO apiVersion: v1beta1v1 (separate Sprint 2D task).

Unblocks

Two false positives in .github/workflows/validate-pr.yml were blocking
every PR targeting main:

  1. check-no-secrets flagged the Vault dev-mode root token at
     docs/templates/local/vault/manifests/cluster-secret-store.yaml:22.
     This file is a local-Kind dev template, not a deployed manifest.
     Add --exclude-dir=docs to scope the scan to deployed paths.

  2. check-placeholders flagged __ENV__ in
     kubernetes/manifests/secrets/grafana-admin-externalsecret.yaml.
     ExternalSecret remoteRef key paths are env-scoped by design and
     resolved by platform-bot at hydrate time on env branches (per
     placeholders.go ResolvePlaceholders). Add --exclude-dir=secrets
     to allow placeholders in this targeted subdirectory only.

Both checks remain in place for every other path. Comments added
inline to document the rationale so future contributors do not
reintroduce the broader scope.
@JackMaarek
JackMaarek merged commit 18025e3 into main Apr 26, 2026
6 checks passed
@JackMaarek
JackMaarek deleted the fix/ci-validate-pr-false-positives branch April 26, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant