fix(security): drop persisted credentials before dependency lifecycle code - #894
Draft
seonghobae wants to merge 14 commits into
Draft
fix(security): drop persisted credentials before dependency lifecycle code#894seonghobae wants to merge 14 commits into
seonghobae wants to merge 14 commits into
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 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.
Security boundary
BandScope dependency-lifecycle workflows must not leave checkout credentials persisted in Git configuration while untrusted npm/Python dependency code executes. Protected
developalready had a compliant cross-platform build boundary, and canonical #783 owns the equivalentci.ymlhardening; exact-current-code inspection found three BandScope-owned remaining lifecycle paths with default checkout credential persistence:security-audit,release, andbandit.Protected base:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9.Exact current head:
f4f2e2ebf24ac33468035a67389d06e998eaf1c3.Draft retained.
Test-first repair
The branch first added a repository contract test that extracts the checkout step itself and requires
persist-credentials: falsefor:.github/workflows/security-audit.yml;.github/workflows/release.yml; and.github/workflows/bandit.yml.The helper deliberately stops at the next workflow step, so a later action's unrelated
persist-credentials: falsecannot satisfy the checkout contract. A separate regression locks that false-positive boundary.The first exact workflow attempt after broadening the contract failed in release-preflight at Ruff import ordering before reaching the substantive assertion. That exact job/log was inspected before further editing, and the test was made formatter-clean. Source-level comparison on the resulting RED contract proved
security-auditcompliant whilereleaseandbanditstill lacked the checkout option; queued runs were not counted as executed RED evidence.Production repair then added only:
to the checkout steps in
release.ymlandbandit.yml. The existingsecurity-audit.ymlrepair remains unchanged.CHANGELOG.mdanddocs/security/dependency-policy.mddescribe the lifecycle credential boundary.Ownership / non-duplication
This PR changes only BandScope-owned workflow/test/policy surfaces. It deliberately does not modify
ci.yml, because canonical dependency-security PR #783 already owns the relevant CI checkout-credential hardening together with the coordinated npm/PDF.js/Nanoid/Undici baseline.build-baseline.ymlwas already compliant. CodeQL lifecycle files remain owned by #780.No dependency version, root lockfile, vulnerability suppression, review-agent credential, application permission, database, model, network, filesystem, or IPC authority is added or weakened.
Security rationale
actions/checkoutsupports disabling persisted credentials. Dependency installation and audit steps execute code supplied by dependency ecosystems; those steps do not require authenticated Git writes. Removing the persisted checkout credential therefore reduces ambient authority without weakening repository read access, security gates, or release evidence.Exact-current-head evidence
A fresh repository workflow cycle has been emitted for exact head
f4f2e2ebf24ac33468035a67389d06e998eaf1c3. At the latest refresh all nine repository workflows were still queued, so none is counted as current success:ci31987203171;bandit31987203198;security-audit31987203217;build-baseline31987203284;sbom31987203267;secret-scan-gate31987203294;release31987203352;SAST Semgrep31987203252; andSecurity Scan31987203226.Any failed exact-head job must be inspected at job/check-run/annotation/log level before another edit or rerun. If whole-tree npm/Trivy findings reproduce the protected-base
nanoid/pdfjs-dist/undiciset, classify them as inherited #783 evidence only after that exact-current-head inspection; never suppress or duplicate them here.Dependency / review order
Canonical #783 must establish the protected JavaScript dependency-security baseline. Current central required-workflow repair is read-only and follows the live
.githubprerequisite chain; historical.github#1008is closed unmerged and transfers no evidence. Reviewer-agent dispatches must not be repeated merely to reproduce an unchanged central prerequisite.There is no qualifying independent non-author last-push approval for this exact head.
Merge gate
Keep Draft and unmerged until the unchanged then-current head has terminal-success repository and central CI, exact owned statement/branch coverage and docstrings where applicable, SAST/security/SBOM/supply-chain/package/release evidence, zero valid unresolved findings, canonical dependency/central prerequisites integrated and regenerated, a qualifying independent non-author last-push approval, and ordinary branch-protection acceptance. Queued, skipped-required, failed, predecessor-head, protected-base, model-only, self/author, or administrative-bypass evidence is not success.