How to get notified when a large scan completes?
Security for Bitbucket can send e-mail notifications after scans complete, containing links to view and download the scan results.
Use the REST API for Mass Scanning and provide the email
parameter to your REST call, like so:
curl -u admin -X PUT "https://{bitbucket.server}/rest/security/latest/status/total_rescan?email=admin@compnay.co&email=manager@company.co"
curl -u admin -X PUT "https://{bitbucket.server}/rest/security/latest/status/projects/{projectKey}?email=admin@compnay.co&email=manager@company.co"
curl -u admin -X PUT "https://{bitbucket.server}/rest/security/latest/status/projects/{projectKey}/repos/{repoSlug}?email=admin@compnay.co&email=manager@company.co"
curl -u admin -X PUT "https://{bitbucket.server}/rest/security/latest/status/projects/{projectKey}/repos/{repoSlug}/branches?name=main-branch&email=admin@company.co&email=manager@company.co"
These commands will send e-mails to both admin@company.co
and manager@company.co
when the scans complete. The email
parameter may be specified multiple times.
E-mail notifications are not currently exposed via the user interface – only via the REST API.