chore(security): disable install scripts by default in /web - #10391
chore(security): disable install scripts by default in /web#10391dev-hari-prasad wants to merge 1 commit into
Conversation
…ed git repos in /web Revert global enableScripts in web/.yarnrc.yml to Yarn's secure default (false) to prevent arbitrary lifecycle scripts from running on install. Allowlist only ttf2woff2 and unrs-resolver via dependenciesMeta.built in web/package.json, keeping promotional/unneeded scripts blocked. Narrow approvedGitRepositories to pgadmin-org/react-data-grid.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe Yarn configuration now restricts approved Git repositories, removes explicit script enablement, and marks ChangesYarn installation policy
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: 🟡 Moderate · up to This change restricts Yarn Git access and disables install scripts by default, but the repository allowlist appears to contain an organization-name typo that can break dependency installation in fresh environments. Correct the allowlist before merging. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Part of #10363
Following up on Dave's feedback, this drops the global
enableScripts: truefromweb/.yarnrc.ymlso we're back to Yarn's safe default of blocking install scripts.To keep things building properly,
ttf2woff2andunrs-resolverare explicitly allowlisted viadependenciesMetainweb/package.json. The only other script in the tree (core-js) is just a funding banner, so that stays blocked.I also narrowed down
approvedGitRepositoriesto justpgadmin-org/react-data-gridwhile touching the config.Tested locally with
yarn install --immutable, the linter, and Jest tests all ran and passed without issues.Summary by CodeRabbit