Open Drarig29 opened 1 month ago
Note that this was mentioned in https://github.com/dependabot/dependabot-core/issues/7639#issuecomment-1680152672:
bump the dependency specification in the package.json to a version range that does not allow any vulnerable version
Is there an existing issue for this?
Feature description
While it makes sense for most projects to only update the lock file, it's not enough for libraries.
Example:
package.json
file that it works with"foo": "^1.0.0"
foo
and the affected version is1.0.0
package-lock.json
file to use1.0.1
instead"foo": "^1.0.0"
, they still have the vulnerablefoo@1.0.0
in their project.Now, if the dependabot PR had changed the
package.json
file to"foo": "^1.0.1"
(in addition to the lock file):"foo": "^1.0.1"
, the newfoo@1.0.1
is downloaded in their project.This results in less work for library consumers.
Currently, I can't rely on the automated dependabot PRs because of this, so I always close them and handle the dependency upgrade manually.
So in the end, I mostly use those PRs as a call to action. As a side note, it would be cool for the GitHub & Slack integration to support notifications on security vulnerabilities (https://github.com/integrations/slack/issues/1797).