sh-ast 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +147 -15
  2. package/dist/analyze/enumerate-commands.d.ts +5 -1
  3. package/dist/analyze/enumerate-commands.d.ts.map +1 -1
  4. package/dist/analyze/enumerate-commands.js.map +1 -1
  5. package/dist/analyze/index.d.ts +10 -2
  6. package/dist/analyze/index.d.ts.map +1 -1
  7. package/dist/analyze/index.js +11 -1
  8. package/dist/analyze/index.js.map +1 -1
  9. package/dist/analyze/resolve-argv0.d.ts +225 -16
  10. package/dist/analyze/resolve-argv0.d.ts.map +1 -1
  11. package/dist/analyze/resolve-argv0.js +372 -11
  12. package/dist/analyze/resolve-argv0.js.map +1 -1
  13. package/dist/analyze.d.ts +380 -157
  14. package/dist/errors.d.ts +14 -27
  15. package/dist/errors.d.ts.map +1 -1
  16. package/dist/errors.js +15 -28
  17. package/dist/errors.js.map +1 -1
  18. package/dist/sh-ast.d.ts +28 -32
  19. package/dist/syntax-operator.d.ts +9 -0
  20. package/dist/syntax-operator.d.ts.map +1 -0
  21. package/dist/syntax-operator.js +22 -0
  22. package/dist/syntax-operator.js.map +1 -0
  23. package/dist/syntax-print.d.ts +3 -1
  24. package/dist/syntax-print.d.ts.map +1 -1
  25. package/dist/syntax-print.js +3 -1
  26. package/dist/syntax-print.js.map +1 -1
  27. package/dist/syntax-snapshot.d.ts +4 -1
  28. package/dist/syntax-snapshot.d.ts.map +1 -1
  29. package/dist/syntax-snapshot.js +18 -3
  30. package/dist/syntax-snapshot.js.map +1 -1
  31. package/dist/syntax-wire.d.ts +12 -0
  32. package/dist/syntax-wire.d.ts.map +1 -1
  33. package/dist/syntax-wire.js +99 -15
  34. package/dist/syntax-wire.js.map +1 -1
  35. package/dist/syntax.d.ts +12 -10
  36. package/dist/syntax.d.ts.map +1 -1
  37. package/dist/syntax.js +46 -33
  38. package/dist/syntax.js.map +1 -1
  39. package/dist/wasm-instance.d.ts +8 -0
  40. package/dist/wasm-instance.d.ts.map +1 -1
  41. package/dist/wasm-instance.js +36 -8
  42. package/dist/wasm-instance.js.map +1 -1
  43. package/package.json +1 -1
  44. package/shim/sh-ast.wasm +0 -0
  45. package/dist/parse-depth-guard.d.ts +0 -11
  46. package/dist/parse-depth-guard.d.ts.map +0 -1
  47. package/dist/parse-depth-guard.js +0 -633
  48. package/dist/parse-depth-guard.js.map +0 -1
@@ -27,20 +27,33 @@ import type { WordResolution } from './resolve-word.js';
27
27
  */
