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

Add metedata to the report file #39

Merged
merged 3 commits into from
Jul 3, 2022

Conversation

rgreinho
Copy link
Contributor

This patch adds a new metadata section to the report file being
generated by chain-bench.

This initial version adds the generation date, and the check statistics
which is useful to compare different scans and their evolutions over
time.

Fixes #38

This patch adds a new metadata section to the report file being
generated by chain-bench.

This initial version adds the generation date, and the check statistics
which is useful to compare different scans and their evolutions over
time.

Fixes aquasecurity#38
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2022

CLA assistant check
All committers have signed the CLA.

@rgreinho
Copy link
Contributor Author

The report file would now look like this (the results part in the snippet was shortened for readability):

{
  "Metadata": {
    "Date": "2022-06-28T13:40:36-05:00",
    "Statistics": {
      "Passed": 5,
      "Failed": 23,
      "Unknown": 8,
      "Total": 36
    }
  },
  "Results": [
    {
      "ID": "1.1.3",
      "Name": "Ensure any change to code receives approval of two strongly authenticated users",
      "Descrition": "Ensure that every code change is reviewed and approved by two authorized contributors who are strongly authenticated.",
      "Remediation": "An organization can protect specific code branches — for example, the \"main\" branch which often is the version deployed to production — by setting protection rules. These rules secure your code repository from unwanted or unauthorized changes. You may set requirements for any code change to that branch, and thus specify a minimum number of reviewers required to approve a change.",
      "Result": "Failed",
      "Reason": "",
      "Url": "https://avd.aquasec.com/compliance/softwaresupplychain/cis-1.0/cis-1.0-sourcecode/1.1"
    }
  ]
}

internal/printer/helpers.go Outdated Show resolved Hide resolved
@rgreinho rgreinho force-pushed the issues/38/report-metadata branch from 06032d8 to adb273d Compare June 29, 2022 15:16
@guyb1 guyb1 merged commit 7d143db into aquasecurity:main Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The result file has no date/identifier
3 participants