inspec-ssm-reporter

command module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 11 Imported by: 0

README

inspec-ssm-reporter

Build Status

Overview

This is a utility to transform InSpec JSON into an AWS Compliance document

  • Parses JSON from STDIN
  • Transforms into an AWS Compliance Document
  • Reports to SSM Compliance
Background

The default AWS-provided pattern leverages the Ruby environment provided by ChefDK and installs aws-sdk-ssm directly from Rubygems. Installing ChefDK for this is heavy-handed and not ideal at scale. Additionally, the scripts pull installation packages directly from the Internet which does not work in an air-gapped environment.

The goal here is to deploy InSpec by itself (much smaller package) and leverage this static Golang binary to handle the compliance reporting. This removes the need for a Ruby environment

AWS Equivalent
Calling Scripts
Usage
Linux
inspec exec . --reporter json | inspec-ssm-reporter
if [ $? -ne 0 ]; then
  echo "Failed to execute InSpec tests: see stderr"
  EXITCODE=2
fi
Windows
$results=inspec exec . --reporter json 2> errors.txt
$results | inspec-ssm-reporter
if(!$?) {
  Write-Host "Failed to execute InSpec tests: see stderr"
  $EXITCODE=2
}
Development
  1. Use gvm under WSL
  2. gvm install go1.15.1
  3. Run gofmt before committing
    • gofmt -w .
InSpec JSON Model

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL