Skip to content

fix(rendered-views): require SRI hashes on exact-version CDN pins - #17844

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17718-44873678268-1
Nov 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17718-44873678268-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #17718

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The rendered-views security baseline keeps exact-version CDN pins and now requires every CDN <script> and <link> tag to carry crossorigin="anonymous" and an integrity hash of the exact file its pinned URL serves, so a changed or republished file at that URL does not load. The /architecture:improve deepening report, the one shipped template that loads a CDN library, now carries the hashes on its Tailwind and Mermaid tags. The two inline restatements of the baseline (/architecture:improve, /adhd:clarify) carry the rule, and the contract-clause registry gains two qualifiers so the drift gate enforces it. Choice of means: the hashes are sha256, not the sha384 the issue's Change section sketched. This lane cannot run curl or openssl, and jsDelivr's data API publishes a base64 sha256 per file (per its OpenAPI spec). SRI accepts sha256, and the done-when asks only for an SRI hash of the exact file. Each hash was read twice, with different prompts, and both reads agreed. The refinement comment's major-version-range criteria were not followed: the issue body records the owner's decision for exact pins plus SRI, and a range cannot carry a hash.

Not verified

  • contract-clause-coverage (scripts/check-contract-clause-coverage.py) runs in CI only; the new qualifier patterns were checked against the three marked copies by hand.
  • Tidy was skipped: the change spans more than the 1-area cutoff (docs/contracts, plugins/architecture, plugins/adhd) and touches scripts/, a listed shared path.
  • Eval suites for the architecture and adhd plugins were not run here; they are left to the PR's CI. The CSP-pin eval samples are unchanged because the CSP URLs did not change.
  • comment-hygiene, size-check and typos checks inside check-affected could not run in this lane (fetch denied, script missing, tool not installed); they are left to CI.
  • The shared chrome's network-rule panel (lib/html-chrome.html and its four generated plugin copies) still states only the exact-version pin. It is not a marked restatement, and the issue does not ask for it.

Fix

  • docs/contracts/rendered-views/README.md: the Security baseline's CDN bullet requires crossorigin="anonymous" and an integrity hash (sha256-, sha384- or sha512-) of the exact pinned file on every CDN <script> and <link> tag, inside the drift-gated restatement block; the exact-version pin…
  • docs/contracts/rendered-views/CHANGELOG.md: new entry for the integrity requirement and the two new clause qualifiers.
  • plugins/architecture/skills/improve/research/deepening/html-report.md: the scaffold's Tailwind 4.3.5 and Mermaid 12.3.0 script tags carry integrity="sha256-..." and crossorigin="anonymous"; the pin paragraph names where the hashes come from, and the recheck trigger now covers both hashes along with…
  • plugins/architecture/skills/improve/actions/deepening.md: Phase 2's baseline restatement carries the integrity and crossorigin rule.
  • plugins/adhd/skills/clarify/SKILL.md: the baseline restatement carries the integrity and crossorigin rule.
  • scripts/contract-clause-registry.json: rendered-views-security-baseline gains qualifiers cdn-integrity-hash (integrity hash) and cdn-crossorigin (crossorigin="anonymous").
  • .changes/architecture/work-resolve-issue-issue-17718-44873678268-1-33d67105.md: patch fragment (Security) for the deepening report's hashes.
  • .changes/adhd/work-resolve-issue-issue-17718-44873678268-1-f374b5b2.md: patch fragment (Security) for the clarify restatement.

Verification