28
28
  export interface WrapperSpec {
29
29
  /**
30
- * The literal, exact argv0 text (after quote/escape removal) that
31
- * identifies this wrapper — e.g. `['env']`. Matched only against a
32
- * `static: true` word; see {@link WrapperSpec}'s doc comment.
30
+ * The command name that identifies this wrapper — e.g. `['env']`.
31
+ * Matched only against a `static: true` word; see {@link WrapperSpec}'s
32
+ * doc comment.
33
33
  *
34
- * Matching is **exact-name-only** — never basename matching. `sudo` does
35
- * not match `/usr/bin/sudo` or `./sudo`; only a word whose *entire*
36
- * resolved text equals one of `names` is recognized. This is a
37
- * deliberate, narrower-than-real-world policy choice (a real shell would
38
- * happily run `/usr/bin/sudo`), not an oversight: silently treating any
39
- * path *ending in* a known wrapper name as that wrapper would be a
40
- * different, broader matching policy this package isn't making on a
41
- * caller's behalf. A caller who wants path-aware matching can express it
42
- * explicitly via a custom {@link ResolveArgv0Options.transparentWrappers}
43
- * table (e.g. `names: ['sudo', '/usr/bin/sudo']`).
34
+ * Matching first searches the entire table for an exact name. Only when
35
+ * no exact entry exists does it try an absolute path's final segment:
36
+ *
37
+ * 1. Its entire resolved text (after quote/escape removal) equals one of
38
+ * `names`: `env`, or a path a caller listed verbatim. An exact path
39
+ * entry takes precedence over a plain-name entry even if listed later.
40
+ * 2. It is an **absolute path** (starts with `/`) whose final segment
41
+ * equals one of `names`: `/usr/bin/env`, `/usr/bin/sudo`, `/opt/x/nice`
42
+ * and `/usr//bin/env` resolve as `env`, `sudo` and `nice`. The chain
43
+ * keeps the word as written, so a consumer still sees the path.
44
+ *
45
+ * Relative paths and paths with a trailing slash do not use the
46
+ * final-segment fallback. They can still match an explicitly listed name,
47
+ * such as `./with-retry` or `/opt/with-retry/`. Custom plain names also
48
+ * acquire absolute-path aliases; a path-only name does not acquire aliases
49
+ * for other paths with the same final segment.
50
+ *
51
+ * This is a lexical analysis assumption, not executable identity:
52
+ * `PATH` is not consulted and the filesystem is not read. Without an
53
+ * exact override, an unrelated executable named `/opt/mytools/env` uses
54
+ * the `env` entry's grammar. The chain preserves the original path so
55
+ * callers can apply their own policy. A word with an expansion
56
+ * (`"$dir/env"`) is not `static` and is never matched.
44
57
  */
45
58
  readonly names: readonly string[];
46
59
  /**
@@ -178,6 +191,145 @@ export interface WrapperSpec {
178
191
  * @public
179
192
  */
180
193
  export declare const DEFAULT_TRANSPARENT_WRAPPERS: readonly WrapperSpec[];
194
+ /**
195
+ * A data-only description of one shell interpreter whose `-c` option makes the
196
+ * next operand a command string run by that shell (`bash -c 'rm x'`). Like
197
+ * `env -S`, the command that runs lives *inside* an operand, so
198
+ * {@link resolveArgv0} reports `'embedded-command'` instead of the
199
+ * interpreter's own name as the effective command.
200
+ * The selector `c` is reserved: exact-token fields (`noOperandLongOptions`,
201
+ * `operandLongOptions`, `optionTerminatorWords`) cannot contain `-c`.
202
+ *
203
+ * Only the option grammar needed to decide *whether `-c` is an option* is
204
+ * described: which options consume an operand word (so that `-o c` or
205
+ * `-o pipefail -c` are not misread) and where option parsing ends. Everything
206
+ * else about the interpreter — what its other options mean, whether a given
207
+ * option name is valid — is irrelevant to that decision and unmodeled; an
208
+ * invalid invocation that a real shell would reject is still reported
209
+ * conservatively, since nothing is guessed about what it would run.
210
+ *
211
+ * Option parsing ends at the first statically known word that is not an
212
+ * option, at `--`, at a lone `-`, or at a table-defined terminator; afterwards
213
+ * a word shaped like `-c` is an ordinary script operand. A dynamic word in
214
+ * option position leaves the question undecidable, so scanning stops and the interpreter is reported
215
+ * exactly as before (its own static name). In that case `static: true` means
216
+ * only that the interpreter's name is known; it does not mean the command is a
217
+ * plain shell invocation, because `bash "$f" -c x` runs `x` when `$f` is `-x`.
218
+ *
219
+ * This shape may grow new optional fields in a **minor** release; existing
220
+ * fields' meaning never changes.
221
+ *
222
+ * @public
223
+ */
224
+ export interface EmbeddedCommandInterpreterSpec {
225
+ /**
226
+ * The interpreter's name, matched against a static command word's final
227
+ * path segment: `bash`, `/bin/bash` and `/usr/local/bin/bash` all match
228
+ * `['bash']`. Only the command word is reduced to its final segment;
229
+ * entries containing `/` (such as `['/bin/bash']`) are rejected with
230
+ * {@link ShAnalyzeInvalidWrapperSpecError}. Use `['bash']` to recognize
231
+ * path-qualified invocations. The first entry containing the segment wins.
232
+ *
233
+ * Unlike {@link WrapperSpec.names}, which tries exact names first and
234
+ * falls back to the final segment only for absolute paths, interpreter
235
+ * matching uses only the final segment, including for relative paths
236
+ * such as `./bash`. The question here is whether a command string is
237
+ * embedded, not which executable would be located.
238
+ */
239
+ readonly names: readonly string[];
240
+ /**
241
+ * Single option letters (without a sign) that take a name or value operand
242
+ * under both `-` and `+`, e.g. `['o']` for `-o pipefail` / `+o pipefail`.
243
+ * A letter listed here never selects the command string itself, so
244
+ * `bash -o c script` keeps `c` as an option *name*.
245
+ * The selector `c` is reserved and cannot be listed as an operand option;
246
+ * conflicting entries throw {@link ShAnalyzeInvalidWrapperSpecError}.
247
+ */
248
+ readonly operandOptions: readonly string[];
249
+ /**
250
+ * How an {@link EmbeddedCommandInterpreterSpec.operandOptions} letter
251
+ * receives its operand inside a clustered word:
252
+ *
253
+ * - `'separate-word'` — always the next word; remaining letters in the
254
+ * cluster are still options (`bash -oc errexit 'cmd'` is `-o errexit -c`).
255
+ * - `'rest-of-cluster'` — the remainder of the word if any, else the next
256
+ * word; later letters in the same word are part of the operand
257
+ * (`zsh -oc` names an option `c`).
258
+ */
259
+ readonly operandAttachment: 'separate-word' | 'rest-of-cluster';
260
+ /**
261
+ * Letters from {@link EmbeddedCommandInterpreterSpec.operandOptions} whose
262
+ * separate operand may be omitted before a word beginning with `-` or `+`.
263
+ * An attached operand still belongs to the option. For example, ksh93u+
264
+ * treats `-o -c cmd` and `+o -c cmd` as an operand-free option listing
265
+ * followed by `-c`; bash, dash and zsh consume `-c` as the option name.
266
+ * A dynamic potential operand makes this distinction undecidable.
267
+ */
268
+ readonly optionalOperandOptions?: readonly string[];
269
+ /**
270
+ * No-operand letters that end option scanning after the current cluster,
271
+ * under either sign. Remaining letters in that cluster still take effect:
272
+ * zsh's `-b -c script` runs the file `-c`, but `-bc cmd` selects a string.
273
+ * These letters must not include `c` or an operand-taking letter.
274
+ */
275
+ readonly optionTerminatorLetters?: readonly string[];
276
+ /**
277
+ * Additional whole words that end option scanning, like zsh's `+` and `+-`.
278
+ * The terminator is not a command string; an already-selected `-c` needs
279
+ * a following word. `--` and a lone `-` are always terminators.
280
+ */
281
+ readonly optionTerminatorWords?: readonly string[];
282
+ /**
283
+ * Exact long-option words that take a separate operand, recognized before
284
+ * short-option clusters regardless of prefix: bash's `--rcfile FILE` and
285
+ * `-rcfile FILE`, or zsh's `--emulate sh`. A dynamic operand stops scanning
286
+ * because its expansion may produce multiple actual arguments.
287
+ */
288
+ readonly operandLongOptions?: readonly string[];
289
+ /**
290
+ * Exact long-option words with no operand, recognized before short-option
291
+ * clusters. Bash's `-restricted` and `-noprofile` are whole long options,
292
+ * not clusters containing `c` or `o`. Unlisted `--name` / `+-name` words
293
+ * are also treated as operand-free; option validity is not checked.
294
+ */
295
+ readonly noOperandLongOptions?: readonly string[];
296
+ /**
297
+ * `true` if the interpreter also treats `+c` as selecting the command
298
+ * string. Other shells do not select command mode with `+c`.
299
+ */
300
+ readonly plusCSelectsCommand?: boolean;
301
+ }
302
+ /**
303
+ * `sh-ast/analyze`'s default {@link EmbeddedCommandInterpreterSpec} table:
304
+ * the shells whose `-c` option makes {@link resolveArgv0} report
305
+ * `'embedded-command'`. Each entry's option grammar is hand-derived from the
306
+ * cited manual. Basic clusters and required operands were cross-checked on
307
+ * Linux bash 5.2.21, dash 0.5.12, zsh 5.9, ksh93u+m 1.0.8 and mksh R59.
308
+ * Long-option, termination and omitted-operand cases were checked on macOS
309
+ * bash 5.3.9 and 3.2.57 (also `/bin/sh`), Apple dash-16, zsh 5.9 and ksh93u+
310
+ * AJM 2012-08-01. Omitted `-o`/`+o` operands before another signed option
311
+ * were confirmed only on that ksh93u+ build, not ksh93u+m or mksh. Builds can
312
+ * differ: macOS's ksh93u+ differs from the cited 93u+m for `ksh -o c "echo X"`.
313
+ * The `sh` entry also models bash's long options because `sh` can be bash.
314
+ * Named options that change the option grammar itself (such as zsh's
315
+ * `shoptionletters`) are not interpreted; a custom table is needed for that
316
+ * grammar. It is data, not policy:
317
+ * it names no dangerous commands and a caller can replace or extend it via
318
+ * {@link ResolveArgv0Options.embeddedCommandInterpreters}; an empty array
319
+ * restores the behavior in which an interpreter is an ordinary effective
320
+ * command.
321
+ *
322
+ * Frozen, including each entry and its arrays.
323
+ *
324
+ * @see https://www.gnu.org/software/bash/manual/bash.html#Invoking-Bash — bash
325
+ * @see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html — POSIX `sh`
326
+ * @see https://man7.org/linux/man-pages/man1/dash.1.html — dash(1)
327
+ * @see https://zsh.sourceforge.io/Doc/Release/Invocation-and-Startup.html — zsh
328
+ * @see https://github.com/ksh93/ksh — ksh93u+m `sh(1)`
329
+ * @see https://man.mirbsd.org/mksh.1 — mksh(1)
330
+ * @public
331
+ */
332
+ export declare const DEFAULT_EMBEDDED_COMMAND_INTERPRETERS: readonly EmbeddedCommandInterpreterSpec[];
181
333
  /**
182
334
  * Options accepted by {@link resolveArgv0}.
183
335
  *
@@ -199,6 +351,19 @@ export interface ResolveArgv0Options {
199
351
  * flag matching.
200
352
  */
201
353
  readonly transparentWrappers?: readonly WrapperSpec[];
354
+ /**
355
+ * The shell interpreters whose `-c` operand is reported as an
356
+ * `'embedded-command'`. Defaults to
357
+ * {@link DEFAULT_EMBEDDED_COMMAND_INTERPRETERS}. Pass a replacement array to
358
+ * add or drop interpreters; an empty array disables the behavior, so every
359
+ * interpreter resolves as an ordinary effective command.
360
+ *
361
+ * Validated at the {@link resolveArgv0} boundary like
362
+ * {@link ResolveArgv0Options.transparentWrappers}: the table must be an
363
+ * array. A non-array value (including `null`) or malformed entry throws
364
+ * {@link ShAnalyzeInvalidWrapperSpecError}; only `undefined` uses defaults.
365
+ */
366
+ readonly embeddedCommandInterpreters?: readonly EmbeddedCommandInterpreterSpec[];
202
367
  }
