Skip to content

fix(security): upgrade vendored JS libs to patched versions#551

Draft
DeepDiver1975 wants to merge 1 commit into
masterfrom
fix/vendor-js-cve-upgrades
Draft

fix(security): upgrade vendored JS libs to patched versions#551
DeepDiver1975 wants to merge 1 commit into
masterfrom
fix/vendor-js-cve-upgrades

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

Resolves the Trivy HIGH/CRITICAL findings flagged against owncloud/notes deps in the server Docker CI scan. All 5 findings are in the committed, bower-vendored JS libraries under js/vendor/ (AngularJS-era frontend), which ship in the server image.

Library Before → After CVEs cleared
underscore 1.7.0 → 1.13.8 CVE-2021-23358 (CRITICAL), CVE-2026-27601 (HIGH)
angular (+ angular-route, angular-mocks) 1.4.14 → 1.8.3 CVE-2019-10768 (HIGH)
prism 1.0.1 → 1.30.0 CVE-2021-23341, CVE-2021-32723 (HIGH)

Approach

  • Bumped the pins in js/bower.json and regenerated js/vendor/ via bower.
  • Trimmed each dir back to the repo's curated runtime file set. bower update dragged in build-artifact noise including new scannable manifests that were never tracked before — underscore/package-lock.json (1073 pkgs), prism/package-lock.json, prism/composer.json. Those are themselves Trivy scan targets that could reintroduce findings from dev/build deps, so they've been removed. No lockfiles or composer manifests remain in js/vendor.

Why this is low-risk despite the major-version jumps

  • App code (js/app/, js/config/) uses no underscore calls and no deprecated AngularJS APIs (.success/.error, $cookieStore, etc.) directly.
  • restangular only calls stable underscore methods (_.each, _.extend, _.contains, _.isUndefined, …) that are unchanged through 1.13.
  • prism is used by mdEdit for note syntax highlighting; angular is the app framework.

Test plan

  • npm test (karma / gulp) — 22/22 pass, unchanged from baseline
  • gulp build (concat + uglify → public/app.min.js) succeeds
  • CI Trivy scan on the rebuilt server image confirms the findings are cleared

🤖 Generated with Claude Code

Resolve Trivy HIGH/CRITICAL findings in the vendored AngularJS-era
frontend libraries that ship in the ownCloud server Docker image:

- underscore 1.7.0 -> 1.13.8  (CVE-2021-23358 critical, CVE-2026-27601 high)
- angular    1.4.14 -> 1.8.3  (CVE-2019-10768 high)
- prism      1.0.1  -> 1.30.0 (CVE-2021-23341, CVE-2021-32723 high)

angular-route and angular-mocks are bumped to 1.8.3 to match angular.

Regenerated js/vendor via bower, then trimmed each dir back to the
repo's curated runtime file set. In particular this removes the
package-lock.json / composer.json manifests that bower pulled in for
underscore and prism, which are themselves Trivy scan targets and were
never tracked before.

App code uses no underscore or deprecated AngularJS APIs directly, and
restangular only calls stable underscore methods; the karma suite
(22 tests) and gulp production build both pass unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 requested a review from a team as a code owner July 23, 2026 13:07

@phil-davis phil-davis 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.

The various bower.json and package.json diffs look reasonable.
I guess that we just have to believe that the 700+ files touched here are the correct code pulled in from the versions mentioned.

@DeepDiver1975
DeepDiver1975 marked this pull request as draft July 23, 2026 13:25
@DeepDiver1975

Copy link
Copy Markdown
Member Author

currently shows white screen of death 💀

@phil-davis

Copy link
Copy Markdown
Contributor

The Notes app v2.1.2 bundled in the ownCloud Classic 11.0.0 RC2 tarball is working Ok.

There are no automated acceptance tests for this app, so green CI doesn't guarantee that it works.

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.

2 participants