The runner ran each check from the base copy against 2fa59bf:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //data.jsdelivr.com/v1/packages/npm/tailwindcss/browser4.3.5?structure=flat: /dist/index.global.js hash LQdTYZ03u0RSdhuHT/xq5kKengUesm9ExayDxzYvx7E= (size 287414); two reads with different prompts gave the same value
  • read https: //data.jsdelivr.com/v1/packages/npm/mermaid12.3.0?structure=flat: /dist/mermaid.min.js hash M234A9h6OLcKAec25mbI92AdLOQvXkfI+v5dchB0uaM= (size 5537838); two reads with different prompts gave the same value
  • read https: //data.jsdelivr.com/v1/spec.yaml: the file-entry hash field is "A base64-encoded sha256 of file contents."
  • read https: //developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity: allowed prefixes are sha256, sha384 and sha512; a cross-origin SRI load needs the crossorigin attribute plus CORS, and a mismatched hash makes the browser refuse the resource with a network error
  • grep for cdn.jsdelivr.net/npm/ across the repo: the only rendered-view template hits are html-report.md lines 20 and 38-39; the others are eval samples and a description of a third-party site (knowledge dometrain adapter)
  • check-changelog-fragments: all 14 fragments valid
  • check-changed-skills: clarify and improve PASS, 0 errors (pre-existing description-length and body-size warnings)
  • check-affected: 14 passed, 9 skipped, 0 failed over 8 changed files
  • manual check: both new registry patterns (integrity hash, crossorigin="anonymous") appear in all three files that carry the rendered-views-security-baseline restatement marker
  • fresh-context review subagent: no high findings; the two medium findings (stale adhd restatement, no registry qualifier) and the README line-wrap and wording findings were fixed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44873678268

