Review main Merged

75539[TASK] Update vulnerable build dependencies

Benjamin Franzke CR +2 V +2 Impossible +2022 −10156 updated 08/25/22, 03:35

Commit message

Update (most) vulnerable dependencies/packages found by
`npm audit fix --force --dry-run`.

Notes redarding package changes:

 * The outdated grunt-postcss plugin is replaced by a (maintained)
   fork for compatibility with newer grunt versions.

 * karma is updated to v6 and pulls in @types/node which conflicts with
   TypeScript type definitions by @types/requirejs. Therefore 3rd party
   type declarations from packages (@types/*) are now explicitly
   enabled in tsconfig.json – note that there is no other way to exclude
   from typeRoots:
   https://github.com/microsoft/TypeScript/issues/18588

 * grunt-lintspaces and grunt-contrib-imagemin are replaced
   as these packages have been not been updated to not depend
   on vulnerabe dependencies, while grunt-lintspaces and
   grunt-contrib-imagemin would cause downgrades to older
   version when running `npm audit fix --force` (because only
   the older versions do not depend on vulnerable software).

 * (grunt-contrib-)imagemin is replaced by squoosh (by google) as
   a) imagemin dependencies ("bin-build" > "download") rely on vulnerable
      versions of "got".
      Neither of these packages is currently updated,see
      https://github.com/kevva/download/issues/224
   b) imagemin is unmaintained:
      https://github.com/imagemin/imagemin/issues/385
      and suggests squoosh as replacement

 * stylefmt is replaced by a maintained fork.

There is one remaining packages that pulls in a vulnerability alerts:

  * jquery-ui is marked as vulnerable (severity: high), but worked on
    in a separate patch #96497.
    (We don't actually use the vulnerable library parts though).

Vulnerability report before this patch:

    74 vulnerabilities (1 low, 30 moderate, 38 high, 5 critical)

Vulnerability report after this patch:

    1 high severity vulnerability
    (this is jquery-ui)

Commands executed:

  # Supposed to be non breaking, but broke grunt-css
  npm audit fix
  npm remove grunt-postcss
  npm install @lodder/grunt-postcss

  # Preparation for `npm audit fix --force` (breaking changes)
  npm install grunt@^1.5
  npm install grunt-lintspaces@^0.10.0
  npm remove grunt-lintspaces
  npm install --save-dev lintspaces-cli
  npm remove grunt-contrib-imagemin
  npm install --save-dev
  npm remove stylefmt
  npm install --save-dev @ronilaukkarinen/stylefmt
  npm audit fix --force

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 507

Show 487 more files

Review log 1624

  1. Benjamin Franzke uploaded patch set 1 08/24/22, 06:44

  2. core-ci voted on patch set 1 V +1 08/24/22, 06:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30402

  3. Benjamin Franzke uploaded patch set 2 08/24/22, 09:24

  4. core-ci voted on patch set 2 V -1 08/24/22, 09:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30404

  5. Benjamin Franzke uploaded patch set 3 08/24/22, 11:05

  6. core-ci voted on patch set 3 V +1 08/24/22, 11:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30409

  7. Benjamin Franzke uploaded patch set 4 08/24/22, 11:26

  8. Benjamin Franzke updated the commit message in patch set 5 08/24/22, 11:27

  9. Benjamin Franzke uploaded patch set 6 08/24/22, 11:29

  10. core-ci voted on patch set 5 V +1 08/24/22, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30411

  11. core-ci voted on patch set 6 V +1 08/24/22, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30412

  12. Benjamin Franzke uploaded patch set 7 08/24/22, 12:25

  13. core-ci voted on patch set 7 V -1 08/24/22, 12:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30414

  14. Benjamin Franzke uploaded patch set 8 08/24/22, 12:35

  15. core-ci voted on patch set 8 V +1 08/24/22, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30415

  16. Benjamin Franzke uploaded patch set 9 08/24/22, 13:15

  17. Benjamin Franzke marked it ready for review 08/24/22, 13:15

  18. core-ci voted on patch set 9 V +1 08/24/22, 13:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30418

  19. Georg Ringer voted on patch set 9 V +1 CR +1 08/24/22, 13:31

  20. Stefan Bürk commented on patch set 9 08/24/22, 15:23

    If i get this right, this means that there are no dependencies anymore for "optipng" - so it should be possible to remove libc compat from the nodejs images afterwards again, as this will not be needed anymore (this provided a not possible recompile in alpine based images). May it be possible to have the (grunt-contrib-)imagemin replacement backported as dedicated changes for v11/v10 ) ? (Which will give us the ability to remove needed workarounds in the core-testing images in older version also).
  21. Benjamin Franzke commented on patch set 9 08/24/22, 20:06

    Reply

    Yea, optipng compat in the images shouldn't be required afterwards. Also, the optipng to squoosh conversion would be backportable to v10/v11. I wouldn't like to make promises (via Releases line) for the entire patdh right now, and rather decide on backports afterwards. (Because one could also try to do the yarn-to-npm conversion for v11, in order to bring both stacks on par again, so I'm not sure yet what to backport and what not).
  22. Stefan Bürk commented on patch set 9 V +1 CR +1 08/24/22, 21:28

    Reply

    It was just a question for a (later) dedicated backport/removal + core images. Not as blocker for this one.
  23. Benjamin Franzke voted on patch set 9 V +2 CR +2 08/25/22, 03:34

  24. Benjamin Franzke merged patch set 10 08/25/22, 03:35