203
368
  /**
204
369
  * Why {@link resolveArgv0} couldn't identify a single, definite effective
@@ -215,7 +380,10 @@ export interface ResolveArgv0Options {
215
380
  * - `'embedded-command'` — a wrapper flag whose value structurally embeds
216
381
  * the real command rather than naming it as a separate word (e.g.
217
382
  * `env -S 'rm -rf /'` — see {@link WrapperSpec.unresolvableFlags}'s doc
218
- * comment).
383
+ * comment), or a shell interpreter's `-c` option (`bash -c 'rm x'`, see
384
+ * {@link EmbeddedCommandInterpreterSpec}). In both cases the chain's
385
+ * second-to-last element is the wrapper or interpreter word, so its name
386
+ * stays available.
219
387
  * - `'ambiguous-assignment'` — a statically known assignment operand whose
220
388
  * acceptance differs across supported utility implementations, such as
221
389
  * `env =value cmd` (GNU/glibc accepts an empty name; BSD rejects it).
@@ -271,6 +439,22 @@ export interface Argv0Resolution {
271
439
  * one element.
272
440
  */
273
441
  readonly chain: readonly Argv0ChainWord[];
442
+ /**
443
+ * Indices into the input {@link CommandSite.argv}, one for each corresponding
444
+ * {@link Argv0Resolution.chain} entry. The arrays always have the same nonzero
445
+ * length. Ordinary entries identify their original word; synthesized failures
446
+ * identify the triggering flag or ambiguous assignment operand instead.
447
+ * Repeated word text does not collapse distinct argument positions.
448
+ *
449
+ * For a resolved effective command, its arguments are
450
+ * `site.argv.slice(chainIndices.at(-1)! + 1)`. Sites from
451
+ * {@link enumerateCommands} align argv directly with `site.node.Args`, retaining
452
+ * null slots as unsupported word resolutions, so the same indices select syntax
453
+ * Words. A synthetic failure does not identify a command or its arguments.
454
+ * When wrapper scanning stops or runs out of operands, the existing result
455
+ * remains the wrapper word and its index; no missing command is invented.
456
+ */
457
+ readonly chainIndices: readonly number[];
274
458
  /**
275
459
  * The last element of {@link Argv0Resolution.chain} — the effective
276
460
  * command, or, if resolution hit a statically-unknowable word anywhere
@@ -316,7 +500,7 @@ export interface Argv0Resolution {
316
500
  * command) or add their own (e.g. a project's `with-retry` helper) and
317
501
  * both directions are followed identically to any built-in entry.
318
502
  *
319
- * **A statically-unknowable word is never guessed through** — three
503
+ * **A statically-unknowable word is never guessed through** — four
320
504
  * distinct cases all stop the chain immediately at that word rather than
321
505
  * falling back to any other guess:
322
506
  *
@@ -337,6 +521,30 @@ export interface Argv0Resolution {
337
521
  * reports `effective: { static: false, reason: 'embedded-command' }`
338
522
  * (see {@link WrapperSpec.unresolvableFlags}'s doc comment).
339
523
  *
524
+ * 4. The effective command is a shell interpreter
525
+ * ({@link DEFAULT_EMBEDDED_COMMAND_INTERPRETERS}) invoked with `-c` —
526
+ * `bash -c "$x"`, `sudo sh -ec ls` — and the command that runs is
527
+ * inside the string operand. The result is the same
528
+ * `'embedded-command'` shape `env -S` produces: the interpreter word is
529
+ * `chain.at(-2)` and `chainIndices.at(-1)` is the option word that
530
+ * selected `-c`. `bash script.sh`, `bash -e script.sh`, `bash -- -c`
531
+ * and `bash -o c` are not `-c` invocations and resolve to `bash` as
532
+ * before. A dynamic word in option position (`bash "$f" -c x`,
533
+ * `bash -c"$y" x`) is undecidable, so the interpreter stays a static
534
+ * `bash`: `static: true` then means only that the name is known, not that
535
+ * the command is a plain shell invocation. The `-c` string itself is never
536
+ * parsed.
537
+ *
538
+ * Known limits: the table models common option spellings, not a full
539
+ * emulation of each shell's option parser. Unusual spellings can be
540
+ * misclassified in either direction:
541
+ *
542
+ * - Bash/sh single-dash long options after a short option, e.g. `bash -e -rcfile M`.
543
+ * - `ksh -c +c M`, or a dynamic word after `-c` that expands to an option.
544
+ * - mksh's selector-bearing operands in `mksh -o -c M` and `mksh -o +c M`.
545
+ * - A lone `+` before `-c`, e.g. `bash + -c M`.
546
+ * - Zsh grammar switches, e.g. `zsh -o shoptionletters -b -c M`.
547
+ *
340
548
  * `VAR=val` shell-assignment prefixes on the `CallExpr` itself
341
549
  * (`CommandSite.node.Assigns`, e.g. `FOO=bar rm x`) are always skipped and
342
550
  * counted in {@link Argv0Resolution.assignmentsSkipped} — a mechanism
@@ -351,7 +559,8 @@ export interface Argv0Resolution {
351
559
  * least one argv word; see its doc comment), not a "malformed shell
352
560
  * source" case.
353
561
  * @throws {@link ShAnalyzeInvalidWrapperSpecError} if
354
- * `options.transparentWrappers` contains a malformed entry (see
562
+ * `options.transparentWrappers` or `options.embeddedCommandInterpreters`
563
+ * contains a malformed entry (see
355
564
  * {@link ResolveArgv0Options.transparentWrappers}'s doc comment).
356
565
  * @public
357
566
  */
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-argv0.d.ts","sourceRoot":"","sources":["../../src/analyze/resolve-argv0.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAElC;;;;;;;OAOG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,KAAK,GAAG,MAAM,CAAC;IAElE,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC;;;;;OAKG;IACH,QAAQ,CAA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