Skip to content

Commit 25052c1

Browse files
wbambergElchi3
andauthored
Update dependency update guideline (#47)
* Update dependency update guideline * Fix changed guideline * Update docs/swag.html Co-authored-by: wbamberg <will@bootbonnet.ca> --------- Co-authored-by: Florian Scholz <fs@florianscholz.com>
1 parent 8eecd1b commit 25052c1

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

docs/swag.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,24 @@
321321
- Threat modeling guide (soon on MDN)
322322
- Example threat model (soon on MDN)
323323

324-
### Use package managers such as NPM to automatically manage dependencies and enable updates
324+
### Control dependency updates
325325

326-
Package managers streamline the process of managing libraries and dependencies, ensuring that you can easily update to the latest versions, which often include important security patches.
326+
If your project uses any third-party dependencies, you need to be able to respond when updated versions of those packages are released. There are two security considerations here:
327+
328+
- If a vulnerability is found in a dependency, and a fixed version is released, you need to adopt it as soon as possible.
329+
- If an attacker has compromised the account of one of the dependency's maintainers, and used it to publish a malicious update, you need to avoid adopting it.
330+
331+
To address both these considerations, a software project should:
332+
333+
- Use a package manager and a tool, such as [Dependabot](https://docs.github.com/en/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/configuring-dependabot-security-updates) or [Renovate](https://docs.renovatebot.com/), that can monitor your dependencies for known vulnerabilities and updates.
334+
- Use a [lockfile](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/Supply_chain_attacks#using_a_lockfile) to give you precise control over the versions of your dependencies, and to prevent your build system from automatically updating dependencies.
335+
- Have a process to review suggested dependency updates, to evaluate the risk/reward of accepting them.
336+
- Consider enforcing a delay before accepting updates, using settings like Deno's [`minimumDependencyAge`](https://deno.com/blog/v2.6#controlling-dependency-stability): this increases the chances that a malicious update will be discovered before you have accepted it into your own project.
337+
338+
#### Learn more
339+
340+
- [Configuring Dependabot](https://docs.github.com/en/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/configuring-dependabot-security-updates) (GitHub)
341+
- [Package Managers Need to Cool Down](https://nesbitt.io/2026/03/04/package-managers-need-to-cool-down.html)
327342

328343
### Monitor known vulnerabilities in your web app's direct & indirect dependencies
329344

@@ -333,9 +348,6 @@
333348

334349
- [Configuring Dependabot](https://docs.github.com/en/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/configuring-dependabot-security-updates) (GitHub)
335350

336-
### Keep dependencies up to date
337-
338-
Keeping dependencies (i.e., libraries, polyfills, frameworks, etc.) up to date minimizes the risk of exploitation through known vulnerabilities. Regular updates should be part of your development lifecycle.
339351

340352
### Do not push secrets to a repository
341353

0 commit comments

Comments
 (0)