Skip to content

Point the §2 scan at the published surface, and re-vendor the script that could not aim there - #9

Merged
MichalAFerber merged 1 commit into
mainfrom
shawn/s2-published-surface
Sep 7, 2026
Merged

MichalAFerber merged 1 commit into
mainfrom
shawn/s2-published-surface

Conversation

@MichalAFerber

Copy link
Copy Markdown
Member

DS §2 (v2.71.0 — MichalAFerber/tgwab-standards#180) makes the eval scan's target the published surface rather than the literal dist/. This repo is the case that produced that ruling.

Its files list ships both src and dist, and its default export is "." : "./src/index.js" — so import … from 'markdownwizard-tools' resolves to the source, and no-eval.sh dist covered only the ./iife subpath. The gate was aimed at the path most consumers do not use.

The script is re-vendored in the same change because it had to be

The copy this repo carried read only $1. ./scripts/no-eval.sh dist src would have scanned dist and dropped src silently — the widened gate would have looked widened and covered exactly what it did before.

Demonstrated here, in this repo, with one hazard planted in src/:

what ran exit output
new script, dist src 1 src/__negctl__.js:1 … new Function(
old script, dist src 0 eval-free: OK (dist) — the silent miss
new script, dist alone 0 confirms the hazard really is only in src

Removing the control returns the run to green: eval-free: OK (dist src). The output naming both targets is itself the evidence the second one is read.

No hazard was found or fixed

src/ scanned clean before this change and scans clean after — all 8 files, exit 0. This is a scope defect, not an incident: a control aimed at the wrong path. Writing it up as a hazard would invite someone to look, find nothing, and discount the rule.

Lint and the test suite are unchanged and green.

Merge order

The vendored scripts/no-eval.sh here is identical to templates/no-eval.sh on tgwab-standards#180, which is open. If that PR changes in review, re-sync this copy before merging — the two are meant to be byte-identical, and #180 adds the suite (scripts/no-eval.test.sh, 10 cases) that proves the fixed behavior.

Refs MichalAFerber/tgwab-standards#179

🤖 Generated with Claude Code

https://claude.ai/code/session_016beCydw4C9VrgL9eHzGUG2

…that

could not aim there

DS §2 (v2.71.0, tgwab-standards#180) makes the eval scan's target the
PUBLISHED SURFACE rather than the literal dist/. This repo is the case that
produced the ruling.

Its `files` list ships BOTH src and dist, and its default export is
`"." : "./src/index.js"` — so `import … from 'markdownwizard-tools'` resolves
to the SOURCE, and `no-eval.sh dist` covered only the `./iife` subpath. The
gate was aimed at the path most consumers do not use.

THE SCRIPT IS RE-VENDORED IN THE SAME CHANGE BECAUSE IT HAD TO BE. The copy
this repo carried read only "$1", so `./scripts/no-eval.sh dist src` would
have scanned dist and dropped src silently — the widened gate would have
looked widened and covered exactly what it did before. Demonstrated here, in
this repo, with one hazard planted in src/:

    new script, `dist src`   exit 1   src/__negctl__.js:1 ... new Function(
    OLD script, `dist src`   exit 0   "eval-free: OK (dist)"   <-- silent miss
    new script, `dist`       exit 0   the hazard really is only in src

Removing the control returns the run to green: `eval-free: OK (dist src)`.
The output naming both targets is itself the evidence the second is read.

NO HAZARD WAS FOUND OR FIXED. src/ scanned clean before this change and
scans clean after — all 8 files, exit 0. This is a scope defect, a control
aimed at the wrong path, not an incident. Lint and the test suite are
unchanged and green.

MERGE ORDER: the vendored scripts/no-eval.sh here matches
templates/no-eval.sh on tgwab-standards#180, which is open. If that PR
changes in review, re-sync this copy before merging — the two are meant to be
identical, and #180 adds the suite that proves it.

Refs MichalAFerber/tgwab-standards#179

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016beCydw4C9VrgL9eHzGUG2
@MichalAFerber
MichalAFerber marked this pull request as ready for review September 7, 2026 09:52
@MichalAFerber
MichalAFerber merged commit 1b1d7e1 into main Sep 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant