fix(security): Confirm repo-provided setup script before running#3804
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
8ee7112 to
bd00bef
Compare
4fe2690 to
983fcb0
Compare
bd00bef to
be5d307
Compare
983fcb0 to
db731e4
Compare
be5d307 to
98953ce
Compare
db731e4 to
ee998b2
Compare
98953ce to
0f3f6db
Compare
ee998b2 to
9dd79b8
Compare
0f3f6db to
2dd6bde
Compare
There was a problem hiding this comment.
Security-sensitive fix (gating repo-provided setup script execution behind explicit confirmation), but both flagged review concerns are verifiably fixed in the diff — approval is keyed to the exact script text (re-prompts if the script changes, addressing veria-ai's reuse concern) and the hydration race greptile flagged is now guarded before reading persisted approvals — and a security-focused agent reviewer's latest comment confirms no open security concerns remain, giving independent assurance over the risky surface.
- Author wrote 0% of the modified lines and has 19 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
- Greptile raised an unresolved architectural point (discussion comment) that this introduces a second, parallel authorization system alongside the existing permission-tool flow — a design concern worth follow-up, not a blocking defect.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 84L, 5F substantive, 260L/9F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (260L, 9F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ bf27356 · reviewed head 2dd6bde |
9dd79b8 to
120d2f2
Compare
2dd6bde to
0eb97b8
Compare
|
😎 This pull request was merged. |
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
|
Note 🤖 stamphog reviewed This is a security-sensitive change to the setup-script execution/authorization flow (RCE fix), and both bot reviews are stale (older commit). Greptile's unaddressed architecture/security concern — that this introduces a second, ad-hoc authorization system (a raw window.confirm) parallel to the project's established permission-tool flow, with separate persistence/auditing behavior — is not resolved in the current diff and was never responded to.
Gate mechanics and policy version
Updated in place — this replaces 2 earlier stamphog review(s) on this PR. |
0eb97b8 to
fd3a090
Compare

Problem
Resolves VERIA-353: RCE via untrusted repository configuration.
Changes
Ask before running a repo-provided environment setup script, and stop silently auto-selecting the first repo-provided environment. The prompt is shown on every run rather than remembered: the script text does not determine what the command does, so a stored approval for
npm run setupwould still hold after the repository changed what that runs.How did you test this?
Unit tests in
@posthog/ui: the confirm gate returns the user's answer, prompts on every run, and warns that the script can execute other repository files; the selector never selects an environment on its own.Automatic notifications