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 collector attribute and visibility reporting #72

Merged
merged 11 commits into from Jul 28, 2016

Conversation

Projects
None yet
4 participants
@chris-rock
Collaborator

chris-rock commented Jul 27, 2016

This audit cookbook PR adds a new method for collecting inspec reports via data_collector(Chef Visibility)

After the code review, these are the remaining tasks

  • add unit tests for the classes
  • document the new 'collector' attribute
    • breaking change for those using the compliance token path since the 'collector' attribute defaults to 'chef-server'
  • need to test the other two collecting methods, chef-server and chef-compliance

This work was done by @alexpop

@iennae iennae added the in progress label Jul 27, 2016

@alexpop

This comment has been minimized.

Collaborator

alexpop commented Jul 27, 2016

Current enriched data added to the report:

          "event_action": "exec",
          "event_type": "inspec",
          "compliance_summary": {
            "total": 11,
            "end_time": "2016-07-22T19:14:08+01:00",
            "node_name": "chef-client.solo",
            "passed": {
              "total": 3
            },
            "failed": {
              "total": 6,
              "minor": 3,
              "major": 2,
              "critical": 1
            },
            "skipped": {
              "total": 2
            },
            "status": "failed",
            "duration": 0.063081,
            "inspec_version": "0.28.0"
          }

When multiple profiles are executed, these only one report that aggregates profile results and summary information.

Hashes like profiles and controls that have user definable keys are also converted into arrays of hashes.

@arlimus

This comment has been minimized.

Contributor

arlimus commented Jul 28, 2016

@alexpop Kudos for this huge change!!

@chris-rock @alexpop just one more thing in this review: could we extract the blob from the actual test:
https://github.com/chef-cookbooks/audit/pull/72/files#diff-9a9a9e0554d7eea4f1d1744ab333cfdeR27
I had a hard time reading the actual test with the huge blob in the middle ;)

In either case, this is 👍 from my side.

@alexpop

This comment has been minimized.

Collaborator

alexpop commented Jul 28, 2016

Appreciate the valid feedback Dom, I pushed a new commit.

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Jul 28, 2016

Thanks @alexpop

@chris-rock chris-rock merged commit f8547ab into master Jul 28, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@chris-rock chris-rock deleted the ap/insights-report branch Jul 28, 2016

@iennae iennae removed the in progress label Jul 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment