From b093b745f0350d56fa481026787c68632e974776 Mon Sep 17 00:00:00 2001 From: Jared Quick Date: Sat, 22 Sep 2018 09:50:32 -0400 Subject: [PATCH] init Signed-off-by: Jared Quick --- README.md | 5 +++++ controls/example.rb | 22 ++++++++++++++++++++++ inspec.yml | 12 ++++++++++++ libraries/.gitkeep | 0 4 files changed, 39 insertions(+) create mode 100644 README.md create mode 100644 controls/example.rb create mode 100644 inspec.yml create mode 100644 libraries/.gitkeep diff --git a/README.md b/README.md new file mode 100644 index 0000000..7fcd4be --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# InSpec Integration Attributes Profile + +This example shows the implementation of an InSpec profile with attributes which can be overwritten via audit/kitchen inspec. + +This profile is used in the inspec integration testing. diff --git a/controls/example.rb b/controls/example.rb new file mode 100644 index 0000000..3f5c683 --- /dev/null +++ b/controls/example.rb @@ -0,0 +1,22 @@ +# encoding: utf-8 + +control 'test audit attribute override' do + describe attribute('audit_attribute') do + it { should eq 'Attribute Override!' } + end +end + +control 'test help command' do + describe command('help') do + its('stdout') { should match(%r(.*)) } + end +end + +control 'test tmp directory' do + impact 0.7 + title 'Create /tmp directory' + desc 'An optional description...' + describe file('/tmp') do + it { should be_directory } + end +end diff --git a/inspec.yml b/inspec.yml new file mode 100644 index 0000000..d88851a --- /dev/null +++ b/inspec.yml @@ -0,0 +1,12 @@ +name: profile_with_attributes +title: InSpec Profile +maintainer: The Authors +copyright: The Authors +copyright_email: you@example.com +license: Apache-2.0 +summary: An InSpec Compliance Profile +version: 0.1.0 +attributes: + - name: audit_attribute + type: string + default: override_me diff --git a/libraries/.gitkeep b/libraries/.gitkeep new file mode 100644 index 0000000..e69de29