GitLab
Follow
Prevent secret leaks in source code with GitLab Secret Push Protection
Secret Push Protection in GitLab safeguards against inadvertent push of secrets like API tokens and keys. It detects high-confidence secrets during push, blocking them to prevent leaks. This proactive approach reduces the risk and effort required for secret rotation.Compromised credentials, including secrets, are a major source of breaches and costly data leaks. DevSecOps practices, including left-shifting security measures like Secret Push Protection, effectively mitigate this risk.GitLab's Secret Push Protection works by checking commits for high-confidence secrets and blocking pushes containing them. It complements Pipeline Secret Detection, which scans committed files for leaks.To enable Secret Push Protection, users with Maintainer role can toggle it in project's security configuration. Skipping it via Git options or commit messages is possible but requires justification.Audit events track usage of Secret Push Protection, including enable/disable status, skip actions, and skipped secrets, allowing for investigation and trend analysis.GitLab's own use of Secret Push Protection in its codebase has aided in its development and ensured stability and performance.User feedback is welcome through the feedback issue, which will be incorporated into future enhancements as the feature transitions from beta to general availability.Self-managed customers will gain access to Secret Push Protection upon its general release.By using Secret Push Protection in tandem with Pipeline Secret Detection, teams can maximize secret protection coverage throughout the software development lifecycle.