- What is Frogbot?
- Scan pull requests when they are opened
- Scanning repositories following new commits
- Installing and using Frogbot
- Contributions
Frogbot is a Git bot that scans your pull requests and repositories for security vulnerabilities. You can scan pull requests when they are opened, and Git repositories following new commits.
Frogbot uses JFrog Xray (version 3.29.0 and above is required) to scan your pull requests. It adds the scan results as a comment on the pull request. If no new vulnerabilities are found, Frogbot will also add a comment, confirming this.
Supported platforms:
- Bitbucket Server
- GitHub
- GitLab
Supported package management tools:
- Go
- Gradle
- Maven
- .NET
- npm
- NuGet
- Pip
- Pipenv
- Poetry
- Yarn 2
GitHub
After you create a new pull request, the maintainer of the Git repository can trigger Frogbot to scan the pull request from the pull request UI.
NOTE: The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file.
The Frogbot GitHub scan workflow is:
- The developer opens a pull request.
- The Frogbot workflow automatically gets triggered and a GitHub environment named
frogbot
becomes pending for the maintainer's approval.
GitLab
After you create a new merge request, the maintainer of the Git repository can trigger Frogbot to scan the merge request from the merge request UI.
NOTE: The scan output will include only new vulnerabilities added by the merge request. Vulnerabilities that aren't new, and existed in the code before the merge request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this merge request, use the includeAllVulnerabilities parameter in the frogbot-config.yml file.
The Frogbot GitLab flow is as follows:
- The developer opens a merge request.
- The maintainer of the repository reviews the merge request and approves the scan by trigerring the manual frogbot-scan job.
- Frogbot is then triggered by the job, it scans the merge request, and adds a comment with the scan results.
- Frogbot can be triggered again following new commits, by triggering the frogbot-scan job again. GitLab CI Run Button
Bitbucket Server
After you create a new pull request, Frogbot will automatically scan it.
NOTE: The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file.
The Frogbot scan on Bitbucket Server workflow:
- The developer opens a pull request.
- Frogbot scans the pull request and adds a comment with the scan results.
- Frogbot can be triggered again following new commits, by adding a comment with the
rescan
text.
Azure Repos
After you create a new pull request, Frogbot will automatically scan it.
NOTE: The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file.
The Frogbot Azure Repos scan workflow is:
- The developer opens a pull request.
- Frogbot scans the pull request and adds a comment with the scan results.
- Frogbot can be triggered again following new commits, by adding a comment with the
rescan
text.
Frogbot adds the scan results to the pull request in the following format:
If no new vulnerabilities are found, Frogbot automatically adds the following comment to the pull request:
If new vulnerabilities are found, Frogbot adds them as a comment on the pull request. For example:
Frogbot scans your Git repository and automatically opens pull requests for upgrading vulnerable dependencies to a version with a fix.
NOTE: This feature is currently supported for GitHub and GitLab only.
For GitHub repositories, Frogbot also adds Security Alerts which you can view in the GitHub UI:
Frogbot uses JFrog Xray for the scanning. The scanning is triggered following commits that are pushed to the repository.
Supported package management tools:
- Go
- Maven
- npm
- Pip
- Pipenv
- Poetry
- Yarn 2
Step 1 - Optionally set up a FREE JFrog Environment in the Cloud
Frogbot requires a JFrog environment to scan your projects. If you don't have an environment, we can set up a free environment in the cloud for you. Just run one of the following commands in your terminal to set up an environment in less than a minute.
The commands will do the following:
- Install JFrog CLI on your machine.
- Create a FREE JFrog environment in the cloud for you.
For macOS and Linux, use curl
curl -fL https://getcli.jfrog.io?setup | sh
For Windows, use PowerShell
powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup
After the setup is complete, you'll receive an email with your JFrog environment connection details, which can be stored as secrets in Git.
Step 2 - Install Frogbot
We welcome pull requests from the community. To help us improve this project, please read our Contribution guide.