jfrog / jfrog/jfrog-cli-security
Add Locations to the Docker scan results on Sarif output
A pull request for this has already been merged.
- #1021 by @attiasas — merged
- Dominant language
- Go
- Stars
- 13
- Forks
- 50
- Avg merge
- 3d 48m
- Merged PRs (30d)
- 26
Description
Using the jfrog cli to scan a docker image using '--format sarif' produces a sarif file not accepted by GitHub Security Centre due to the locations field missing for the results set [GH1001]
Steps To Reproduce:
Prerequisite: use a jfrog instance setup with a remote docker repository (https://registry-1.docker.io/)
- Pull nginx:latest - jf docker pull <rt_instance>/nginx:latest
- Scan nginx:latest using sarif format,
jf docker scan <rt_instance>/nginx:latest --format sarif - Upload sarif output to https://sarifweb.azurewebsites.net/Validation and select 'GitHub Integration rules' there are a few issues, the one which GitHub explicitly complains about is GH1001 in the results.
Expected:
GH1001 issue is addressed so the Sarif output is accepted by GitHub when uploaded to GitHub Security Centre
Other:
Example of sarif file of nginx is attached
jfrog-docker-scan-of-nginx-latest-2.50.2.sarif.json.gz
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the jf docker scan path that generates SARIF output, then reproduce the nginx:latest scan against a remote Docker repository. Validate the generated file with the SARIF validator and GitHub Integration rules; done means each relevant result has the required locations field and the output is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100