jfrog / jfrog/jfrog-cli-security

Add Locations to the Docker scan results on Sarif output

Open
#358 3 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #1021 by @attiasas — merged
feature request
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/)

  1. Pull nginx:latest - jf docker pull <rt_instance>/nginx:latest
  2. Scan nginx:latest using sarif format,
    jf docker scan <rt_instance>/nginx:latest --format sarif
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.