Comments (5)
@james-stocks is there any information on how to include a waiver into my .kichen.yml file?
I go to your link but all I see is information on how to run inspec with a waiver file from my command line, which isn't useful in this context. I search this repo for the word "waiver" and only get the two issues discussing this exact topic.
Edit:
I found a viable workaround. The controls
input accepts a regex, so you can craft a regex using negative lookahead that excludes all of the tests you don't want to run. I didn't want to run sshd-44
, so my .kitchen.yml verifier section has this:
inspec_tests:
- name: ssh
git: https://github.com/dev-sec/ssh-baseline.git
controls:
- /^(?!sshd-44$).*/
You can skip multiple tests with a pipe:
controls:
- /^(?!sshd-44$|sshd-45$|sshd-46$).*/
It's a little ugly, but does exactly what I need here.
from kitchen-inspec.
I would also recommend using profile inheritance or the new waivers feature (if appropriate)
from kitchen-inspec.
@james-stocks is there any information on how to include a waiver into my .kichen.yml file?
Hey @RulerOf , sounds like you worked something out but here's an example of using a waiver file in your kitchen config:
verifier:
name: inspec
inspec_tests:
- git: https://github.com/dev-sec/cis-dil-benchmark.git
input_files:
- <your waiver file>.yaml
It wasn't super intuitive to me at first, but the inspec documentation for the waiver file format says:
Waiver files are input files with a specific format:
...
though the above works, it can make the list a little confusing to read without committing to some sort of naming/path convention.
Hope that helps!
from kitchen-inspec.
I'm not sure but this could maybe help you, check the Skipping a Control from a Profile
section
https://blog.chef.io/understanding-inspec-profile-inheritance/
from kitchen-inspec.
I would also recommend using profile inheritance or the new waivers feature (if appropriate)
Thanks for pointing out the new waiver feature!
from kitchen-inspec.
Related Issues (20)
- Expeditor cannot find agent for inspec/kitchen-inspec HOT 6
- Enable the ability to pass a inspec `config.yml` file to kitchen
- Incorrect lower bound specification for `inspec` dependency HOT 2
- 'junit' is not a valid reporter type in chef workstation 20.9.136 HOT 5
- Error when using plugin-based reporters and multiple instances HOT 1
- WinRM execution expired (HTTPClient::ConnectTimeoutError)
- inspec array input treated as hash w/ keys HOT 1
- junit(2) is not a valid reporter type HOT 2
- v2.4.0 Regression: reporters HOT 1
- 'aws_lambda' resource not identified
- Lifecycle Hooks Do Not Fire If InSpec Tests Fail HOT 1
- Dependabot can't resolve your Ruby dependency files
- kitchen verify fails on Windows HOT 1
- Dependabot can't resolve your Ruby dependency files
- Dependabot can't resolve your Ruby dependency files
- Documentation needs to be moved to https://kitchen.ci/docs/verifiers/inspec/
- Waivers file is not used HOT 4
- add support for inspec 6.6.0, updated reporters and config options
- add the ability to pass any inspec --'flags' to the verifier - such as 'enhanced-outcomes' or any that we add in the future HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitchen-inspec.