Merging to default branch with outdated code allowed
Rule Details
Cortex AppSec Rule ID
APPSEC_CICD_197
Category
Flow Control Mechanism
Severity
LOW
Impact
Merging branches into the default branch without ensuring they are up-to-date can present a security risk. This is because merging outdated code may result in the omission of the latest patches and updates from the main stream, including critical security fixes. As a result, potential vulnerabilities may remain unresolved, exposing the system to security threats.
Recommended Solution - Buildtime
Add branch protection rules to your repository, requiring that all branches must be up-to-date before being merged into the default branch.
For additional instructions, refer to https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging.
Last updated
Was this helpful?
