2016-09-11 23:26:00 +00:00
---
2018-02-22 00:42:55 +00:00
title: InSpec - Audit and Automated Testing Framework
description: InSpec is an open source (OSS) automated testing tool for integration, compliance, security, and other policy requirements. Easily test your network and systems on-site or on cloud platforms such as AWS, Azure, and Docker Containers.
priority: 1.0
change_frequency: daily
2016-09-11 23:26:00 +00:00
---
2017-01-06 21:21:45 +00:00
2018-02-17 15:44:42 +00:00
/! header
header.bg-gradient.margin-top-offset.short-bg.relative
.row.align.margin-top-sm
2018-02-20 01:04:16 +00:00
.large-7.medium-7.mobile-12.columns.z-20
2018-02-17 15:44:42 +00:00
.margin-both
h1.t-white InSpec is compliance as code
h3.t-white Turn your compliance, security, and other policy requirements into automated tests.
/! buttons
2018-02-20 01:04:16 +00:00
.row.align.columns.margin-top-sm.mobile-row-btn
a.button.btn-lg.btn-purple.shadow-dark.margin-right-xs.mobile-row-btn href="/downloads"
2018-02-17 15:44:42 +00:00
i.fa.fa-cloud-download
2019-05-03 18:49:00 +00:00
span download inspec 4
2018-02-20 01:04:16 +00:00
a.button.btn-lg.btn-white-o.shadow-dark.mobile-row-btn href="/tutorials" browse tutorials
2018-02-17 15:44:42 +00:00
a class="github-button" href="https://github.com/chef/inspec" data-size="large" data-show-count="true" aria-label="Star chef/inspec on GitHub" Star
2018-02-20 01:04:16 +00:00
.large-5.medium-5.columns.relative.mobile-hide
2018-02-17 15:44:42 +00:00
/! diamond image
2018-02-22 00:42:55 +00:00
img.diamond src="/images/home/diamond.png" alt="image of diamond"/
img.grid-animate.fit.z-20 src="/images/home/web.svg" onerror="this.src='/images/home/web.png'" alt="image of grid"/
2018-02-17 15:44:42 +00:00
/! announcement
.row.columns
2018-03-07 11:25:54 +00:00
.box-white.shadow.z-20.slide-left
2019-05-03 18:49:00 +00:00
h3.large-11.medium-11 Announcing InSpec 4
p.large-11.medium-11 Inputs system overhaul, updated AWS-SDK to v3, support for the new Chef License, and many bugfixes and minor features
2018-02-17 15:44:42 +00:00
#expand
2018-03-07 11:25:54 +00:00
.margin-top-sm.brdr-left.large-11.medium-11
.margin-left-sm
2018-10-15 22:25:27 +00:00
h4.t-purple core
2019-05-03 18:49:00 +00:00
p Inputs system overhaul - more consistent, extensible, and predictable
p Updated AWS-SDK to v3
p Laying the foundation for opt-in telemetry
p Support for the new Chef License
p Add support for more_permissive_than? on the File resource
2019-05-07 19:16:31 +00:00
p Many other minor bugfixes!
2018-10-15 22:25:27 +00:00
.margin-top-sm.brdr-left.large-11.medium-11
2018-03-07 11:25:54 +00:00
.margin-left-sm
2019-05-03 18:49:00 +00:00
h4.t-purple inspec-bin
p Moved the `inspec` executable to a separate gem, `inspec-bin`. This allows use of the `inspec` gem as a library without the licensing restrictions placed on the executable.
p This release is the first to require accepting a license before using it as an executable.
2018-02-17 15:44:42 +00:00
.margin-top-xs
a#expandBtn Show all new features
2017-01-09 05:29:00 +00:00
/! canvas elements
2018-02-17 15:44:42 +00:00
#particles-js.particles
2017-01-06 08:06:40 +00:00
canvas.particles-js-canvas-el /
2017-01-20 09:15:38 +00:00
2018-02-17 15:44:42 +00:00
/! Get started
.margin-both
.row.relative
.columns
hr
small.t-gray How InSpec works
h2.txt-margin Get started with InSpec in 3 simple steps
hr
2018-02-20 01:04:16 +00:00
.large-5.medium-5.columns.blue-grid.mobile-hide
2018-02-22 00:42:55 +00:00
img.grid-animate.fit src="/images/community/blue-web.svg" onerror="this.src='/images/community/blue-web.png'" alt="image of grid"
2018-02-17 15:44:42 +00:00
.margin-top-sm
2018-02-20 01:04:16 +00:00
.row.align.mobile-row
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align
.num-container
h3.t-purple 1
.block.margin-left-sm
h4.t-purple write the test
p Create simple Ruby-based tests to verify your expected state against the current state of your systems.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align.slide-right
.tooltip-triangle
.box-dark.box-scroll.tip.shadow
pre.slide-up-slow.animate-delay-10
code control 'example-1.0' do
code impact 0.9
code title 'Ensure login disabled'
code desc 'An optional description...'
code describe sshd_config do
code its('PermitRootLogin') {
code should_not cmp 'yes'
code }
code end
code end
.margin-top-xs
2018-02-20 01:04:16 +00:00
.row.align.mobile-row
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align
.num-container
h3.t-purple 2
.block.margin-left-sm
h4.t-purple run the test
p Execute your test against your target system locally or remotely with one simple command.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align.slide-right
.tooltip-triangle
.box-dark.tip.shadow
pre
2018-02-17 18:27:10 +00:00
code $ inspec exec linux-baseline
2018-02-17 15:44:42 +00:00
.margin-top-xs
2018-02-20 01:04:16 +00:00
.row.align.mobile-row
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align
.num-container
h3.t-purple 3
.block.margin-left-sm
h4.t-purple See the results
p See which tests failed, passed and skipped and the expected state against the current state of your target system, in one simple output.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
2018-02-17 15:44:42 +00:00
.flex.align.slide-right
.tooltip-triangle
.box-dark.box-scroll.tip.shadow
pre.slide-up-slow.animate-delay-20
code Profile: InSpec Profile (example_profile)
code Version: 0.1.0
code Target: local://
br
code ✔ example-1.0: Ensure root login is disabled via SSH
code ✔ SSHD Configuration PermitRootLogin should not cmp == "yes"
br
code Profile Summary: 1 successful control, 0 control failures, 0 controls skipped
code Test Summary: 1 successful , 0 failures, 0 skipped
2017-01-20 09:15:38 +00:00
2018-02-17 15:44:42 +00:00
/! how it works
.row.relative.margin-under-sm
.columns.strict-center
hr.center
small.t-gray Features of InSpec
h2.txt-margin InSpec is compliance by design
hr.center
2017-01-20 09:15:38 +00:00
2018-02-20 01:04:16 +00:00
.row.strict-center.mobile-row
.large-6.medium-6.columns.mobile-12.margin-under-xs
2018-02-17 15:44:42 +00:00
.box-white.shadow.strict-center.fit-height.relative.slide-up
2018-02-22 00:42:55 +00:00
img.icon-art.margin-under-xs src="/images/home/platform.svg" onerror="this.src='/images/home/platform.png'" alt="image for InSpec platform support"/
2018-02-17 15:44:42 +00:00
h4.t-purple Platform Agnostic
p
2018-02-22 00:42:55 +00:00
| InSpec supports all major operating systems and is platform agnostic, allowing you the freedom to run compliance and security tests anywhere.
2018-03-07 11:25:54 +00:00
a title="Linux, Windows/Azure, Mac, Ubuntu, Docker, AWS, VMware, RedHat"
img.icon-logos src="/images/home/platform-logos.svg" onerror="this.src='/images/home/platform-logos.png'" alt="logos for Linux, Windows/Azure, Mac, Ubuntu, Docker container, AWS, VMware"/
2018-02-17 15:44:42 +00:00
.triangle-right
2018-02-20 01:04:16 +00:00
.large-6.medium-6.columns.mobile-12.margin-under-xs
2018-02-17 15:44:42 +00:00
.box-white.shadow.strict-center.fit-height.relative.slide-up
2018-02-22 00:42:55 +00:00
img.icon-art.margin-under-xs src="/images/home/test.svg" onerror="this.src='/images/home/test.png'" alt="image for InSpec remote and local testing"/
2018-02-17 15:44:42 +00:00
h4.t-purple Test locally or remotely
p
| InSpec provides a local agent for host-based assessments, as well as full remote testing support via SSH and WinRM.
2018-03-07 11:25:54 +00:00
a title="SSH, WinRM"
img.icon-logos src="/images/home/test-logos.svg" onerror="this.src='/images/home/test-logos.png'" alt="logos for SSH and WinRM" /
2018-02-17 15:44:42 +00:00
.triangle-right
2017-01-20 09:15:38 +00:00
2018-02-20 01:04:16 +00:00
.row.strict-center.mobile-row
.large-6.medium-6.mobile-12.columns.margin-under-xs
2018-02-17 15:44:42 +00:00
.box-white.shadow.strict-center.fit-height.relative.slide-up
2018-02-22 00:42:55 +00:00
img.icon-art.margin-under-xs src="/images/home/run.svg" onerror="this.src='/images/home/run.png'" alt="image for InSpec freedom"/
2018-02-17 15:44:42 +00:00
h4.t-purple Free to run anywhere
p
| InSpec is an open-source language that can easily express compliance as code, with the freedom to run anywhere.
.triangle-right
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns.margin-under-xs
2018-02-17 15:44:42 +00:00
.box-white.shadow.strict-center.fit-height.relative.slide-up
2018-02-22 00:42:55 +00:00
img.icon-art.margin-under-xs src="/images/home/extensible.svg" onerror="this.src='/images/home/extensible.png'" alt="image for InSpec's extensible language" /
2018-02-17 15:44:42 +00:00
h4.t-purple Extensible language
p
| Easily extend the InSpec language to cover new operating systems, devices, or applications.
.triangle-right
2017-01-20 09:15:38 +00:00
2018-02-17 15:44:42 +00:00
/! use cases
2017-01-20 09:15:38 +00:00
2018-02-17 15:44:42 +00:00
.bg-gradient.margin-top
.pad-both.relative
#particles-second
canvas.particles-js-canvas-el
.slider
.row
2018-02-20 01:04:16 +00:00
.columns.selectors.mobile-hide.z-20
2018-02-17 15:44:42 +00:00
a.button.btn-lg.btn-slider.shadow-dark for Compliance
a.button.btn-lg.btn-slider.shadow-dark for Infrastructure
a.button.btn-lg.btn-slider.shadow-dark for Provisioning
2018-02-20 01:04:16 +00:00
.columns.selectors.slider-selectors.mobile-show.z-20
a.button.btn-lg.btn-slider.shadow-dark Compliance
a.button.btn-lg.btn-slider.shadow-dark Infrastructure
a.button.btn-lg.btn-slider.shadow-dark Provisioning
2018-02-17 15:44:42 +00:00
.view
.row
2018-02-20 01:04:16 +00:00
.large-7.medium-7.mobile-12.columns
2018-02-17 15:44:42 +00:00
h2.t-white.margin-both-sm
| Transform your compliance and security requirements into simple code
2018-02-20 01:04:16 +00:00
.row.mobile-row
.large-6.medium-6.mobile-12.columns.mobile-row
.box-white.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
.block.margin-both-xs
h4.t-purple Codify agreements
p Combine profiles and customize them with overlays. Pick controls and define exceptions as code.
.block.margin-under-xs
h4.t-purple Add context to your tests
p Utilize many fields like descriptions, tags, and impact.
.block
h4.t-purple Apply to all systems
p Analyze everything using the same codified profiles and controls.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
.box-dark.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
pre.t-white.align-vertical-50
code control 'sshd-21' do
code title 'Set SSH Protocol to 2'
code desc 'A detailed description'
code impact 1.0 # This is critical ref 'compliance guide, section 2.1'
code describe sshd_config do
code its('Protocol') { should cmp 2 }
code end
code end
.view
.row
2018-02-20 01:04:16 +00:00
.large-7.medium-7.mobile-12.columns
2018-02-17 15:44:42 +00:00
h2.t-white.margin-both-sm
| Solve your infrastructure testing needs simply and efficiently
2018-02-20 01:04:16 +00:00
.row.mobile-row
.large-6.medium-6.mobile-12.columns.mobile-row
.box-white.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
.block.margin-both-xs
h4.t-purple Test the desired state
p Verify the current desired state of your apps and infrastructure according to the code you write.
.block.margin-under-xs
h4.t-purple HUMAN-READABLE CODE
p Reduce friction by writing tests that are easy to understand by anyone.
.block
h4.t-purple Extensible
p Create custom resources with ease and share them easily with others.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
.box-dark.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
pre.t-white.align-vertical-50
code describe file('/etc/myapp.conf') do
code it { should exist }
code its('mode') { should cmp 0644 }
code end
br
2018-02-23 21:57:59 +00:00
code describe apache_conf do
code its('Listen') { should cmp 8080 }
2018-02-17 15:44:42 +00:00
code end
br
code describe port(8080) do
code it { should be_listening }
code end
.view
.row
2018-02-20 01:04:16 +00:00
.large-7.medium-7.mobile-12.columns
2018-02-17 15:44:42 +00:00
h2.t-white.margin-both-sm
| Verify provisioning to cloud providers
2018-02-20 01:04:16 +00:00
.row.mobile-row
.large-6.medium-6.mobile-12.columns.mobile-row
.box-white.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
.block.margin-both-xs
h4.t-purple Test AWS and Azure configuration
p Verify all necessary settings of your favorite public cloud providers.
.block.margin-under-xs
h4.t-purple Test provisioners
p InSpec can be used in combination with Cloudformation, Azure resource manager templates and Terraform.
.block
h4.t-purple Verify security configuration
p Ensure that your cloud deployments are not open to malicious attacks due to misconfiguration.
2018-02-20 01:04:16 +00:00
.large-6.medium-6.mobile-12.columns
.box-dark.shadow-dark.fit-height.z-20
2018-02-17 15:44:42 +00:00
pre.t-white.align-vertical-50
code describe aws_s3_bucket(bucket_name: 'my_secret_files') do
code it { should exist }
code it { should_not be_public }
code end
br
code describe aws_iam_user(username: 'test_user') do
code it { should have_mfa_enabled }
code it { should_not have_console_password }
code end
2017-01-20 09:15:38 +00:00
2018-02-17 15:44:42 +00:00
.scrollToTop.shadow-dark
2018-02-22 00:42:55 +00:00
img#scrollup src="/images/home/arrow.svg" onerror="this.src='/images/home/arrow.png'" alt="image of scroll to top arrow"