Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional metadata in json reports #256

Open
prabhu opened this issue May 18, 2020 · 1 comment
Open

Additional metadata in json reports #256

prabhu opened this issue May 18, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@prabhu
Copy link

prabhu commented May 18, 2020

Thanks for this great project. ShiftLeft scan internally use this tool for scanning Kubernetes configuration files. Scan uses an open standard format called SARIF for reporting and can automatically convert a range of JSON files to this format.

Conversion of kube-score json (both v1 and v2) is a bit tricky but possible. The following mandatory attributes are however required, though.

  • File name (Name of the yaml file or stdin)
  • Line number
  • Severity (Text such as low, medium, high, critical)

Thanks for your help in advance.

@zegl
Copy link
Owner

zegl commented Jun 2, 2020

Hi @prabhu. It's cool to see that you've integrated kube-score into scan!

I agree with you that it would be great to have some traceability of where the configuration input was coming from and that this is something that kube-score currently is lacking.

Unfortunately it's not completely straight forward to add easily, so I'll add it to the backlog for now.

Contributions from you (and others) to contribute to this are welcome!

@zegl zegl added the help wanted Extra attention is needed label Jun 2, 2020
bors bot added a commit that referenced this issue Aug 22, 2020
303: all: track file location in the parser and scorer r=zegl a=zegl

```
RELNOTE: Include file name and row of objects in the JSON output format (`--output-format json`).
```

This functionality is fairly basic, the filename and line points to the first line of the object in the input YAML.

This updates #256 


Co-authored-by: Gustav Westling <gustav@westling.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants