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
1 answer
396 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://[email protected] -i ~/.ssh/id_rsa --sudo And I am getting failures for Check login.defs (4 failed) ...
CLJ's user avatar
  • 155
4 votes
1 answer
101 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' ...
Bruce Becker's user avatar
  • 3,570
0 votes
1 answer
204 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....
Chaim Eliyah's user avatar
3 votes
1 answer
3k 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 ...
Gaius's user avatar
  • 1,086
2 votes
1 answer
771 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 ...
james.garriss's user avatar
0 votes
1 answer
277 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 ...
CodeGnome's user avatar
  • 242