Repository navigation
fix: make the vendored Ace editor auditable - #446
Merged
Merged
Conversation
js/vendor/ace holds a curated subset of Ace's src-noconflict build, 149 files committed by hand. There is no manifest of any kind - no bower, no npm - so nothing has ever watched the version, and no scanner could list Ace among the libraries this app ships. Add js/vendor/ace/PATCHES.md recording the version (1.2.6), the curation (worker-*, most themes and extensions are excluded by .gitignore, so syntax checking runs in the main thread by design), the provenance commits, and the advisory audit: no advisories exist for Ace under `ace`, `ace-builds` or `brace`, so none apply. It also records that no patches have been applied, verified rather than assumed: [email protected] was fetched from the npm registry and compared by SHA-256. All 12 files checked - ace.js, ext-searchbox.js, ext-modelist.js, theme-clouds.js, six mode-*.js and both keybindings - are byte-identical to upstream. So unlike the vendored pdf.js in files_pdfviewer, this version string can be trusted at face value. The file is explicit that 1.2.6 dates from 2016 and that "no published advisory" is not "audited", given the editor is handed untrusted file content. The upgrade is tracked separately; it needs the editor exercised by hand and does not belong in a patch release. Add js/vendor/ace/package.json as a version marker so scanners and SBOM tooling can inventory the library. Unlike the pdf.js case this needs no .trivyignore, because there is no advisory to suppress. Anchor the composer `vendor/` gitignore rule to the project root. Left unanchored it also matched js/vendor/, which ignored that directory outright - so the /js/vendor/ace/... curation rules below it could never take effect, since git does not descend into an ignored directory. Verified: root vendor/ stays ignored, and worker-*, theme-* and ext-* under src-noconflict are now genuinely excluded while the three whitelisted files remain visible. Refs: owncloud/core#41824 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
phil-davis
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependency audit for this app, a precondition for the re-release tracked in owncloud/core#41824.
What I found
js/vendor/ace/holds a curated subset of Ace'ssrc-noconflictbuild — 149 files, committed by hand. There is no dependency manifest of any kind: no bower, no npm, nothing. So nothing has ever watched the version, and no scanner could list Ace among the libraries this app ships. The only way to learn the version was to grepexports.versionout oface.js.It is 1.2.6, released in 2016.
Audit result: clean, and the version string is trustworthy
No advisories. Checked the GitHub Advisory Database under
ace,ace-buildsandbrace— no advisories exist for any version of Ace, so none apply to 1.2.6. Ace bundles no further libraries, so there is no transitive surface.Unmodified upstream — verified, not assumed. I fetched
[email protected]from the npm registry and compared SHA-256 digests. All 12 files checked are byte-identical to upstream:ace.js,ext-searchbox.js,ext-modelist.js,theme-clouds.js,mode-{php,javascript,markdown,python,json,yaml}.js, and both keybindings.That matters because it is the opposite of the
files_pdfviewercase in the same audit, where the vendored pdf.js reports2.10.0but carries a local CVE backport. Here the version string can be taken at face value.I have been explicit in
PATCHES.mdthat this is not a clean bill of health: 1.2.6 is from 2016, "no published advisory" is not "audited", and this app hands the editor untrusted file content. The upgrade is worth doing on its own merits — just not inside a patch release.Changes
js/vendor/ace/PATCHES.md— version, curation, provenance commits, the digest verification, the advisory audit, and how to update.js/vendor/ace/package.json— a version marker so scanners and SBOM tooling can inventory Ace. No.trivyignoreis needed here, unlike the pdf.js case, because there is no advisory to suppress..gitignore— anchor the composer rule to/vendor/.The gitignore fix is worth a look
The composer rule was
vendor/, unanchored, so it also matchedjs/vendor/and ignored that directory outright. Two consequences:git add -f./js/vendor/ace/src-noconflict/theme-*with!.../theme-clouds.jsre-includes could never take effect, because git does not descend into an ignored directory.Verified after the change: root
vendor/is still ignored;worker-php.js,theme-monokai.jsandext-emmet.jsundersrc-noconflictare now genuinely excluded, while the three whitelisted files stay visible; andgit statusexposes nothing beyond the two files this PR adds.Not in this PR
The version bump to 2.7.2 is separate, so this can be reviewed on its merits and the release timed independently. The Ace upgrade is deferred and worth tracking on its own — the module layout and several extension APIs changed since 1.2.6, and it needs the editor exercised by hand.
🤖 Generated with Claude Code