@piercebarney/whs-eleventy 2026.10.2 → 2026.10.3

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.
package/lib/compliance.js CHANGED
@@ -241,14 +241,22 @@ const CHECKS = {
241
241
  },
242
242
 
243
243
  "client-logic": () => {
244
- // executable inline <script> only — JSON-LD (type="application/ld+json") is data.
245
- const re =
244
+ const scriptRe =
246
245
  /<script(?![^>]*\ssrc=)(?![^>]*type=["'](?:application\/ld\+json|application\/json)["'])[^>]*>[\s\S]*?\S[\s\S]*?<\/script>/i;
247
- const inline = siteHtml().filter((f) => re.test(fs.readFileSync(f, "utf8")));
248
- if (inline.length) return { status: FAIL, note: `inline <script> in ${inline.length} page(s)` };
246
+ const bad = [];
247
+ for (const f of siteHtml()) {
248
+ const html = fs.readFileSync(f, "utf8");
249
+ const inlineScript = scriptRe.test(html);
250
+ const inlineHandler = parseHtml(html)
251
+ .querySelectorAll("*")
252
+ .some((el) => Object.keys(el.attributes).some((a) => /^on/i.test(a)));
253
+ if (inlineScript || inlineHandler) bad.push(f);
254
+ }
255
+ if (bad.length)
256
+ return { status: FAIL, note: `inline <script> or on*= handler in ${bad.length} page(s)` };
249
257
  return {
250
258
  status: PASS,
251
- note: "loaded modules; calc wiring in a typeof-document block; no inline script",
259
+ note: "loaded modules; calc wiring in a typeof-document block; no inline script or handler",
252
260
  };
253
261
  },
254
262
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piercebarney/whs-eleventy",
3
- "version": "2026.10.2",
3
+ "version": "2026.10.3",
4
4
  "description": "The web house style's Eleventy + Netlify tooling — the compliance sweep, the infra doctor, the link/CSP integrity check, and the a11y scan, shared by every project on the stack.",
5
5
  "bin": {
6
6
  "whs": "cli.js"
@@ -21,6 +21,25 @@ enforced, new *opt-in* chapters/capabilities, tooling-only changes — is
21
21
 
22
22
  ---
23
23
 
24
+ ## 2026-10-03 [non-breaking]
25
+
26
+ ### packages/whs-eleventy
27
+
28
+ `client-logic`'s CSP `script-src 'self'` check in `lib/compliance.js` only
29
+ looked for inline `<script>` tags, missing inline `onclick=`/`onsubmit=`-style
30
+ event-handler attributes — an equally real violation of the same policy that
31
+ `check-links.js` (a separate mechanism, using real HTML attribute parsing)
32
+ already caught correctly. A real project's compliance sweep showed PASS while
33
+ `npm run check`'s links stage still failed on 109 handler findings — the sweep
34
+ and the links stage disagreed about the same constraint. `client-logic` now
35
+ uses the same attribute-parsing approach `check-links.js` already uses, so
36
+ both mechanisms agree. Confirmed no regression on the reference template:
37
+ zero inline handlers anywhere in its built output, both before and after the
38
+ fix, independently verified twice. No `feedback/` file — found directly in
39
+ this conversation. Fixed in `cfb79e1`.
40
+
41
+ ---
42
+
24
43
  ## 2026-10-02 [non-breaking]
25
44
 
26
45
  ### templates/commands
package/standard/core.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Web project house style — CORE (stack-agnostic)
2
2
 
3
- **Version:** 2026-10-02 · **Status:** active
3
+ **Version:** 2026-10-03 · **Status:** active
4
4
 
5
5
  This is the stack-agnostic contract every web project follows, regardless of
6
6
  framework, host, or CSS system. It says **what** must be true, with concrete
@@ -1467,7 +1467,7 @@ governs it and follow that chapter — the slugs are the index (a `<script>` →
1467
1467
  - production-url: https://example.com
1468
1468
  - content-type: tool # tool | article (article => feeds)
1469
1469
  - publishing-rate: ~5 pages/week
1470
- - standard-version: 2026-10-02 # recommended — enables standard-version drift tracking (#compliance)
1470
+ - standard-version: 2026-10-03 # recommended — enables standard-version drift tracking (#compliance)
1471
1471
  ```
1472
1472
 
1473
1473
  If the section is absent, the assistant's first action is to run the flow above