Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

.pi/reports/1.0-dependency-risk.md

Raw
Rendered preview

Dependency audit boundary

Current remediation

Compatible lockfile refresh reduced registry audit findings from 21 to 17: 3 high, 10 moderate, 4 low, no audit-critical findings. dependency-compatible-updates-audit.json retains the refreshed report and actual audit exit code 1. Remaining findings are open; zero audit-critical findings alone do not cover embedded dependencies or establish security clearance.

Rebuilt Canvas browser assets now identify DOMPurify 3.4.17. The System no longer copies upstream Mermaid's prebundled sanitizer: book, document views, and board share an authenticated HTTP application using locally bundled browser modules. Its emitted browser graph identifies DOMPurify 3.4.17; the served-graph browser regression also checks sanitizer delivery, diagram rendering, and a malicious-label case in Chromium and Firefox. The old dist/the-system/assets/mermaid.min.js is absent after rebuilding. This addresses the two inspected sanitizer delivery paths, not every remaining dependency advisory or every possible sanitizer exploit.

Authored raw HTML and visual previews remain trusted, active same-origin content and can invoke authenticated book actions. Mermaid sanitization does not isolate or sanitize that surrounding authored content. Standalone file:// views are intentionally replaced by the shared localhost application.

Focused evidence now includes 132 extension tests and 30 Chromium/Firefox book checks; the earlier 16 package-build tests also passed. Browser features, reproduced fixes, fresh fragment/header-clearance checks, and acceptance limits are recorded in System book browser verification. Current pipi contract rerun passed 19 tests; its earlier failure reflected an older working-tree assertion and does not establish causality relative to dependency updates. Final root //:check and //:lint reruns passed, including all 46 README checks. Root //:test passed 3,465 tests with 73 skipped across 273 passing files and 10 skipped files; all 18 modernization tests also passed. The later comprehensive browser pass covers 30 checks, with extension native tests and lint passing; the earlier root-test result was not rerun after that browser work. The final check/lint results supersede earlier failures; concurrent work is preserved, and no isolated baseline establishes the causes of those failures. Passing checks do not clear remaining security findings. Provider-token before/after measurement was not performed; no live baseline was captured for this change. Visual inspection now covers light/dark book and board layouts at desktop/mobile sizes; native platform and screen-reader acceptance remain unrun.

Historical baseline result

1.0-dependency-audit.json retains the complete report, affected dependency-node paths, stderr and audit task exit code 1. The audit reports 21 findings: 1 critical, 5 high, 11 moderate and 4 low. This is not a clean security result. At that baseline, no dependency manifests, lockfile versions, overrides or vendor sources had been changed.

Historical critical DOMPurify finding

GHSA-cg2g-xh64-v4q7 affects the installed DOMPurify 3.4.16 at node_modules/dompurify. Canvas genuinely delivers that code through Excalidraw 0.18.1 → mermaid-to-excalidraw 2.2.2 → nested Mermaid 11.17.2, including its layout browser entrypoint. It is not merely an unused development dependency.

The inspected advisory-specific chain requires template-safe sanitization, a DOM-return or in-place mode, DOM-node input with an attached shadow root, and subsequent template evaluation. Inspected Mermaid call sites sanitize strings with default or restricted options rather than supplying that combination. Canvas's own Mermaid wrapper restricts markup/configuration, but Excalidraw clipboard conversion bypasses that wrapper; those paths were inspected separately rather than assumed safe. Their converter defaults and directive filtering do not establish the required DOMPurify mode combination.

Conclusion: affected component is shipped; the specific exploit chain was not established in inspected paths because its required conditions were absent. This is static source/artifact evidence, not an exploit test, general DOMPurify safety proof, or advisory closure. Other DOMPurify advisories remain separate findings.

Historical prebundled copy

The System also copies Mermaid 12.1.0's prebundled browser asset, which embeds DOMPurify 3.4.12. That version is also in the affected advisory range. Updating the standalone DOMPurify node would not replace this already-embedded copy. Both delivery paths remain in dependency-maintenance scope.

Upgrade boundary

Audit recommendations for lodash-es/nanoid propose Excalidraw 0.17.6, while Canvas declares 0.18.1. That is a downgrade, not an approved remediation or compatibility proof. Do not treat fixAvailable as evidence that a suggested change is safe. Dependency remediation remains open; npm publishing/account/package work remains deferred separately.

Historical evidence locators

  • package-lock.json: installed DOMPurify 3.4.16 and converter dependency graph.
  • extensions/canvas/package.json: declared browser dependencies.
  • scripts/build/bundle.ts: actual browser bundling route.
  • dist/canvas/browser/: emitted sanitizer version and Mermaid sanitizer call sites, inspected after the current build.
  • extensions/canvas/browser/drawing.ts: application Mermaid wrapper.
  • extensions/the-system/package.json: copied prebundled Mermaid resource.
  • dist/the-system/assets/mermaid.min.js: embedded DOMPurify 3.4.12.

No security clearance is inferred from passing runtime tests, browser tests, or a successful report-extraction wrapper.

# Dependency audit boundary

## Current remediation

Compatible lockfile refresh reduced registry audit findings from 21 to 17: 3 high, 10 moderate, 4 low, no audit-critical findings.
`dependency-compatible-updates-audit.json` retains the refreshed report and actual audit exit code `1`.
Remaining findings are open; zero audit-critical findings alone do not cover embedded dependencies or establish security clearance.

Rebuilt Canvas browser assets now identify DOMPurify 3.4.17.
The System no longer copies upstream Mermaid's prebundled sanitizer: book, document views, and board share an authenticated HTTP application using locally bundled browser modules.
Its emitted browser graph identifies DOMPurify 3.4.17; the served-graph browser regression also checks sanitizer delivery, diagram rendering, and a malicious-label case in Chromium and Firefox.
The old `dist/the-system/assets/mermaid.min.js` is absent after rebuilding.
This addresses the two inspected sanitizer delivery paths, not every remaining dependency advisory or every possible sanitizer exploit.

Authored raw HTML and visual previews remain trusted, active same-origin content and can invoke authenticated book actions.
Mermaid sanitization does not isolate or sanitize that surrounding authored content.
Standalone `file://` views are intentionally replaced by the shared localhost application.

Focused evidence now includes 132 extension tests and 30 Chromium/Firefox book checks; the earlier 16 package-build tests also passed.
Browser features, reproduced fixes, fresh fragment/header-clearance checks, and acceptance limits are recorded in [System book browser verification](system-book-browser-verification.md).
Current `pipi` contract rerun passed 19 tests; its earlier failure reflected an older working-tree assertion and does not establish causality relative to dependency updates.
Final root `//:check` and `//:lint` reruns passed, including all 46 README checks.
Root `//:test` passed 3,465 tests with 73 skipped across 273 passing files and 10 skipped files; all 18 modernization tests also passed.
The later comprehensive browser pass covers 30 checks, with extension native tests and lint passing; the earlier root-test result was not rerun after that browser work.
The final check/lint results supersede earlier failures; concurrent work is preserved, and no isolated baseline establishes the causes of those failures.
Passing checks do not clear remaining security findings.
Provider-token before/after measurement was not performed; no live baseline was captured for this change.
Visual inspection now covers light/dark book and board layouts at desktop/mobile sizes; native platform and screen-reader acceptance remain unrun.

## Historical baseline result

`1.0-dependency-audit.json` retains the complete report, affected dependency-node paths, stderr and audit task exit code `1`.
The audit reports 21 findings: 1 critical, 5 high, 11 moderate and 4 low.
This is not a clean security result.
At that baseline, no dependency manifests, lockfile versions, overrides or vendor sources had been changed.

## Historical critical DOMPurify finding

[GHSA-cg2g-xh64-v4q7](https://github.com/advisories/GHSA-cg2g-xh64-v4q7) affects the installed DOMPurify 3.4.16 at `node_modules/dompurify`.
Canvas genuinely delivers that code through Excalidraw 0.18.1 → mermaid-to-excalidraw 2.2.2 → nested Mermaid 11.17.2, including its layout browser entrypoint.
It is not merely an unused development dependency.

The inspected advisory-specific chain requires template-safe sanitization, a DOM-return or in-place mode, DOM-node input with an attached shadow root, and subsequent template evaluation.
Inspected Mermaid call sites sanitize strings with default or restricted options rather than supplying that combination.
Canvas's own Mermaid wrapper restricts markup/configuration, but Excalidraw clipboard conversion bypasses that wrapper; those paths were inspected separately rather than assumed safe.
Their converter defaults and directive filtering do not establish the required DOMPurify mode combination.

Conclusion: affected component is shipped; the specific exploit chain was not established in inspected paths because its required conditions were absent.
This is static source/artifact evidence, not an exploit test, general DOMPurify safety proof, or advisory closure.
Other DOMPurify advisories remain separate findings.

## Historical prebundled copy

The System also copies Mermaid 12.1.0's prebundled browser asset, which embeds DOMPurify 3.4.12.
That version is also in the affected advisory range.
Updating the standalone DOMPurify node would not replace this already-embedded copy.
Both delivery paths remain in dependency-maintenance scope.

## Upgrade boundary

Audit recommendations for lodash-es/nanoid propose Excalidraw 0.17.6, while Canvas declares 0.18.1.
That is a downgrade, not an approved remediation or compatibility proof.
Do not treat `fixAvailable` as evidence that a suggested change is safe.
Dependency remediation remains open; npm publishing/account/package work remains deferred separately.

## Historical evidence locators

- `package-lock.json`: installed DOMPurify 3.4.16 and converter dependency graph.
- `extensions/canvas/package.json`: declared browser dependencies.
- `scripts/build/bundle.ts`: actual browser bundling route.
- `dist/canvas/browser/`: emitted sanitizer version and Mermaid sanitizer call sites, inspected after the current build.
- `extensions/canvas/browser/drawing.ts`: application Mermaid wrapper.
- `extensions/the-system/package.json`: copied prebundled Mermaid resource.
- `dist/the-system/assets/mermaid.min.js`: embedded DOMPurify 3.4.12.

No security clearance is inferred from passing runtime tests, browser tests, or a successful report-extraction wrapper.