fix(security): drop persisted credentials before dependency lifecycle code - #894
Draft
seonghobae wants to merge 16 commits into
Draft
fix(security): drop persisted credentials before dependency lifecycle code#894seonghobae wants to merge 16 commits into
seonghobae wants to merge 16 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 was referenced Aug 17, 2026
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 snapshot:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9.Exact current head:
475adeba62109e1e34981baed22ce89728211108.Draft retained.
Test-first repair
The branch adds 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.Exact workflow evidence exposed two formatter-only defects before the substantive contract could be accepted:
4116a0d108f719e1a4382bdbe588ce762843f871failedciat Ruff import-layout formatting intest_security_audit_workflow_credentials.py; exact job logs were inspected before mutation;07160db4dd4559d03b9b095395beb2f19a1ee254passed Ruff check but exact release logs showedruff format --check src testswould still reformat the multi-lineCHECKOUT_MARKERassignment under the repository's 100-column formatter contract.Current head
475adeba62109e1e34981baed22ce89728211108contains only the formatter-equivalent test cleanup needed to satisfy both boundaries; the security invariant and production workflow behavior are unchanged by those follow-up commits.Production repair adds only:
to the checkout steps in
release.ymlandbandit.yml. The existingsecurity-audit.ymlrepair remains.CHANGELOG.mdanddocs/security/dependency-policy.mddescribe the lifecycle credential boundary.Ownership / non-duplication
This PR changes exactly six BandScope-owned files: three dependency-lifecycle workflows, the focused regression, CHANGELOG, and dependency policy. 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 repository evidence
Evidence here binds only to
475adeba62109e1e34981baed22ce89728211108.Terminal-success repository workflows are now:
cirun31993437323;build-baselinerun31993437353;releaserun31993437330;secret-scan-gaterun31993437361;sbomrun31993437328;banditrun31993437356; andSAST Semgreprun31993437327.Exact-head failures were inspected at job/log level before classification:
security-auditrun31993437352, job95280857480, reaches dependency audit after the checkout-credential hardening and fails only on the protected-base JavaScript setnanoid <3.3.18,pdfjs-dist >=5.6.83 <6.2.108, andundici 7.0.0-7.28.0; later Python/Rust audit stages are skipped and are not counted as success;Security Scanrun31993437347,trivy-fsjob95280857514, reports the protected-base HIGHCVE-2026-16633pdfjs-distfinding atpackage-lock.json:6370and directs remediation to the shared base.This branch has no dependency/root-lock delta, so those two failures remain canonical #783-owned inherited protected-base evidence. They are neither suppressed nor duplicated here. A current #867 security-audit log independently still showed
persist-credentials: trueon protected-base workflow state, confirming this PR repairs a real BandScope-owned lifecycle authority gap rather than papering over the dependency failure.Current inline review-thread inspection has no unresolved actionable thread. No queued, cancelled, failed inherited-base, predecessor-head, or protected-base result is counted as success.
Dependency / review order
Canonical #783 must establish the protected JavaScript dependency-security baseline. Current central required-workflow repair is read-only
.github#1020; it must reach protected centralmainbefore fresh central coverage/review evidence can count here. Historical.github#1008is closed unmerged and transfers no evidence. Reviewer agents must not be redispatched merely to reproduce the unchanged central trusted-uv 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, in-progress, skipped-required, failed inherited-base, predecessor-head, protected-base, model-only, self/author, or administrative-bypass evidence is not success.