[CEL-1522] Allow version-pinned npm: aliases of allowed private packages - #24
Conversation
The e-label frontend pins its public scan renderer to a frozen release via a registry alias: @cellarnode/ui-renderer-0-154 -> npm:@cellarnode/ui@0.154.0. The manifest guard rejected it three ways: the alias NAME is not in allowed_private_packages, the npm: value tripped the protocol check (which, unlike the lock validator's non_registry_protocol, had no npm: exemption), and the scope slash in the alias value tripped the path-or-archive heuristic. Allow exactly this shape and nothing wider: the alias name joins the allow-lists, and a value is exempt from the source checks only when it is anchored npm:@cellarnode/<allowed>@<version> with no whitespace, slashes, or backslashes in the version. Aliases pointing at public or unknown packages, path traversal in the version spec, and every previously rejected source shape still fail — fixtures added for all three.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe deployment validators now allow ChangesRenderer alias validation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Why
elabel-frontend#196 (CEL-1522 scan publication boundary) pins the public scan renderer to a frozen release via a registry alias:
"@cellarnode/ui-renderer-0-154": "npm:@cellarnode/ui@0.154.0". The deploy-static-website manifest guard rejects it three ways: unknown alias NAME,npm:protocol value (the manifest guard lacked the npm: exemption the lock validator'snon_registry_protocoldeliberately has), and the scope slash tripping the path-or-archive heuristic.What
Allow exactly this shape, nothing wider:
ui-renderer-0-154joins both allow-lists;npm:@cellarnode/<allowed>@<version>with no whitespace/slashes/backslashes in the version.Still rejected (fixtures added): alias to a public/unknown target (
npm:leftpad@1), path traversal in the version spec (@0.154.0/../../evil), and every previously rejected source shape (file:/git:/workspace:/shorthand/tgz).Verification
ruby .github/tests/deploy-static-lock-validator.test.rb→ 28 lock + 46 manifest fixtures pass (was 40; +3 cases × 2 script variants).Unblocks elabel-frontend#196 → CEL-1522/1523/1524 closure. Flagged in the goal report for Marcus's veto — this is shared deploy-guard infra.
🤖 Generated with Claude Code
Summary by cubic
Allows version-pinned
npm:aliases that target allowed private packages in the deploy manifest guard, unblocking the frozen renderer alias@cellarnode/ui-renderer-0-154->npm:@cellarnode/ui@0.154.0for CEL-1522.ui-renderer-0-154is added to both allow-lists.npm:@cellarnode/<allowed>@<version>with no whitespace, slashes, or backslashes in the version are exempt from source checks.Written for commit a84efe2. Summary will update on new commits.