Add a cooldown period for dependabot#3820
Conversation
|
Given the current state of supply chain security and pervasive ongoing threats, e.g. see the recent Trivy Action attack that was used to pivot to publishing malicious It looks like security updates are triggered only when publicly disclosed vulnerabilities (CVEs or GH Advisories) are published so if a package developer doesn't disclose vulnerabilities in a timely fashion (or gets the version metadata wrong) there's a window where we could have a vulnerable dependency that we're not being told to update. I get that frequent Dependabot PRs are draining, especially in an ecosystem like JS which has huge dependency trees, but not sure delaying them is a good choice. |
|
I was thinking about the trivy incident when creating this PR and that adding a grace period gives time for malicious packages to be discovered, before updating to them. The grace period also as you said has the negative that it could delay a merge of an important PR, if it's not marked as a CVE or GH yet. For Trivy the malicious packages included the docker registries, the vs-code plugin, the github-action, and also apt. It is something we have discussed at daytime-job, in regards to how to deal with new packages being poisoned. Stepsecurity introduced a similar check for npm https://www.stepsecurity.io/blog/introducing-the-npm-package-cooldown-check with a default wait period of 2 days, so maybe 7 days is too much, combined with weekly schedules (monday by default). (Could potentially be 14 days) |
|
yarn also added an option for guarding against new versions: https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate where the example is set to 3 days
|
GitHub issue resolved #
I thought maybe it would be useful to hold dependency updates a short period before opening them using cooldowns.
https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference#cooldown-
Some relevant info from the the reference:
group/applies-to:default value is:version-updateswhich I guess is all updates, and thesecurity-updatesis the subset which are marked as security-related.Pull request Description:
Adds a cooldown period for opening dependabot pull requests to allow time for version update incidents to surface. Searched apache org and the usual configuration when configured seems to be in the interval between 4-7 days.
https://github.com/search?q=org%3Aapache+cooldown++path%3A.github&type=code
By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.
See the Apache Jena "Contributing" guide.