harden: deep-freeze PROGRAM_IDS, STAKE_PROGRAM_IDS, and STAKE_IX#189
harden: deep-freeze PROGRAM_IDS, STAKE_PROGRAM_IDS, and STAKE_IX#1890x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
as const is compile-time only — it does NOT prevent runtime mutation. Without Object.freeze, a supply-chain attack or prototype pollution could silently redirect program IDs: (PROGRAM_IDS as any).mainnet.percolator = "attacker-program"; Deep-freezes PROGRAM_IDS (both nested network objects + top-level), STAKE_PROGRAM_IDS, and STAKE_IX. Follows the precedent of IX_TAG which was frozen in PR dcccrypto#135. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 53 seconds. ⌛ 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: defaults Review profile: CHILL 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 |
Exported config objects declared as mutable Records could be mutated at runtime by compromised dependencies: - PYTH_SOLANA_FEEDS: oracle feed poisoning (wrong mint-to-feed map) - SLAB_TIERS_V1M/V1M2/V_ADL/V_SETDEXPOOL/V12_1: corrupt layout detection, wrong slab sizes for market creation Deep-freezes each object and its inner entries after their population loops complete. Follows the IX_TAG freeze precedent (PR dcccrypto#135) and PROGRAM_IDS freeze (PR dcccrypto#189). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
as constis compile-time only — it does NOT prevent runtime mutationObject.freeze, a supply-chain attack or prototype pollution could silently redirect program IDs:PROGRAM_IDS(both nested network objects + top-level),STAKE_PROGRAM_IDS, andSTAKE_IXIX_TAGwhich was frozen in PR fix(abi): remove redundant IX_TAG mutations, freeze object #135Objects frozen:
PROGRAM_IDSSTAKE_PROGRAM_IDSSTAKE_IXTest plan
PROGRAM_ID,STAKE_PROGRAM_ID) still work — they return early before touching frozen objects🤖 Generated with Claude Code