Skip to content

Say in .env that it is tracked on purpose and holds no real secrets - #2063

Merged
jbirdjavi merged 2 commits into
masterfrom
gt-3111-env-placeholder-note
Nov 18, 2026
Merged

jbirdjavi merged 2 commits into
masterfrom
gt-3111-env-placeholder-note

Conversation

@jbirdjavi

@jbirdjavi jbirdjavi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Jira: GT-3111

Why

A scan flagged that the tracked .env has secret-named keys (Crowdin, Rollbar, Sidekiq, Facebook, Apple, Salesforce, JWT and more). The file stays tracked on purpose. This PR adds a two-line header that says so, says the values are for local dev and test only and none is a real secret, and says never to commit one.

What was checked

  • No value in .env on master is a real secret. Secret-named keys are fake or empty, for example fake_secret_key_base, abcdef, client_secret, localdevsecret. A few other values are real but public, such as APPLE_CLIENT_ID=org.cru.godtools.
  • Every secret-named key in all 31 past versions of the file on master was checked the same way. No real secret was ever committed. One 2023 commit (bd20ebe8) briefly held what look like a real Apple Key ID and Team ID (they match Apple's ID format). Those are IDs, not secrets, and the Apple private key in that commit was the fake private_key. No rotation is needed.
  • Deployed envs never read this file: dotenv-rails is only in the development and test groups, and .dockerignore keeps /.env* out of the image.
  • Dotenv.parse gives the same 43 keys and values before and after the header.

Change

Two comment lines and a blank line at the top of .env. Nothing else. (A first draft claimed the file lists every env var the app reads and that every value is fake; review showed both overclaim, so the second commit narrows the header to what holds.)

🤖 Generated with Claude Code

GT-3111 flagged that the tracked .env has secret-named keys. Every value
in it was checked and all are fake or empty, in this version and in every
past version of the file. The file stays tracked so it lists every env
var the app reads. The new header says so, says real secrets never go
here, and notes that deployed envs never read it: dotenv-rails is only in
the development and test groups, and .dockerignore keeps /.env* out of
the image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jbirdjavi

jbirdjavi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 agent-review · ✅ no blockers · risk LOW
Rollout: advisory · 4 agents run (Code Review (/code-review xhigh), Security Review Agent, Testing & Quality Review Agent, Standards Compliance Review Agent) · incremental since 142c206

BLOCKERS: fix or dismiss to pass

✅ No blockers.

OTHER FINDINGS (16)

  • #1 · 4/10 · .env:1 · The new header says .env lists every env var the app reads, but many read vars are missing. Readers who trust it as a full checklist will miss required vars. (code-review)
  • #11 · 4/10 · .env:2 · The no-real-secret rule is only a comment; no CI step or spec checks the values, so a real secret pasted into .env would merge unnoticed. (code-review)
  • #2 · 3/10 · .env:1 · The fix is comment-only, so nothing enforces the header claims or prevents the scanner from flagging the file again. (code-review)
  • #3 · 3/10 · .env:2 · 'Every value here is fake' is not literally true; some values are real but not secret, such as org.cru.godtools and dev1-signon.okta.com. (code-review)
  • #4 · 3/10 · .env:2 · The header does not mention that specs pin these exact values, so a dev may swap them and break CI. (code-review)
  • #5 · 3/10 · .env:2 · The header warns against committing real secrets but does not say where real values go. Pointing devs to the gitignored .env.local would make the safe path obvious. (code-review)
  • #6 · 3/10 · .env:3 · Line 3 explains why tracking is safe and repeats the .dockerignore NOTE, which the repo owner's comment rules put in the commit message instead. (code-review)
  • #7 · 3/10 · .gitignore:11 · .gitignore still ignores /.env* with no !/.env exception, which contradicts the new 'tracked on purpose' note. (code-review)
  • #12 · 3/10 · .env:1 · "Tracked on purpose." no longer says what the purpose is, so the next editor cannot tell which keys must stay. (code-review)
  • #13 · 3/10 · .env:1 · The removed third line noted that deployed builds never read .env; without it, an editor adding a required var only to .env may not know the Docker build boots test env without it. (code-review)
  • #8 · 2/10 · .env:3 · Line 3 reads as two independent guards, but during the Docker build only .dockerignore keeps .env out. The runtime claim is still true. (code-review)
  • #9 · 2/10 · .env:8 · DATADOG_TRACE, SYSLOG_HOST, DEFAULT_PROXY_TARGET and SIDEKIQ_CREDS are not read by the app, so they are dead keys in .env. (code-review)
  • #10 · 2/10 · README.md:11 · README.md lists a different set of env vars than .env, so the two docs disagree about the required list. (code-review)
  • #14 · 2/10 · .env:1 · "none is a real secret" restates line 2's rule as a claim of fact that a future edit can silently make false. (code-review)
  • #15 · 2/10 · .env:1 · The branch's two commit messages disagree: 142c206 says all values are fake or empty, and c446c0c says a few are real and public. (code-review)
  • #16 · 2/10 · .env:28 · SIDEKIQ_CREDS sits in .env but the app never reads it; only build.sh takes it from the shell as a BuildKit secret. (code-review)
🔧 Fix suggestions (0)

No automated fixes for this review.

📦 Dependency impact

Index disabled in config.yml, so no dependency impact was computed.

📊 Review detail & stats

Generated: 2026-11-18 · Day: Wednesday · Files changed: 1 (+2 -3 lines in this pass; +3 -0 for the whole PR)
Risk score: 1 · LOW · Required reviewer: entry

Risk factors detected: .env is not in the risk map, so it got the unmatched-file floor of 1 point. Consider adding .env to .claude/review/config.yml.

Findings #1, #3, #6 and #8 describe header lines that c446c0c replaced. They stay open in the ledger because only /agent-review:address closes a finding.

Deterministic evidence:

  • AST/static rules: none
  • CI snapshot: unavailable (local run)
  • Cross-repo context: none

Agent summary for this pass (bands: Critical 9-10 · High 7-8 · Important 5-6 · Suggestions 3-4):

Agent Critical High Important Suggestions Confidence
Code Review (/code-review xhigh) 0 0 0 4 High
Security Review Agent 0 0 0 0 High
Testing & Quality Review Agent 0 0 0 0 High
Standards Compliance Review Agent 0 0 0 0 High
Total 0 0 0 4 -

Four more findings from this pass scored 2/10, below the Suggestions band. Two of this pass's findings matched earlier entries (#5 and #9) and got no new number.

Per-agent perspectives on blockers: none, there are no blockers.

Engine: code-review (from config) · effort xhigh (from config) · model opus (from config)
/code-review findings: found 8 · scored 8 · dropped 0 (scored findings under the
profile's cutoff may not appear in the lists above)

Review quality:

  • Average agent confidence: High · Consensus rate: 0% (one lane raised every finding) · Review time: about 6 minutes
  • Findings suppressed by approved learnings: 0
💬 How to act on this review

Every finding above is numbered. Severity ≥ 7 findings carry a checkbox and must each be fixed or
dismissed
before this review counts as passed; lower severities are advisory. This repo runs
reviews locally only, so work this ledger with /agent-review:address in a Claude Code session.
It fixes or dismisses findings (a reason code and explanation are required for a dismissal) and
keeps this comment in sync. Valid codes: false-positive, intentional, pre-existing,
deferred, duplicate, insufficient-evidence, other.

github-actions[bot]
github-actions Bot previously approved these changes Nov 18, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: the agent-review report for this head passes with no open blockers, and no repo rule or recorded check needs a person.

The first header said the file lists every env var the app reads, but
the app reads 19 vars that are not here (GOOGLE_ANALYTICS_VIEW_ID,
AWS_S3_CONFIG_BUCKET, ROLLBAR_ENV and more). It also said every value is
fake, but a few are real and public, such as APPLE_CLIENT_ID. The new
header claims only what holds: values are for local dev and test, and
none is a real secret.

The third line explained why tracking the file is safe. That is
rationale, not a constraint, so it lives here instead: dotenv-rails is
only in the development and test groups, and .dockerignore keeps /.env*
out of the image, so deployed envs never read this file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot dismissed their stale review November 18, 2026 20:38

agent-review: the bot took back its approval of 142c206 because the PR changed beyond merging in the default branch. Run /agent-review:re-review (or /agent-review:review) and post the report. The bot approves again when the report passes for the new head.

@jbirdjavi jbirdjavi changed the title Say in .env that it is tracked on purpose and holds only fake values Say in .env that it is tracked on purpose and holds no real secrets Nov 18, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: the agent-review report for this head passes with no open blockers, and no repo rule or recorded check needs a person.

@stage-branch-merger

Copy link
Copy Markdown

I see you added the "On Staging" label, I'll get this merged to the staging branch!

@jbirdjavi
jbirdjavi merged commit c505065 into master Nov 18, 2026
15 checks passed
@jbirdjavi
jbirdjavi deleted the gt-3111-env-placeholder-note branch November 18, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant