Skip to content

Replace vulnerable plugin release extractor - #132

Merged
den-sq merged 2 commits into
mainfrom
codex/issue-131-secure-plugin-download
Aug 14, 2026
Merged

Replace vulnerable plugin release extractor#132
den-sq merged 2 commits into
mainfrom
codex/issue-131-secure-plugin-download

Conversation

@den-sq

@den-sq den-sq commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace @terascope/fetch-github-release and its unpatched extract-zip dependency with native GitHub asset downloads and node-stream-zip's whole-archive extraction API
  • preserve the existing release selection, URL parsing, output directory, parallel asset download, overwrite, installation, and cleanup behavior
  • refresh transitive js-yaml and nanoid locks to their patched releases

Closes #131

Security behavior

  • No advisory is allowlisted.
  • downloadPlugin remains the only public plugin-release install entry point.
  • Ouroboros does not implement archive-entry handling or add archive-content policies; extraction behavior belongs to node-stream-zip.
  • node-stream-zip@1.16.0 has no runtime dependencies and its extractor is not affected by the extract-zip advisory.

Validation

  • npm ci (735 packages audited, 0 vulnerabilities)
  • npm run audit:release (0 vulnerabilities)
  • npm run test:release (both release test files pass, including the normal plugin download/extraction integration)
  • npm run build
  • targeted ESLint and Prettier checks
  • git diff --check

The clean install still prints existing deprecation notices through unchanged build-tool dependency chains. The build also prints the existing Google Fonts DNS warning when run in the restricted sandbox; neither warning is introduced by node-stream-zip.

Shared-basis audit

  • Inspected the canonical downloadPlugin lifecycle, addLocalPlugin, the release audit validator, release CI, and the exact @terascope/fetch-github-release implementation previously used by this call site.
  • Reused downloadPlugin as the owning entry point and preserved its established release and temporary-directory lifecycle. The normal Node release-test seam exercises that public download/extract behavior.
  • Considered unzipper, direct yauzl entry processing, and a package override. Selected node-stream-zip because it owns the complete extract-to-directory operation, ships TypeScript declarations, and has no runtime dependencies; direct yauzl processing and an override would leave Ouroboros owning extra extraction machinery.
  • Load-bearing decision: keep node-stream-zip as a production dependency because Electron Vite externalizes main-process dependencies.
  • Consequence: archive semantics are those of the maintained extraction package. Ouroboros adds no symlink, special-file, collision, URL-origin, or temporary-directory policy.
  • Approved overlapping mechanisms: none.

@den-sq den-sq changed the title Secure plugin release archive extraction Replace vulnerable plugin release extractor Aug 14, 2026
@den-sq
den-sq marked this pull request as ready for review August 14, 2026 18:05
@den-sq
den-sq merged commit aa83bc1 into main Aug 14, 2026
5 checks passed
@den-sq
den-sq deleted the codex/issue-131-secure-plugin-download branch August 14, 2026 18:06
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.

Replace vulnerable plugin release extractor and restore release audit

1 participant