Commit 17b63dd
committed
fix(wizard): tighten dlx allowlist + cover yarn dlx + dedupe e2e import
Three small follow-ups from the latest review pass:
- isAllowedDlxCommand used \`rest.startsWith(t)\`, which would let
\`bunx drizzle-kit-malicious\` slip through on \`drizzle-kit\`.
Tighten to a token-boundary match (\`rest === t || rest.startsWith(\`\${t} \`)\`)
so only the exact tool or the tool followed by a space matches.
- errors-runner.test.ts covered npx/bunx/pnpm dlx but not yarn dlx —
add the missing case to both \`classifyError\` and \`classifyHttpError\`
suites for symmetry.
- e2e/tests/package-managers.e2e.test.ts had two separate
\`node:child_process\` imports (\`execFileSync\` and \`spawnSync\`).
Merge into one.
Out of scope from the same review pass: the pre-existing
\`excludeOperatorFamily || true\` in supabase-migration.ts (introduced
2026-04-28, before this branch); the duplicate \`migrationHeader\` in
the test file (already triaged in prior review); the runner.ts
duplication between protect/drizzle (explicitly out-of-scope per the
plan).1 parent b9c2c30 commit 17b63dd
3 files changed
Lines changed: 17 additions & 3 deletions
File tree
- e2e/tests
- packages/wizard/src
- __tests__
- agent
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
42 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
0 commit comments