This section provides best practices for managing branch scanning strategies with Endor Labs.
Branch scanning strategies
When integrating Endor Labs into your development workflow, consider the following branching strategies:
Default branch scanning
Scan your default branch (main/master) to establish a baseline of findings. This baseline is used for PR comparisons to identify new issues introduced by changes.
PR/MR scanning
Use endorctl scan --pr for pull request or merge request scans. This compares findings against the target branch baseline to highlight only new issues.
Release branch scanning
For release branches, consider running full scans to capture the complete security posture of your release candidates.
Best practices
-
Establish baselines first: Always scan your default branch before enabling PR scanning to ensure accurate baseline comparisons.
-
Regular baseline updates: Update baselines regularly by rescanning the default branch, especially after dependency updates.
-
Branch-specific policies: Consider using different policies for different branch types (feature, release, hotfix).
-
CI/CD integration: Integrate scans into your CI/CD pipeline to catch issues before merge.
For more information on scanning strategies, see the scanning strategies documentation.