Skip to content
Discussion options

You must be logged in to vote

Use a separate branch for security updates

Don’t merge Dependabot PRs directly into main.

Create a branch like security-updates and merge PRs there first.

Run your full test suite on this branch to catch breaking changes.

Use versioning or package constraints

If a PR updates a package to a version incompatible with your project, adjust the version range in your package.json (or equivalent) to allow a secure but compatible version.

For example, use "^1.2.5 <2.0.0" instead of blindly updating to 2.0.0.

Conditional merging in workflows

You can configure GitHub Actions to run security updates only on certain branches:

on:
pull_request:
branches: [ security-updates ]

This avoids unnecessary PR…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gerodneyw-cell
Comment options

Answer selected by ideas-whisper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question Ask and answer questions about GitHub features and usage
3 participants