This task downloads gitleaks and runs a gitleak scan on the specified repository. This extension uses the powerful Gitleak to analyze the credentials in repositories.
- task: gitleaks@1
displayName: 'Git Scan'
inputs:
type: Default
mode: Info
You can display gitleaks report in the pipeline in the extensions tab.
Github has a great article on this using the BFG Repo Cleaner.