Skip to content

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

Description

@kyle-sexton

Problem

The rendered-views security baseline pins every CDN library to an exact version (docs/contracts/rendered-views/README.md, Security baseline), but no view checks that the file the CDN serves is the one that was reviewed. A compromised or republished file at a pinned URL would still run.

Decision

The owner chose exact pins plus SRI over major-version ranges (owner-decisions row for #17718, 2026-11-21; melodic-software/architecture#140). A range loads whatever is published next inside the major and cannot carry an integrity hash; closed lane PR #17742 built the range form and was refused on that ground. How the exact pins stay current (Dependabot through a manifest-only package.json, with a sync script that writes URLs and hashes) is a separate open question for the owner, not part of this issue.

Change

  • The baseline keeps "pinned to an exact version" and adds: every CDN <script> and <link> carries an integrity="sha384-..." hash of that exact file and crossorigin="anonymous".
  • Every view that loads a CDN library adds the hash to its tags; today that is the /architecture:improve deepening report (plugins/architecture/skills/improve/research/deepening/html-report.md, [email protected], @tailwindcss/[email protected]). Grep for cdn.jsdelivr.net/npm/ for the rest.
  • Each hash is computed from the file the pinned URL serves (curl -sL <url> | openssl dgst -sha384 -binary | openssl base64 -A).

Done when

  • The contract's security baseline requires an SRI hash and crossorigin="anonymous" on every CDN-loaded file.
  • Every CDN-loading view's tags carry the hash of their exact pinned file.
  • Each page renders under its policy in headless Chromium with the hashes in place, and a page whose hash is altered fails to load that script.

Activity

  1. added
    needs-triage
    on Nov 21, 2026
  2. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the rendered-views contract's security baseline and the CDN script/link tags in the views that load CDN libraries (today the architecture improve deepening report template); read by plugin authors and anyone opening the rendered reports.
    Reversible: yes; revert the doc edit and the tag attributes.
    Open questions: none
    I understood this as: require an integrity="sha384-..." hash and crossorigin="anonymous" on every CDN-loaded file, update the contract baseline, and add the hashes to each view's tags. The issue already chooses the design (exact pins plus SRI) and gives a done-when, so I found no intent question. The headless Chromium check may need a run outside this lane. Related but separate: #17742 (closed PR, range form) and open issue #17745's neighbour on keeping pins current via Dependabot is tracked in a separate open issue, not a blocker. No merged pull request in the recent list already covers this.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 21, 2026
  4. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.

  5. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: The rendered-views baseline says CDN libraries are pinned to a major version (with a recheck on a new major or an advisory), and every restatement, copy and CDN-loading view uses major-version jsDelivr URLs.

    Acceptance criteria

    • docs/contracts/rendered-views/README.md:721 says a CDN library is pinned to a major version, not an exact version, and states a recheck when a new major version ships or an advisory names the major; it keeps @​latest ruled out.
    • Every restatement of the old phrase 'pinned to an exact version' is updated to the major-version wording: lib/html-chrome.html:189, plugins/{adhd,architecture,planning,visualization}/reference/html-chrome.html:191, and plugins/adhd/skills/clarify/SKILL.md:157.
    • scripts/contract-clause-registry.json cdn-pinned-version (pattern and hint, around line 216) matches the new wording, and the contract-restatement drift gate and sync-shared-copies.sh check pass.
    • plugins/architecture/skills/improve/research/deepening/html-report.md uses @​tailwindcss/browser@​4 and mermaid@​12 in the CSP meta (line 20) and both script tags (lines 38-39); no exact-version jsDelivr URL remains there.
    • A grep for 'cdn.jsdelivr.net/npm/' across the repo finds no exact-version URL in any view; plugins/knowledge course-digest dometrain.md is a description of a third-party site, not a rendered view, and stays unchanged.
    • plugins/architecture/skills/improve/actions/deepening.md:58, plugins/architecture/README.md:30 and plugins/architecture/CHANGELOG.md say major version instead of exact version (new changelog entry, old entries unchanged), and docs/contracts/rendered-views/CHANGELOG.md gets an entry for the baseline change.
    • The architecture eval samples csp-pins-mermaid.json and csp-pins-tailwind.json pass answers use the major-version URLs, and the plugin's evals still pass.
    • The deepening report built from the updated html-report.md renders in headless Chromium with no CSP violation for the Tailwind and Mermaid scripts, and its CDN-unreachable fallback still shows content.

    External state: none

    Related work

    Sources read

    • docs/contracts/rendered-views/README.md:721: baseline says a CDN library is 'pinned to an exact version', inside a drift-gated contract-restatement block
    • scripts/contract-clause-registry.json:216: clause cdn-pinned-version requires the text 'pinned to an exact version'
    • plugins/architecture/skills/improve/research/deepening/html-report.md:20: CSP names tailwind@​4.3.5 and mermaid@​12.3.0 exact URLs; lines 38-39 repeat them in script tags
    • lib/html-chrome.html:189: shared chrome text with the exact-version wording, copied to four plugins' reference/html-chrome.html:191
    • plugins/adhd/skills/clarify/SKILL.md:157: restates the exact-version rule
    • plugins/architecture/evals/deepening-report-on-chrome-with-counts/samples/csp-pins-mermaid.json:2: pass sample uses mermaid@​12.3.0
    • plugins/architecture/README.md:30: says Tailwind and Mermaid load at exact versions

    Automated refinement by the lanes App. Intake triages the issue again with it.

  6. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"891734bad0316a7b0d74f02201e1e08afc9e9b277c0ee66edd6be32726fb7663","body_sha256":"76f15e3b0ecb420932e95926e62a1add76c1a8ef1451ab96d0043fa79ce67715"}

  7. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44843326179, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share, or the window was projected to have under its start-project share of the header's limit left by the run's expected end (github-token start-gate, start-project and start-run-minutes in rate-limits.json; the run's start-gate notice names which); that run ended at 2026-11-21T00:27:06Z. work-unblock has now removed and added agent-ready back to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or the kill-switch wait.

  8. 6 remaining items

  9. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"8286829ae2e117f0f9fbcf558ad2da692d8e4506c25597a0513fa704a191d117","body_sha256":"e07ef40c24a81499f78e25229dae0951d9bbc2ea87aa861cff731d946c4fcf2d"}

  10. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"8286829ae2e117f0f9fbcf558ad2da692d8e4506c25597a0513fa704a191d117","body_sha256":"e07ef40c24a81499f78e25229dae0951d9bbc2ea87aa861cff731d946c4fcf2d"}

  11. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  12. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  13. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started waited in its slot past a change to its lane workflow files on main, so it stopped before any model turn. The run's report-outcome removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  14. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  15. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions