inspec /inspec

InSpec: Auditing and Testing Framework

★ 3,105⑂ 679👁 129⑃ 5,374● 2,600▤ 235
RubyNOASSERTIONCreated 2015-08-28inspec.io
下载:Chef InSpec v5.24.24Chef-5.24.24 ↓5.24.242026-06-25
3,105
stars
679
forks
129
watchers
5,374
prs
2,600
issues
235
releases

README

Chef InSpec: Inspect Your Infrastructure

 Project State: Active
 Issues Response SLA: 14 business days
 Pull Request Response SLA: 14 business days

For more information on project states and SLAs, see this documentation.





Chef InSpec is an open-source testing framework for infrastructure with a human- and machine-readable language for specifying compliance, security and policy requirements.

ruby
 Disallow insecure protocols by testing

describe package('telnetd') do
  it { should_not be_installed }
end

describe inetd_conf do
  its("telnet") { should eq nil }
end


Chef InSpec makes it easy to run your tests wherever you need. More options are found in our CLI docs.

bash
 run test locally
inspec exec test.rb

 run test on remote host via SSH
inspec exec test.rb -t ssh://user@hostname -i /path/to/key

 run test on remote host using SSH agent private key authentication. Requires Chef InSpec 1.7.1
inspec exec test.rb -t ssh://user@hostname

 run test on remote windows host via WinRM
inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-password'

 run test on remote windows host via WinRM as a domain user
inspec exec test.rb -t winrm://windowshost --user 'UserName@domain' --password 'your-password'

 run test on docker container
inspec exec test.rb -t docker://container_id


 Features

- Built-in Compliance: Compliance no longer occurs at the end of the release cycle
- Targeted Tests: Chef InSpec writes tests that specifically target compliance issues
- Metadata: Includes the metadata required by security and compliance pros
- Easy Testing: Includes a command-line interface to run tests quickly

 Installation

Chef InSpec requires Ruby ( = 3.1.0 ).

All currently supported versions of Chef InSpec (5.0 and later) require accepting the EULA to use. Please visit the license acceptance page on the Chef docs site for more information.

 Install as package

The Chef InSpec package is available for MacOS, RedHat, Ubuntu and Windows. Download the latest package at Chef InSpec Downloads or install Chef InSpec via script:

text
 RedHat, Ubuntu, and macOS
curl https://chefdownload-commercial.chef.io/install.sh?license_id= | sudo bash -s -- -P inspec

 Windows
. { iwr -useb https://chefdownload-commercial.chef.io/install.ps1?license_id= } | iex; install -project inspec


Replace  with your license ID.

For more information about the install scripts, see the Chef Install Script documentation.

 Install it via rubygems.org

Installing Chef InSpec from source may require installing ruby build tools to manage gem dependencies. (A compiler-free variant is available with reduced functionality; use inspec-core-bin and inspec-core.)

To install build tools, use your package manager.

For CentOS/RedHat/Fedora:

bash
yum -y install ruby ruby-devel make gcc gcc-c++


For Ubuntu:

bash
apt-get -y install ruby ruby-dev gcc g++ make


To install the inspec executable, which requires accepting the Chef License, run:

bash
gem install inspec-bin


Y

Top issues

Latest release

Chef InSpec v5.24.24 v5.24.24 2026-06-25
v5.24.24 (2026-06-25)

 Merged Pull Requests
- Pin hab version for CI - Expeditor 7802 (balasubramanian-s)
- CHEF-32270-Github Action Pipeline for hab pkg promote 7796 (balasubramanian-s)
- CHEF-31158 Setup common config to block PR merges if trufflehog fails - inspec-5 7804 (Nik08)
- CHEF-20799 Fixes in json reporter 7799 (Nik08)
- Updated omnibus buildkite plugin version pin 7891 (Nik08)
- fix: CHEF-32686 - Pre-check waivers before control block evaluation to avoid eager resource execution 7832 (Vasu1105)
- CHEF-30766 Omnibus private submodule 7827 (Nik08)
- Ch/channel stable on inspe5 7907 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON