Skip to content

fix(deps): bump lodash to 4.18.1 in vulnerability-frontend [foreman-3.16]#2570

Open
Odilhao wants to merge 1 commit into
RedHatInsights:foreman-3.16from
Odilhao:fix/foreman-3.16-lodash-4.18.0
Open

fix(deps): bump lodash to 4.18.1 in vulnerability-frontend [foreman-3.16]#2570
Odilhao wants to merge 1 commit into
RedHatInsights:foreman-3.16from
Odilhao:fix/foreman-3.16-lodash-4.18.0

Conversation

@Odilhao
Copy link
Copy Markdown

@Odilhao Odilhao commented Apr 22, 2026

Summary

Bumps lodash (transitive dependency) in vulnerability-frontend to resolve 2 security CVEs.
All changes are confined to dependency lockfiles and the overrides section of package.json; no application logic was modified.

CVEs addressed

CVE ID Package Old version New version Jira
CVE-2026-4800 lodash 4.17.21 4.18.1 SAT-43987
CVE-2025-13465 lodash 4.17.21 4.18.1 SAT-41941

Changes

File Change
package.json Added lodash override to pin transitive dependency to ^4.18.0
package-lock.json Bumped lodash from 4.17.21 to 4.18.1

Testing

  • CI pipeline passes on this branch.
  • No breaking changes to public API or types introduced by the version bump.
  • If lockfile was manually edited (pipenv/poetry/npm unavailable), confirm the lock regeneration CI step succeeds.

References

Summary by Sourcery

Bump lodash dependency in vulnerability-frontend to address reported security vulnerabilities.

Build:

  • Add an npm overrides entry to pin lodash to ^4.18.0 and update the lockfile to resolve to lodash 4.18.1.

Chores:

  • Refresh dependency lockfile entries to reflect the updated lodash version.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 22, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Bumps the transitive lodash dependency to 4.18.1 in vulnerability-frontend by adding an override in package.json and updating the lockfile; no runtime/application logic changes were made.

File-Level Changes

Change Details Files
Pin lodash transitive dependency to a secure 4.18.x version via overrides and lockfile update.
  • Add a top-level lodash entry to the package.json overrides section to force consumers to use ^4.18.0
  • Update package-lock.json so all resolved lodash entries are upgraded from 4.17.21 to 4.18.1 in the dependency tree
package.json
package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Odilhao
Copy link
Copy Markdown
Author

Odilhao commented Apr 22, 2026

Master branch fix: #2568 · Other backport: foreman-3.18 #2569

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The override for lodash is set to "^4.18.0" while the description states you’re specifically targeting 4.18.1; consider pinning to "4.18.1" (or a narrower range) to ensure the security fix and avoid pulling in unexpected future minors.
  • Consider scoping the lodash override to only the dependency paths that actually require it (rather than a top-level global override) to reduce the risk of unintended version conflicts with other packages depending on lodash.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The override for lodash is set to "^4.18.0" while the description states you’re specifically targeting 4.18.1; consider pinning to "4.18.1" (or a narrower range) to ensure the security fix and avoid pulling in unexpected future minors.
- Consider scoping the lodash override to only the dependency paths that actually require it (rather than a top-level global override) to reduce the risk of unintended version conflicts with other packages depending on lodash.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Odilhao
Copy link
Copy Markdown
Author

Odilhao commented Apr 22, 2026

Thanks for the review! To clarify: lodash 4.18.1 is published on npm — npm install resolved ^4.18.0 to 4.18.1 and the lockfile confirms it (latest tag is now 4.18.1). The override uses ^4.18.0 intentionally so future patch releases still satisfy the CVE requirement without needing another PR — the lockfile is pinned at 4.18.1 for reproducible installs.

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.

1 participant