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

Improvements in reportFormat JSON for errors during processing #76

Open
surendrapathak opened this issue Feb 27, 2023 · 0 comments
Open
Assignees

Comments

@surendrapathak
Copy link
Collaborator

When --reportFormat is JSON, we must ensure:

  1. Output is a valid JSON
  2. Score is set to 0 if there are any internal or processing errors.
  3. An error string is populated with any necessary error strings.

I recommend following changes:

  "run_id": "e6468750-1506-42ff-b635-16068fdcdb27",
  "timestamp": "2023-02-27T20:37:11Z",
  "creation_info": {
    "name": "sbomqs",
    "version": "v0.0.7",
    "scoring_engine_version": "2"
  },
  "files": [
    {
      "file_name": "sboms/trivy-0.36.1_alpine-3.17.2.spdx.json",
      "spec": "", # Cannot be filled
      "spec_version": "", # Cannot be filled
      "file_format": "json",
      "avg_score": 0,
      "error": "Error processing file: Invalid SBOM"
   }```
@surendrapathak surendrapathak changed the title Improvement in repotFormat JSON for errors during processing Improvement in reportFormat JSON for errors during processing Feb 27, 2023
@surendrapathak surendrapathak changed the title Improvement in reportFormat JSON for errors during processing Improvements in reportFormat JSON for errors during processing Feb 27, 2023
@kchetans kchetans self-assigned this Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants