Help Targets
Add a Git repository
Scan a public or private Git repository for vulnerable dependencies and leaked secrets, using an access token that can read it.
A Git repository target lets Bavn clone a repository and check its code for vulnerable dependencies and leaked secrets. Bavn proves the repository is yours by reaching it with an access token you give it, so a token is needed for public repositories as well as private ones.
Make a read-only token
Create a token at your Git host that can read this repository and nothing more:
- GitHub: a fine-grained personal access token with read access to the repository's contents.
- GitLab: a project access token (or personal token) with
read_repository. - Bitbucket: a repository access token with read access to the repository.
Bavn needs to read only. It stores the token encrypted and never shows it again; the edit form leaves the field blank and keeps the stored token unless you type a new one.
Add the repository
- Open Targets and choose New target.
- Set Type to Git repository and give it a Label.
- Under Repository, enter the Repository URL, such as
https://github.com/your-org/your-repo.git. - Access token: paste the token.
- Username: leave it empty for GitHub, GitLab or Bitbucket access tokens; Bavn uses the name each host expects. Fill it in only when your host needs a real user name with the token, such as a Bitbucket app password.
- Save, then choose Verify ownership on the target's row and Check now. Bavn checks that the token can list the repository's branches and tags (
git ls-remote), without cloning it. If it can, the target is verified.
The repository's host must be reachable from the internet. A Git server on a private address is refused, for the same reason Bavn never scans private addresses from outside.
What Bavn scans in a repository
| Scan type | Engine | What it finds |
|---|---|---|
| Dependencies | Trivy | Known vulnerabilities (CVEs) in the packages your lock files and manifests name, rated low to critical. |
| Secrets in repo | Gitleaks | Passwords, API keys and other secrets written into the code. Every leaked secret is rated high. |
| SBOM & CVEs | Syft and Grype | Syft builds a software bill of materials, a list of every component in the repository; Grype matches it against known vulnerabilities. |
Some details worth knowing:
- Secrets in repo checks the latest commit of the default branch. Secrets that exist only in older commits are not found.
- A leaked secret's value stays in Bavn's database for the finding's evidence. Alert emails never include it.
Change the URL or the token
To use a new token, choose Edit, paste it into Access token and save. To point the target at another repository, change the Repository URL and paste a token for that repository in the same save: a new URL clears the verification and the stored token, so the old token is never sent to a different host. Then verify again.
How many repositories you can add
Free includes 3 repositories, Starter 20 repositories and Pro unlimited repositories. See Plans and limits.