fix(cli): mark public asymmetric JWKs scanner-safe in runtime bundles#691
Conversation
The runtime profile's scanner-safe predicate only checked the artifact kind, so RSA/ECDSA/Ed25519 entries emitted as public JWKs (no `d`/`p`/`q` or seed bytes) were still recorded as `scanner_safe: false` in the bundle manifest and audit-surface receipt. Consider the emitted format: those public-shaped outputs are scanner-safe, while PEM/DER private bytes, HMAC `k`, and token values remain non-scanner-safe.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
d/p/q/ seed bytes) were still recorded asscanner_safe: falseinmanifest.jsonandreceipts/audit-surface.json.runtime_entry_is_scanner_safe(kind, format)considers both: public-shaped formats (Jwk/Jwks) for asymmetric kinds are scanner-safe, while Pem/Der private bytes, HMACk, and token values remain non-scanner-safe.uselesskey bundle --profile runtime --format jwk, the audit surface now reportsruntime_material_count: 2(just hmac + token) instead of5.Reproduction (before)
After
The PEM/DER path is unchanged (
uselesskey bundle --profile runtime --format pemstill marks RSA/ECDSA/Ed25519 PEM artifacts asscanner_safe: false).Test plan
cargo test -p uselesskey-cli(all 26 + 1 new integration + 5 + 4 + 4 + 3 + 6 tests pass)cargo clippy -p uselesskey-cli --all-features --tests -- -D warningscargo fmt --checkruntime_public_jwk_outputs_are_scanner_safecovers the kind × format matrix.bundle_profile_runtime_jwk_marks_public_key_artifacts_scanner_safeexercises the full bundle flow and asserts the audit-surfaceruntime_material_count.Generated by Claude Code