Repository navigation
[WISE] No secrets in files: gitignore, CI check, AGENTS.md rule - #561
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.
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)
This comment has been minimized.
This comment has been minimized.
…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
This comment has been minimized.
This comment has been minimized.
…he 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.
This comment has been minimized.
This comment has been minimized.
…gnments like SECRET with an empty quoted value are dropped before the credential check, so legitimate example files stay green while real values still fail.
jaywedgeworth22
enabled auto-merge (squash)
November 28, 2026 05:33
This comment has been minimized.
This comment has been minimized.
…check. Trailing comments are stripped before the placeholder filter, so a marker word in a comment no longer lets a real credential value pass.
This comment has been minimized.
This comment has been minimized.
… 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.
This comment has been minimized.
This comment has been minimized.
…p-list. Auth-prefixed credential keys are matched again, and the known non-secret AUTHOR and AUTH_ENABLED keys are excluded explicitly.
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
Establishes a no-secrets-in-files policy where all secrets live only in Infisical. Adds
.gitignoreentries, anAGENTS.mdcontributor rule, and aNo env filesCI check to block tracked.env/.varsfiles.Changes
.gitignore: ignores.env,.env.*,*.env,.dev.vars,.dev.vars.*,.prod.vars,.prod.vars.*, and*.vars, while allowing*.example,*.sample, and*.templateplaceholders.AGENTS.md: documents that secrets must never be placed in.env,.vars,.dev.vars,.prod.vars, or similar files, and directs readers to use the documented Infisical reader at runtime. Defines remediation as immediate deletion and rotation if a secret file is committed..github/workflows/no-env-files.yml: adds CI on pull requests andmainpushes that fails if tracked env or vars files are found, excluding*.example,*.sample,*.template, and*.distsuffixes.Operational impact
Prevents committing secret-bearing env files and fails PRs that track them. Unverified whether the ignore patterns and CI regex fully enforce the stated policy across all filename variants.
Unresolved risks / review findings
Automated review reported 4 unresolved findings:
.cursor/infisical.env..env.local..distenv files that policy forbids.*.env.*and*.vars.*ignore rules allow secret leaks.Verification
No test evidence was reported. Added CI behavior is unverified in this description.
Summary
Updates the
No secrets in filesrule inAGENTS.mdto revise handling of accidentally committed secret files. It now directs deleting the file from the tree right away and keeping a backup on our own systems, never in the repo or in chat, with history purge left as a separate owner decision. It removes the prior instruction to rotate every value in the committed file.Operational impact
Changes owner guidance only; no runtime, gitignore, or CI behavior is altered in this diff. The unverified effect is that secret rotation is no longer required by the documented process.
Unresolved risk
Automated review reported 1 high finding that remains unresolved: committed secrets stay valid without mandatory rotation. No tests added, tests run, deployment verification, or issue references were evidenced in the provided changes.
Summary
Updates the
no-env-filesCI check to exempt.cursor/infisical.envfrom failure when tracked. The check otherwise still fails if other.envor*.varsfiles are tracked.Operational impact
Allows
.cursor/infisical.envto remain tracked without triggering the workflow. Other env/vars file patterns remain blocked by CI.Risks
Automated review flagged that the exempted
infisical.envpath can be tracked without content checking, which is unverified and remains unresolved. No test evidence was provided in the changes.Summary
Extends the
No env filesCI check to prevent tracked secrets files from reachingmain. The detection pattern now also flags*.varsfiles with suffixes (e.g.*.vars.*), in addition to existing.envpatterns. Adds a 10-minute timeout to the workflow job.Operational impact
Pull requests that track disallowed env or vars files will fail CI with an error directing contributors to keep secrets only in Infisical. Verification status is unverified, as no test evidence was included in the reviewed changes.
Summary
Strengthens the CI guardrail behind the "no secrets in files" effort so all secrets stay in Infisical. The provided diff changes only
.github/workflows/no-env-files.yml. (The PR title also references gitignore and an AGENTS.md rule, but those files are not part of the shown changes.)What changed
.envrcfiles, in addition to.envand.varsfiles (including dotted and suffixed variants such as.env.local). Only.example,.sample, and.templatefiles remain exempt —distfiles are no longer excluded. The.cursor/infisical.envallowlist is preserved, now as an inline exclusion pattern instead of the removedALLOW_REenv var..cursor/infisical.envfile and fails CI if it contains anything other than blank lines, comments, orINFISICAL_*entries with simple values, or if any key name looks credential-like (containsSECRET,TOKEN,PASSWORD, orCLIENT).Operational impact
PRs that track env, vars, or envrc files — or an Infisical coordinates file carrying anything beyond
INFISICAL_*coordinates — will fail CI with an error annotation identifying the offending files.Unresolved review finding
.github/workflows/no-env-files.yml:29— unquoted command substitution splits tracked paths on spaces, which can mishandle file paths containing spaces in the new Infisical check. Not addressed in this PR.No tests were added and none were reported as run; the checks' runtime behavior has not been verified.
Summary
Enforces that secrets are not stored in tracked files and live only in Infisical. Automated code review reported no issues; runtime verification remains unverified.
Changes
.gitignoreto ignore*.vars.*,*.env.*, and.envrcwhile explicitly allowing only.cursor/infisical.envalongside existing example/sample/template exceptions.no-env-files.ymlto fail if any env, vars, or envrc file is tracked, with the sole tracked exception being.cursor/infisical.env..cursor/infisical.envcontains only non-credentialINFISICAL_*coordinates and rejects credential-looking keys.Summary
Strengthens the "no secrets in files" guardrails so that secret-bearing env/vars files cannot be tracked in the repository, and the single allowed exceptions file can only contain Infisical coordinates.
.gitignore*.vars.*,*.env.*, and.envrc(direnv files)..cursor/infisical.envso the Infisical coordinates file stays tracked, alongside the existing example/sample/template exemptions.CI workflow (
.github/workflows/no-env-files.yml).env,.vars, or.envrcfile, including suffixed variants, while still excluding example/sample/template files and the.cursor/infisical.envallowlist (previously handled via anALLOW_REenvironment variable, now inlined into the grep pipeline)..cursor/infisical.envfile and fails CI if it contains anything other than blank lines, comments, orINFISICAL_*=<safe value>coordinate entries, or if any key looks credential-like (keys containingSECRET,TOKEN,PASSWORD, orCLIENT). Violations are reported as CI errors with the offending file named.Operational impact
.envrcand dotted variants (e.g..env.local-style files).Note: the PR title references an AGENTS.md rule, but no AGENTS.md change appears in the provided changes. No test changes are included; the checks are enforced by the workflow itself, and no runtime verification is reported.
Summary
This PR hardens the no-secrets-in-files guard so all secrets live only in Infisical. The
.cursor/infisical.envexception is now explicitly limited to non-credential coordinates.Changes
No env filesCI check to validate tracked files more robustly against spaces in paths. Restricted.cursor/infisical.envto allow onlyINFISICAL_PROJECT_ID,INFISICAL_ENVandINFISICAL_DOMAIN, replacing the prior broaderINFISICAL_*plus credential-keyword check.AGENTS.mdto document that narrow exception and note that CI checks its content.Impact
.env,.vars,.envrcor similar files continue to fail CI, while the documented coordinates file remains allowed. Any additional keys in.cursor/infisical.envwill now fail CI verification, which remains unverified in a live run.Verification
Summary
Prevents secrets from being stored in tracked files by extending ignore rules and CI enforcement. All secrets are intended to live only in Infisical.
Changes
.gitignoreto also ignore*.envrc,*.envrc.*, while still allowing*.example,*.sample, and*.templatefiles..github/workflows/no-env-files.ymlenv-file detection to be case-insensitive and to handle directory paths.--and./prefix for safe filename handling.Operational impact
CI now fails if env or vars files are tracked, and restricts allowed config content to Infisical references only. Developers must use Infisical instead of committing env files.
Unresolved risks / review findings
(/|$)in env-file regex may flag every file under a*.envdirectory — unverified.Verification
No test evidence was provided in the changes supplied. Behavior described above is unverified.
Summary
Adds a new CI step, "Check placeholder env files hold no real values", to the existing
.github/workflows/no-env-files.ymlworkflow, extending the PR's goal (per its title) of keeping secrets out of files. The provided diff shows only this workflow change; the gitignore and AGENTS.md rule mentioned in the title are not present in the supplied patches.What the new check does
.example,.sample, or.template.KEY=valueline where the key looks credential-like (secret,token,password,api key,private,credential,_key,auth) and the value is non-empty and not a recognized placeholder marker (xxx,...,<,changeme,change-me,your-,example,placeholder,path/to,redacted,dummy,todo).Operational impact
Open review findings and unverified behavior
.github/workflows/no-env-files.yml:43, empty-quoted placeholder values such asSECRET=""are treated as real secrets, since""matches the non-empty value pattern and is not in the exclusion list — a likely false positive that can fail CI on legitimate placeholder files.Summary
This PR strengthens the guard against committing real secrets in env-style files. Per the PR title, the branch's goal is to keep secrets out of files via a
.gitignoreentry, a CI check, and anAGENTS.mdrule; the provided diff shows only the workflow change.What changed
.github/workflows/no-env-files.yml..env,.vars, or.envrcand ending in.example,.sample, or.template.secret,token,password,passwd,api key,private,credential,auth, or ending in_key) assigned a non-empty value.""/'') and common placeholder patterns (xxx,...,<,changeme,your-*,example,placeholder,path/to,redacted,dummy,todo) are ignored.Operational impact
.example/.sample/.templateenv file contains a credential-like key whose value does not look like a placeholder, giving contributors feedback before merge.Known issue (unresolved)
# placeholder) can bypass the check at line 43 of the workflow. This is not resolved in the provided changes.Testing
Summary
Adds an automated guard against real credentials hiding in placeholder env files. The visible change extends the
no-env-filesCI workflow (.github/workflows/no-env-files.yml) with a new step, "Check placeholder env files hold no real values". The PR title also references gitignore entries and an AGENTS.md rule, but the provided diff covers only the workflow step.What the new CI step does
.env,.vars,.envrc, optionally with suffixes) that end in.example,.sample, or.template.secret,token,password,passwd,api[-_]key,private,credential,_key,auth) carries a non-empty, non-comment value.xxx,...,<...>,changeme,change-me,your[-_],example,placeholder,path/to,redacted,dummy,todo).Operational impact
main.Known risk (unresolved)
authanywhere in a key name, so innocuous keys such asAUTHORcan trigger false positives. This finding has not been addressed in the diff.Refines the
no-env-filesCI secret check in.github/workflows/no-env-files.ymlso that placeholder-like words can no longer hide real credentials and innocuous keys no longer cause false failures. The scan previously filtered matching lines with chainedgrepcommands, which meant a placeholder word (such asxxx,example, ortodo) appearing anywhere in a line — including in the key name — caused the whole line to be skipped, while keys likeauthororauth_enabledmatched the looseauthpattern and were flagged as errors. The filtering is now done in a singleawkscript that splits eachKEY=valueline into key and value and applies the rules separately: credential-like keys still includesecret,token,password,passwd,api key,private,credential,_key, andauthnow only at the start of the key or after an underscore;authorandauth_enabledare explicitly excluded; and placeholder words are tolerated only in the value, not the key. Operational impact: CI fails only when a credential-like key in a tracked file genuinely carries a non-placeholder value, so assignments likeEXAMPLE_TOKEN=<real value>are now caught while keys such asauthor=...orauth_enabled=trueno longer break the build. No tests were added or reported as run for this workflow change; the automated code review found no issues.