Session check at head 2fa59bf (done-when 2 and 3 of #17718), run from a session with network and a browser:

  • Hash of the served bytes: curl -sSL <url> | openssl dgst -sha256 -binary | base64 for both pinned URLs. Tailwind @tailwindcss/[email protected]/dist/index.global.js (287414 bytes) gave LQdTYZ03u0RSdhuHT/xq5kKengUesm9ExayDxzYvx7E=, and Mermaid [email protected]/dist/mermaid.min.js (5537838 bytes) gave M234A9h6OLcKAec25mbI92AdLOQvXkfI+v5dchB0uaM=. Both equal the integrity values on html-report.md lines 38-39, and the data API values agree.
  • Headless Chromium (playwright-cli 0.1.24), served from 127.0.0.1. Each page used the scaffold's exact CSP meta, both tags as written (integrity plus crossorigin="anonymous"), a p-8 element and one Mermaid flowchart run with the scaffold's mermaid.initialize options.
    • Real hashes: Tailwind applied (padding-top 32px), window.mermaid defined, the flowchart drew an SVG, and the console had 0 messages.
    • Tailwind hash altered by one character: Tailwind did not apply (padding-top 0px). The console logged Failed to find a valid digest in the 'integrity' attribute for resource 'https://cdn.jsdelivr.net/npm/@tailwindcss/[email protected]/dist/index.global.js' with computed SHA-256 integrity 'LQdTYZ03u0RSdhuHT/xq5kKengUesm9ExayDxzYvx7E='. The resource has been blocked. Mermaid still drew.
    • Mermaid hash altered by one character: window.mermaid undefined, no SVG, and the same blocked-resource error naming mermaid.min.js with computed integrity M234A9h6OLcKAec25mbI92AdLOQvXkfI+v5dchB0uaM=. Tailwind still applied.
    • Chromium's computed digests of the served files equal the tags' values, so the pins load and a changed file does not.

Left out: the items under Not verified.

Related

#17718

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44877388389, attempt 2

Field Value
Model rung 0
Leg base
Run job failure
Activity step skipped
Commits pushed none (read lane)
Run 44877388389

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Run 44877388389, attempt 3

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44877388389

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2fa59bfd464cbb86e4fc15542a09d4d971bdebce: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This pull request tightens the rendered-views security baseline. Every CDN <script> and <link> tag must now carry crossorigin="anonymous" and an integrity hash of the exact file at its pinned URL. Concretely, the change:

  • adds the rule to the contract;
  • restates it in the two inline copies (/adhd:clarify and /architecture:improve deepening);
  • puts sha256 SRI hashes on the two <script> tags in the deepening report scaffold;
  • adds two qualifier patterns to scripts/contract-clause-registry.json, so the drift gate makes each copy carry the rule.

What I checked

  • Hashes on the scaffold tags (plugins/architecture/skills/improve/research/deepening/html-report.md, lines 38-39). The URLs are the same exact-version jsDelivr pins as before; only the integrity and crossorigin attributes are new.
    • The hashes come from jsDelivr's data API, not from hashing the served bytes, and the PR lists that under "Not verified".
    • A wrong hash fails closed: the browser refuses the script. The page then uses the fallback the baseline already requires (Mermaid source stays in its <pre>, and the text is styled by the chrome). So the worst case is a styling and diagram regression, not a security exposure.
    • This replaces trust in whatever the CDN serves today with a check against one fixed file. It narrows what can run.
  • Registry qualifiers (scripts/contract-clause-registry.json). Two new literal-substring patterns are added to an existing clause. They make the drift check stricter and loosen nothing.
  • Instruction-surface changes. The three restatements only add a rule; no standing instruction is deleted, narrowed or softened.
  • Trust controls and manifests. None of the changed files matches a trusted-path glob. The diff touches no workflow, action, token request, trusted-actor list, merge hold or kill switch. It changes no plugin.json or marketplace.json; the .changes/ fragments are changelog text only.
  • PR context. It contains no embedded instructions aimed at this lane.

Spend. There is no new spend: the change does not affect lane runs, schedules or billing.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 2fa59bfd464cbb86e4fc15542a09d4d971bdebce; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 2fa59bfd464cbb86e4fc15542a09d4d971bdebce: read 8 of 8 changed file(s); 1 finding(s), 1 as inline comments.

Code review: PR #17844 (SRI hashes on exact-version CDN pins)

I read all 8 changed files in full. The PR adds a rule to the rendered-views security baseline: every CDN <script>/<link> tag must carry crossorigin="anonymous" and an integrity hash. It also:

  • adds sha256 hashes to the /architecture:improve deepening scaffold's Tailwind and Mermaid tags;
  • updates both inline copies of the baseline (/adhd:clarify, /architecture:improve);
  • adds two qualifiers to the contract-clause registry.

Checked and fine:

  • The registry patterns are case-insensitive regexes, and the checker normalizes line wraps. Both new patterns appear inside the marked span of all three files that carry the rendered-views-security-baseline marker: docs/contracts/rendered-views/README.md, plugins/adhd/skills/clarify/SKILL.md and plugins/architecture/skills/improve/actions/deepening.md.
  • My own grep for CDN hosts outside evals finds only the deepening scaffold as a shipped view that loads a CDN file, which matches what the PR says.
  • Using sha256 instead of the sha384 the issue sketched still meets the Done-when, which asks only for an SRI hash. The README allows any of the three SRI prefixes.

Blocking:

  • Closing issue rendered-views: add SRI hashes to exact-version CDN pins #17718, third Done-when: no headless render with the hashes, and no altered-hash test (inline on html-report.md L38–39). The hashes come from jsDelivr's data API and were never computed from the served bytes. A wrong digest would silently disable both libraries behind the CDN fallback, and no test could catch it. The PR itself lists this as not verified. Its other verification claims, such as the check-affected results and the hand check of the registry patterns, are the author's and I did not run them.

Other notes:

  • Loosened checks would be marked: fail (default; the prompt has no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. No loosening found: the registry change makes the check stricter. The prompt has no loosened_check_decision_record: line, so the citation requirement was not checked.
  • Path-scoped rules cost-claims.md and skill-bodies-state-current-rules.md match the skill files. Neither is broken.
  • No plugin manifests changed.
  • The PR body and closing issue contain no embedded instructions to the lane.
  • Security findings are left to the security lane, which runs in this repository.
  • This is not a hold: no billing or cost change, no CRITICAL security finding.

Verifier dropped 0 of 1 candidates.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback

Run 44879484886, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44879484886

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 2fa59bf.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback

Run 44884325181, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44884325181

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 2fa59bf.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the pull request has an unresolved review thread the lane does not take (a reviewer it does not act on, a review of an older head, or a thread it already answered), so no lane resolves it and a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17844 -f activity=address-feedback

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation

Run 44881446228, attempt 2

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44881446228

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 21, 2026
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 2fa59bfd464cbb86e4fc15542a09d4d971bdebce. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit b6de099 Nov 21, 2026
127 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17718-44873678268-1 branch November 21, 2026 08:45
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.

rendered-views: add SRI hashes to exact-version CDN pins

1 participant