Questions tagged [inspec]

For questions about InSpec, a Ruby-based open-source testing framework for testing and auditing applications and infrastructure.

Filter by
Sorted by
Tagged with
1
vote
1answer
233 views

Inspec errors using https://github.com/dev-sec/linux-baseline

I am running the following command inspec exec https://github.com/dev-sec/linux-baseline -t ssh://ubuntu@10.0.1.22 -i ~/.ssh/id_rsa --sudo And I am getting failures for Check login.defs (4 failed) ...
4
votes
1answer
46 views

Condition to skip a test when running in a container

I'm writing an Inspec profile which has a specific control that I want to skip if the control is running inside a docker container. This looks like: control 'ssh daemon' do impact 'critical' ...
-1
votes
1answer
102 views

How to have Kitchen CI run a script on success?

I've got a Chef repo that uses test-kitchen. I have a pretty good battery of tests, and when I run the tests and they're successful, I have a vendor.sh script that does some cleanup and a Berks vendor....
3
votes
1answer
2k views

Inspec tests conditional on OS version

What is the idiomatic way to tell Inspec to run test X on OS version A and test Y on OS version B? I'm aware of the technique of dumping the Chef node object to a JSON file in /tmp but that isn't ...
2
votes
1answer
632 views

How do I run the InSpec using a wrapper profile?

This blog post describes wrapper profiles in detail: https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/ At the very end of the post, it references a Git repo that contains an ...
0
votes
1answer
218 views

Why won't InSpec admit that port 5432 is listening inside a PostgreSQL container?

Background I'm trying to test a PostgreSQL container with InSpec 2.1.10, but I cannot get a simple port check to return true, even though Docker, netstat, and psql all report that the port is ...