fix(ci): exclude docs/ and secrets/ from validate-pr scans#42
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two false positives in
.github/workflows/validate-pr.ymlare blockingevery PR targeting
main(including #41). Both flag pre-existing filesthat are correct by design.
Root causes
check-no-secretsdocs/templates/local/vault/manifests/cluster-secret-store.yaml:22— Vault dev-mode root token in a local Kind dev template--exclude-dir=docscheck-placeholderskubernetes/manifests/secrets/grafana-admin-externalsecret.yaml:27,31—__ENV__in ExternalSecret remoteRef key paths (resolved by platform-bot at hydrate time)--exclude-dir=secretsPer
CLAUDE.md, placeholders ARE allowed in*.yaml(resolved by the bot'splaceholders.go ResolvePlaceholderswalking the tree at hydrate time). Theexisting check was too strict for
kubernetes/manifests/secrets/where ESOremoteRef keys are env-scoped by design.
Validation
Locally simulated both patched grep commands against the current
main:check-placeholders→ no violationscheck-no-secrets→ no violationsBoth 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
apiVersion: v1beta1→v1(separate Sprint 2D task).Unblocks
git merge mainon its branch to pull in the patched workflow, then CI re-runs green.