Code Monkey home page Code Monkey logo

Comments (5)

RulerOf avatar RulerOf commented on July 18, 2024 2

@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.

james-stocks avatar james-stocks commented on July 18, 2024 1

I would also recommend using profile inheritance or the new waivers feature (if appropriate)

from kitchen-inspec.

deric4 avatar deric4 commented on July 18, 2024 1

@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.

BentoumiTech avatar BentoumiTech commented on July 18, 2024

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.

stdevel avatar stdevel commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.