Repository navigation
[WISE] No secrets in files: gitignore, CI check, AGENTS.md rule - #2100
Merged
Merged
Conversation
Contributor
|
@kody start-review |
This comment has been minimized.
This comment has been minimized.
|
Automatic approval held Kody's assessment:
|
Contributor
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ent check (no-env-files.yml)
…ent check (.gitignore)
This comment has been minimized.
This comment has been minimized.
Contributor
This comment has been minimized.
This comment has been minimized.
Contributor
This comment has been minimized.
This comment has been minimized.
Contributor
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
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
Enforces no secrets in files so all secrets live only in Infisical. Updates
.gitignore, adds aNo env filesCI check, and documents the rule inAGENTS.md.Changes
.gitignoreto block.env,.env.*,*.env,.dev.vars,.prod.vars,*.varsvariants, while allowing*.example,*.sample,*.templateand.cursor/infisical.env..github/workflows/no-env-files.ymlto fail pull requests andmainpushes when a tracked env or vars file is present, with exclusions for example/sample/template/dist and an allowlist for.cursor/infisical.env.No secrets in filesguidance toAGENTS.mdrequiring runtime reads from Infisical, prohibiting secrets in tracked or untracked files, and directing immediate deletion and rotation if a secret file is committed.Operational impact
Contributors can no longer commit env or vars files with real values. Only placeholder example, sample, or template files may be committed. Violations are blocked locally by ignore rules and in CI by the new workflow.
Verification and risks
No test execution evidence is provided in the changes. CI behavior is unverified in this summary. Automated review reported 2 unresolved medium findings: the CI pattern may miss suffixed
.env/.varsfiles, andAGENTS.mddoes not document the.cursor/infisical.envexception that ignore and CI enforce.Summary
Updates the
No secrets in filesrule inAGENTS.mdto revise handling of a committed secret file. It now directs immediate removal from the tree and keeping a backup on own systems (never in the repo or in chat), with history purge as a separate owner decision.Risk
Automated review reports one high finding that this revision drops mandatory rotation of every value in a committed secret file. This remains unverified and unresolved in the provided changes. No test evidence, issue references, or runtime verification is reported.
Summary
This PR strengthens the CI guard enforcing the rule that no secrets are stored in files and all secrets live only in Infisical. The provided diff modifies
.github/workflows/no-env-files.ymlonly.Changes
.vars(e.g.vars.local,vars.staging) are now rejected, mirroring the existing.env.*handling; previously only files ending exactly in.varswere caught.timeout-minutes: 10cap to the "No env files" job.Operational impact
*.vars.*files to slip through. Existing exclusions remain:*.example,*.sample,*.template,*.distvariants and the allowlisted.cursor/infisical.env.Unresolved review findings (high)
*.distenv files bypass the tracked-secrets check via the exclusion regex.Tests
No tests were added, and no test runs were reported in the provided changes; the behavior of the updated pattern is unverified.
Note
The PR title also references gitignore entries and an AGENTS.md rule, but those files are not included in the provided diff, so their contents cannot be summarized here.
Purpose
Enforce no secrets in tracked files, with secrets living only in Infisical. Automated code review reported no issues.
Changes
.gitignoreto also ignore*.vars.*,*.env.*, and.envrc..cursor/infisical.envholds onlyINFISICAL_*coordinates and no credential-looking keys.Impact
CI will now fail if an env/vars file is tracked or if the Infisical coordinates file contains non-coordinate or credential-like entries. Operational runtime verification was not provided in the changes.
Summary
Tightens no-secrets-in-files guardrails so all secrets live only in Infisical. Documents
.cursor/infisical.envas the sole coordinates-only exception and enforces it in CI.Changes
.gitignore: now also ignores*.vars.*,*.env.*, and.envrcwhile still allowing*.example,*.sample, and*.templateplaceholders..github/workflows/no-env-files.yml: broadens tracked-file detection to cover.envrcand dotted*.env/*.varsvariants and adds a content check limiting.cursor/infisical.envtoINFISICAL_PROJECT_ID,INFISICAL_ENV, andINFISICAL_DOMAIN.AGENTS.md: clarifies that.cursor/infisical.envmay hold only those three coordinates and never a credential, with CI checking its content.Operational impact
PRs tracking env/vars/envrc files will fail the
No env filescheck. No runtime behavior change; verification status is unverified with no test evidence in the diff.Unresolved risks / Review findings
infisical.env..gitignorestill misses.envrc.localand*.envrcvariants.Summary
This PR tightens the no-secrets-in-files guardrails so real env/vars files cannot be tracked in git. All secrets remain only in Infisical.
Changes
.gitignoreto also ignore*.envrcand*.envrc.*alongside existing env/vars patterns, while explicitly keeping*.example,*.sample, and*.templatefiles unignored.no-env-files.ymlto detect tracked env/vars/envrc files case-insensitively and with directory-aware matching.INFISICAL_PROJECT_ID,INFISICAL_ENV, andINFISICAL_DOMAIN, with safer handling of filenames.Impact and verification
Operational impact is reduced risk of accidental secret commit and CI failure if a disallowed env file is tracked. No test evidence is provided in the supplied changes and runtime behavior is unverified. Automated code review reported no issues.