fix(security): ignore developer-local environment files - #214
Closed
seonghobae wants to merge 5 commits into
Closed
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 10, 2026
Closed
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.
Purpose
Fix #213 test-first from exact protected
develop@622e5e6c3d534f230c390f10e3832efadfc01825. Local deployment credentials are externalized through environment variables, but protected source historically allowed developer-local.envfiles to enter both Git and Docker build-context evidence paths.This direct-
developDraft changes only root.gitignore, root.dockerignore, and one focused repository-policy test. It does not add an environment file, secret value, credential generator, Compose-password change, scanner suppression, or credential-store implementation.Exact current identity
develop@622e5e6c3d534f230c390f10e3832efadfc01825;security/ignore-local-env-files-622e5e6;541a7fd875b2bbe1d37cc708481bcb59fc6f5398;b6a673515da775505ab85bcc24c75956abaf9e80;f73d4c460634a125ce0f087f81f56a56b4c01a46;3e37e937cc45d6bf40e9c6b39cf5c1de93aebe6c;70d1f3087c0a19da4820a88c28179b47a9ba2101;Every check/review from a predecessor source head is historical after movement.
RCA
.gitignorehad no.env/.env.*rule..dockerignoreindependently lacked those rules while the production Dockerfile usesCOPY . .in the build stage..gitignorealso does not govern Docker build transfer/cache.TDD evidence
RED 1 — Git tracking boundary
Fail-first
541a7fd875b2bbe1d37cc708481bcb59fc6f5398added onlyRepositorySecretFilePolicyTest. It discovers the repository root independently of Maven module working directory and requires:CI
31359234145, macOS job93364640620, checked synthetic merge21ebba7a3f04eeb413af67affe8615c53828e873and ran 276 ETL tests with exactly one failure, zero errors/skips: root.gitignoredid not ignore.env. This reached the intended repository-policy boundary rather than setup/import/fixture/dependency failure.GREEN 1 — Git tracking boundary
b6a673515da775505ab85bcc24c75956abaf9e80changed only root.gitignoreand added the three rules. Hosted CI then passed the focused contract and full reactor on the merge preview.RED 2 — Docker build-context boundary
After the Git boundary was green, test-only
f73d4c460634a125ce0f087f81f56a56b4c01a46extended the production-policy contract before.dockerignorechanged. The test requires the same rules in root.dockerignorebecauseDockerfileusesCOPY . ..CI
31359631408, macOS job93365758840, checked synthetic merge397d406f81ba30e2c6d2f34f9cba199490ccffe8and ran 277 ETL tests with exactly one failure, zero errors/skips:RepositorySecretFilePolicyTest.localEnvironmentFilesAreExcludedFromDockerBuildContext—root .dockerignore must ignore .env.The existing Git-boundary assertion remained green. This is valid second RED at the Docker build-context boundary.
GREEN 2 — exact current source
3e37e937cc45d6bf40e9c6b39cf5c1de93aebe6cThe smallest correction adds only the three environment-file rules to root
.dockerignore. Exact comparison to RED 2 is one fast-forward commit, ahead 1 / behind 0, merge base exactlyf73d4c..., with.dockerignoreas the only changed file and three additions.The final policy is therefore independently enforced by Git and Docker context boundaries while explicitly permitting a separately reviewed non-secret
.env.exampleif one is intentionally introduced later. This PR does not create that template or imply any credential values.Current hosted verification
Every exposed pull-request workflow aggregate associated with exact current source
3e37e937cc45d6bf40e9c6b39cf5c1de93aebe6cis terminal-success:31359696114: success on macOS, Ubuntu and Windows;31359696100: success;31359696115: success;31359696080: success;31359696123: success.CI macOS job
93365948358checked synthetic merge70d1f3087c0a19da4820a88c28179b47a9ba2101, not the literal source head. On that integration tree:RepositorySecretFilePolicyTest: 2/2 green;BUILD SUCCESS.This is strong causal and merged-tree compatibility evidence, not accepted literal-source proof.
Shared evidence boundaries
The same current CI still reproduces the inherited JaCoCo false green:
Analyzed bundle 'etl-service' with 0 classesfollowed byAll coverage checks have been met.#162/#164 owns selected ETL non-vacuity, #205 owns repository-wide owned-production coverage scope, #121/central controls own accepted literal-source evidence, and #196 owns Maven vulnerability dependency-graph completeness. The current protected merge preview also still contains diagnostic-confidentiality defects already owned by #170–#176/#210–#212; this PR does not duplicate them.
No qualifying independent non-author formal
APPROVEDreview exists on the exact current head. No status/check/model output is promoted to approval.Scope / relationship
Merge boundary
Keep Draft. Merge only when the unchanged exact source head has accepted literal-source deterministic/security evidence, complete same-revision dependency/vulnerability evidence, non-vacuous applicable owned-production coverage, every required repository/security gate, zero valid unresolved findings, and qualifying independent non-author formal approval where governance requires it. No predecessor-head, other-PR, incomplete-scanner, status-only, skipped-required or synthetic-merge-only evidence transfers.