SlideShare una empresa de Scribd logo
1 de 31
Getting Started with Compliance
Automation
Running Scans
InSpec: Turn security and compliance into code
• Translate compliance into Code
• Clearly express statements of
policy
• Move risk to build/test from
runtime
• Find issues early
• Write code quickly
• Run code anywhere
• Inspect machines, data and APIs
A simple example of an InSpec CIS rule
Part of a process of continuous compliance
Scan for
Compliance
Build & Test
Locally
Build & Test
CI/CD Remediate Verify
©2016 Chef Software Inc. 3-4
Objectives
After completing this module, you should be able to:
 Add a node to test for compliance.
 Run a Compliance scan.
 Test for compliance with InSpec from the command line interface.
©2016 Chef Software Inc. 3-5
Adding a Node to Scan
To add a node you'll need:
• The IP address or FQDN of the nodes to be tested.
• Access configuration (ssh or WinRM).
• The node's username and password OR
• The node's username plus security key pair.
©2016 Chef Software Inc. 3-6
Objective:
Group Lab: Adding a Node to Scan
 Add a Linux Node to Scan
 Test connectivity
Note: In the next module you will perform the same exercises as in this module but using
a Windows node as your target node.
©2016 Chef Software Inc. 3-7
GL: Adding a Node to Scan
1. From your Chef Compliance
Dashboard, click Add Node.
©2016 Chef Software Inc. 3-8
GL: Adding a Node
2. From the resulting page, enter the
node's FQDN or IP address.
3. Leave environment blank. A
‘default’ environment will be used
4. Accept the default SSH Access
configuration
5. Type chef in the username field.
6. Click the password link as shown
in this illustration.
©2016 Chef Software Inc. 3-9
GL: Adding a Node to Scan
7. Type the password (chef) in
the password field.
8. Click the Add 1 node button
as shown in this illustration.
©2016 Chef Software Inc. 3-10
GL: Adding a Node to Scan
At this point your Compliance Dashboard should list the node you just added.
©2016 Chef Software Inc. 3-11
GL: Testing Connectivity to Your Node
1. Click the check box next to your node and then click the Connectivity button.
©2016 Chef Software Inc. 3-12
GL: Testing Connectivity to Your Node
The Status column of you node should now indicate Connection established.
©2016 Chef Software Inc. 3-13
Adding Nodes in Bulk
You could add additional nodes by simply
repeating the previous steps.
You could also add a number of nodes at
once by separating each hostname or IP
address with a comma or a space, as
shown in this illustration.
Chef Compliance also supports bulk loading
of nodes via API.
©2016 Chef Software Inc. 3-14
Adding Nodes in Bulk via API
After class you can go to the
following link.
The resulting kitchen_sink.rb
will step you through how to
upload nodes in bulk.
https://gist.github.com/alexpop/01b0bba8d259adeee320
©2016 Chef Software Inc. 3-15
Private Keys
In the workplace, using a security
key would be a more secure method
for connecting to nodes than using
the password method.
By clicking Settings > Add Private
Key you will see where to paste a
private key.
©2016 Chef Software Inc. 3-16
Running Compliance Scans
You can run Compliance scans on demand or schedule them to run at a later
time.
Chef Compliance maintains profiles as a collection of individual controls that
comprise a complete audit.
As mentioned previously, Chef Compliance comes with a few reference
profiles of various compliance policies that you can leverage or use as
examples to create your own.
©2016 Chef Software Inc. 3-17
Compliance Profiles Used in Scans
This image shows the default Compliance
Profiles as accessed from the Scan Nodes
page.
You should be thoughtful with which
profiles choose.
Notice how you can also choose to run a
scan on demand or schedule a scan.
©2016 Chef Software Inc. 3-18
Objective:
Group Lab: Running a Scan
 Run a Compliance scan.
 View the output of a scan.
©2016 Chef Software Inc. 3-19
GL: Running a Scan
1. Click the check box
next to your node and
then click the Scan
button.
©2016 Chef Software Inc. 3-20
GL: Running a Scan
2. From the resulting
page, check the
base/ssh profile and
uncheck any other
check boxes.
3. Click the Scan now
button.
©2016 Chef Software Inc. 3-21
Scan Results
A Compliance Report
should now display and
your scan results should be
similar to that shown here.
Notice how in the upper
Summary section in this
example, 10 tests were
compliant and 6 tests show
critical issues with ssh.
©2016 Chef Software Inc. 3-22
Scan Results
The bottom half of the
Compliance Report
shown here has a table of
details of test results.
These are sorted by
severity.
If you click an issue as
shown here, a bit more
information about the
issue displays.
©2016 Chef Software Inc. 3-23
GL: Profile
To view the InSpec code
that comprises this
profile, do the following:
1. Click the Compliance
button.
2. Click the relevant
profile (Basic SSH).
3. Scroll down and click
the `Set SSH protocol
version to 2` profile.
©2016 Chef Software Inc. 3-24
Discussion: InSpec Profile Code
Let's discuss what this
profile is doing.
The `impact` of 1.0 indicates
this is a Critical issue.
The `title` is what populates
the Compliance Report issue
title.
©2016 Chef Software Inc. 3-25
Discussion: InSpec Profile Code
The desc is typically human-
readable description sourced
from the CIS or source doc.
The `describe` section is the
actual test that is executed.
©2016 Chef Software Inc. 3-26
Compliance Profile Severity Mapping
The table below shows the current mapping
of Compliance Profile impact numbering
to severity.
Impact Numbering Severity Designation
0.7 - 1.0 Critical Issues
0.4 - <0.7 Major Issues
0 - <0.4 Minor Issues
https://nvd.nist.gov/cvss.cfm
©2016 Chef Software Inc. 3-27
Run InSpec from the Command Line
control 'sshd-11' do
impact 1.0
title 'Server: Set protocol version to SSHv2'
desc "
Set the SSH protocol version to 2. Don't use legacy
insecure SSHv1 connections anymore.
"
describe sshd_config do
its('Protocol') { should eq('2') }
end
end
©2016 Chef Software Inc. 3-28
Run InSpec from the Command Line
Test Locally:
$ inspec exec test.rb
©2016 Chef Software Inc. 3-29
Run InSpec from the Command Line
Remote via SSH:
$ inspec exec test.rb -t ssh://54.163.150.246 --user=chef --
password=chef.io
©2016 Chef Software Inc. 3-30
Run InSpec from the Command Line
Docker Container
$ inspec exec test.rb -t docker://3dda08e75838
Running Scans

Más contenido relacionado

La actualidad más candente

Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Chef
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetChef
 
Cooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateCooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateMatt Ray
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateMatt Ray
 
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentUsing Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentSalim Afiune Maya
 
Bay Area Chef Meetup February
Bay Area Chef Meetup FebruaryBay Area Chef Meetup February
Bay Area Chef Meetup FebruaryJessica DeVita
 
Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef
 
Compliance as Code
Compliance as CodeCompliance as Code
Compliance as CodeMatt Ray
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow DemoChef
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation WorkshopChef
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyMatt Ray
 
Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Chef
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Matt Ray
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver Chef
 
KKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaKKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaLiyao Chen
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed ChefChef
 
Delivery pipelines at Symphony Talent - Present and Future
Delivery pipelines at Symphony Talent - Present and FutureDelivery pipelines at Symphony Talent - Present and Future
Delivery pipelines at Symphony Talent - Present and FutureNathan Jones
 
Chef Automate - Wellington DevOps August 2, 2017
Chef Automate - Wellington DevOps August 2, 2017Chef Automate - Wellington DevOps August 2, 2017
Chef Automate - Wellington DevOps August 2, 2017Matt Ray
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlabChef
 
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthroughHow to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthroughNoam Zakai
 

La actualidad más candente (20)

Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBet
 
Cooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateCooking Up Windows with Chef Automate
Cooking Up Windows with Chef Automate
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef Automate
 
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentUsing Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
 
Bay Area Chef Meetup February
Bay Area Chef Meetup FebruaryBay Area Chef Meetup February
Bay Area Chef Meetup February
 
Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery
 
Compliance as Code
Compliance as CodeCompliance as Code
Compliance as Code
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow Demo
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North Sydney
 
Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver
 
KKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaKKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - Hokila
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Delivery pipelines at Symphony Talent - Present and Future
Delivery pipelines at Symphony Talent - Present and FutureDelivery pipelines at Symphony Talent - Present and Future
Delivery pipelines at Symphony Talent - Present and Future
 
Chef Automate - Wellington DevOps August 2, 2017
Chef Automate - Wellington DevOps August 2, 2017Chef Automate - Wellington DevOps August 2, 2017
Chef Automate - Wellington DevOps August 2, 2017
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthroughHow to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
 

Destacado

Inspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeInspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeMichael Goetz
 
2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpecdevopsdaysaustin
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefAdam Jacob
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateChef
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management Chef
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceChef
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffChef
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeJosh Padnick
 
Successful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHSuccessful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHMandi Walls
 
Our DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeOur DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeChef
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshopChef
 
Validation driven change
Validation driven changeValidation driven change
Validation driven changeMichael Goetz
 
Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow DemoChef
 
Modern Infrastructure Automation
Modern Infrastructure AutomationModern Infrastructure Automation
Modern Infrastructure AutomationSonatype
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateAlex Pop
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateChef
 
London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipChef
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - HabitatChef
 

Destacado (20)

Inspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeInspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into code
 
2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community Update
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef Compliance
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef Stuff
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
 
Vagrant and chef
Vagrant and chefVagrant and chef
Vagrant and chef
 
Successful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHSuccessful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPH
 
Our DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeOur DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural Change
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
 
Validation driven change
Validation driven changeValidation driven change
Validation driven change
 
Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow Demo
 
Modern Infrastructure Automation
Modern Infrastructure AutomationModern Infrastructure Automation
Modern Infrastructure Automation
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef Automate
 
London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to Authorship
 
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - Habitat
 

Similar a Compliance Automation with Inspec Part 3

Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Servicebutest
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Servicebutest
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIDinesh Kaushik
 
Software Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSoftware Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSalim M Bhonhariya
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code EverywhereMatt Ray
 
Training Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xTraining Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xAbdelilah CHARBOUB
 
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)MongoDB
 
How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework Sarah Elson
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017Amazon Web Services
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security AgileOleg Gryb
 
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...Amazon Web Services
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonInexture Solutions
 
Salesforce cicd integration a quick guide
Salesforce cicd integration a quick guideSalesforce cicd integration a quick guide
Salesforce cicd integration a quick guideKaty Slemon
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2Akhil Mittal
 
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdf
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdfWeb_Application_Vul_Testing_with_Nessus_2012.02.01.pdf
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdfsfogeek
 
How to use prancer configuration wizard for easy repository onboarding for ia...
How to use prancer configuration wizard for easy repository onboarding for ia...How to use prancer configuration wizard for easy repository onboarding for ia...
How to use prancer configuration wizard for easy repository onboarding for ia...Prancer Io
 
sfdx continuous Integration with Jenkins on aws (Part I)
sfdx continuous Integration with Jenkins on aws (Part I)sfdx continuous Integration with Jenkins on aws (Part I)
sfdx continuous Integration with Jenkins on aws (Part I)Jérémy Vial
 
MarvelSoft SchoolAdmin Offline LAN Access Setup Guide
MarvelSoft SchoolAdmin Offline LAN Access Setup GuideMarvelSoft SchoolAdmin Offline LAN Access Setup Guide
MarvelSoft SchoolAdmin Offline LAN Access Setup GuideRanganath Shivaram
 

Similar a Compliance Automation with Inspec Part 3 (20)

Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
CodeShip
CodeShipCodeShip
CodeShip
 
Software Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSoftware Developer’s Project Documentation Template
Software Developer’s Project Documentation Template
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code Everywhere
 
Training Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xTraining Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183x
 
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
 
How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security Agile
 
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...
0417 HK AWS Hands-on Lab Series 2019 for Enterprise Data Protection in Enterp...
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
 
Salesforce cicd integration a quick guide
Salesforce cicd integration a quick guideSalesforce cicd integration a quick guide
Salesforce cicd integration a quick guide
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2
 
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdf
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdfWeb_Application_Vul_Testing_with_Nessus_2012.02.01.pdf
Web_Application_Vul_Testing_with_Nessus_2012.02.01.pdf
 
How to use prancer configuration wizard for easy repository onboarding for ia...
How to use prancer configuration wizard for easy repository onboarding for ia...How to use prancer configuration wizard for easy repository onboarding for ia...
How to use prancer configuration wizard for easy repository onboarding for ia...
 
sfdx continuous Integration with Jenkins on aws (Part I)
sfdx continuous Integration with Jenkins on aws (Part I)sfdx continuous Integration with Jenkins on aws (Part I)
sfdx continuous Integration with Jenkins on aws (Part I)
 
MarvelSoft SchoolAdmin Offline LAN Access Setup Guide
MarvelSoft SchoolAdmin Offline LAN Access Setup GuideMarvelSoft SchoolAdmin Offline LAN Access Setup Guide
MarvelSoft SchoolAdmin Offline LAN Access Setup Guide
 

Más de Chef

Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps TourChef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps TourChef
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitatChef
 
The caseforawesome
The caseforawesomeThe caseforawesome
The caseforawesomeChef
 
Netflix's Could Migration
Netflix's Could MigrationNetflix's Could Migration
Netflix's Could MigrationChef
 
Alaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyAlaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyChef
 
And The Slow Suffer What They Must
And The Slow Suffer What They MustAnd The Slow Suffer What They Must
And The Slow Suffer What They MustChef
 
Visualizing your journey with chef
Visualizing your journey with chefVisualizing your journey with chef
Visualizing your journey with chefChef
 
The New IT Game
The New IT GameThe New IT Game
The New IT GameChef
 
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationHow to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationChef
 
Chef andwindows reactor
Chef andwindows reactorChef andwindows reactor
Chef andwindows reactorChef
 

Más de Chef (11)

Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
The caseforawesome
The caseforawesomeThe caseforawesome
The caseforawesome
 
Netflix's Could Migration
Netflix's Could MigrationNetflix's Could Migration
Netflix's Could Migration
 
Alaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyAlaska Airlines DevOps Journey
Alaska Airlines DevOps Journey
 
And The Slow Suffer What They Must
And The Slow Suffer What They MustAnd The Slow Suffer What They Must
And The Slow Suffer What They Must
 
Visualizing your journey with chef
Visualizing your journey with chefVisualizing your journey with chef
Visualizing your journey with chef
 
The New IT Game
The New IT GameThe New IT Game
The New IT Game
 
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationHow to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
 
Chef andwindows reactor
Chef andwindows reactorChef andwindows reactor
Chef andwindows reactor
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Compliance Automation with Inspec Part 3

  • 1. Getting Started with Compliance Automation
  • 3. InSpec: Turn security and compliance into code • Translate compliance into Code • Clearly express statements of policy • Move risk to build/test from runtime • Find issues early • Write code quickly • Run code anywhere • Inspect machines, data and APIs A simple example of an InSpec CIS rule Part of a process of continuous compliance Scan for Compliance Build & Test Locally Build & Test CI/CD Remediate Verify
  • 4. ©2016 Chef Software Inc. 3-4 Objectives After completing this module, you should be able to:  Add a node to test for compliance.  Run a Compliance scan.  Test for compliance with InSpec from the command line interface.
  • 5. ©2016 Chef Software Inc. 3-5 Adding a Node to Scan To add a node you'll need: • The IP address or FQDN of the nodes to be tested. • Access configuration (ssh or WinRM). • The node's username and password OR • The node's username plus security key pair.
  • 6. ©2016 Chef Software Inc. 3-6 Objective: Group Lab: Adding a Node to Scan  Add a Linux Node to Scan  Test connectivity Note: In the next module you will perform the same exercises as in this module but using a Windows node as your target node.
  • 7. ©2016 Chef Software Inc. 3-7 GL: Adding a Node to Scan 1. From your Chef Compliance Dashboard, click Add Node.
  • 8. ©2016 Chef Software Inc. 3-8 GL: Adding a Node 2. From the resulting page, enter the node's FQDN or IP address. 3. Leave environment blank. A ‘default’ environment will be used 4. Accept the default SSH Access configuration 5. Type chef in the username field. 6. Click the password link as shown in this illustration.
  • 9. ©2016 Chef Software Inc. 3-9 GL: Adding a Node to Scan 7. Type the password (chef) in the password field. 8. Click the Add 1 node button as shown in this illustration.
  • 10. ©2016 Chef Software Inc. 3-10 GL: Adding a Node to Scan At this point your Compliance Dashboard should list the node you just added.
  • 11. ©2016 Chef Software Inc. 3-11 GL: Testing Connectivity to Your Node 1. Click the check box next to your node and then click the Connectivity button.
  • 12. ©2016 Chef Software Inc. 3-12 GL: Testing Connectivity to Your Node The Status column of you node should now indicate Connection established.
  • 13. ©2016 Chef Software Inc. 3-13 Adding Nodes in Bulk You could add additional nodes by simply repeating the previous steps. You could also add a number of nodes at once by separating each hostname or IP address with a comma or a space, as shown in this illustration. Chef Compliance also supports bulk loading of nodes via API.
  • 14. ©2016 Chef Software Inc. 3-14 Adding Nodes in Bulk via API After class you can go to the following link. The resulting kitchen_sink.rb will step you through how to upload nodes in bulk. https://gist.github.com/alexpop/01b0bba8d259adeee320
  • 15. ©2016 Chef Software Inc. 3-15 Private Keys In the workplace, using a security key would be a more secure method for connecting to nodes than using the password method. By clicking Settings > Add Private Key you will see where to paste a private key.
  • 16. ©2016 Chef Software Inc. 3-16 Running Compliance Scans You can run Compliance scans on demand or schedule them to run at a later time. Chef Compliance maintains profiles as a collection of individual controls that comprise a complete audit. As mentioned previously, Chef Compliance comes with a few reference profiles of various compliance policies that you can leverage or use as examples to create your own.
  • 17. ©2016 Chef Software Inc. 3-17 Compliance Profiles Used in Scans This image shows the default Compliance Profiles as accessed from the Scan Nodes page. You should be thoughtful with which profiles choose. Notice how you can also choose to run a scan on demand or schedule a scan.
  • 18. ©2016 Chef Software Inc. 3-18 Objective: Group Lab: Running a Scan  Run a Compliance scan.  View the output of a scan.
  • 19. ©2016 Chef Software Inc. 3-19 GL: Running a Scan 1. Click the check box next to your node and then click the Scan button.
  • 20. ©2016 Chef Software Inc. 3-20 GL: Running a Scan 2. From the resulting page, check the base/ssh profile and uncheck any other check boxes. 3. Click the Scan now button.
  • 21. ©2016 Chef Software Inc. 3-21 Scan Results A Compliance Report should now display and your scan results should be similar to that shown here. Notice how in the upper Summary section in this example, 10 tests were compliant and 6 tests show critical issues with ssh.
  • 22. ©2016 Chef Software Inc. 3-22 Scan Results The bottom half of the Compliance Report shown here has a table of details of test results. These are sorted by severity. If you click an issue as shown here, a bit more information about the issue displays.
  • 23. ©2016 Chef Software Inc. 3-23 GL: Profile To view the InSpec code that comprises this profile, do the following: 1. Click the Compliance button. 2. Click the relevant profile (Basic SSH). 3. Scroll down and click the `Set SSH protocol version to 2` profile.
  • 24. ©2016 Chef Software Inc. 3-24 Discussion: InSpec Profile Code Let's discuss what this profile is doing. The `impact` of 1.0 indicates this is a Critical issue. The `title` is what populates the Compliance Report issue title.
  • 25. ©2016 Chef Software Inc. 3-25 Discussion: InSpec Profile Code The desc is typically human- readable description sourced from the CIS or source doc. The `describe` section is the actual test that is executed.
  • 26. ©2016 Chef Software Inc. 3-26 Compliance Profile Severity Mapping The table below shows the current mapping of Compliance Profile impact numbering to severity. Impact Numbering Severity Designation 0.7 - 1.0 Critical Issues 0.4 - <0.7 Major Issues 0 - <0.4 Minor Issues https://nvd.nist.gov/cvss.cfm
  • 27. ©2016 Chef Software Inc. 3-27 Run InSpec from the Command Line control 'sshd-11' do impact 1.0 title 'Server: Set protocol version to SSHv2' desc " Set the SSH protocol version to 2. Don't use legacy insecure SSHv1 connections anymore. " describe sshd_config do its('Protocol') { should eq('2') } end end
  • 28. ©2016 Chef Software Inc. 3-28 Run InSpec from the Command Line Test Locally: $ inspec exec test.rb
  • 29. ©2016 Chef Software Inc. 3-29 Run InSpec from the Command Line Remote via SSH: $ inspec exec test.rb -t ssh://54.163.150.246 --user=chef -- password=chef.io
  • 30. ©2016 Chef Software Inc. 3-30 Run InSpec from the Command Line Docker Container $ inspec exec test.rb -t docker://3dda08e75838

Notas del editor

  1. Integrate compliance and security requirements into your automated deployment pipeline. The InSpec language lets you specify those requirements as code. When compliance is code, you can identify issues during development and not after the fact. Test large-scale environments while still moving at velocity.    Translate compliance into code. InSpec is an open-source testing framework with a human- and machine-readable language for specifying compliance, security and policy requirements. When compliance is expressed as code, you can integrate it into your deployment pipeline and automatically test for adherence to security policies.   Clearly express statements of policy. When compliance is code, rules are unambiguous and can be understood by everyone on the team. Developers know what standards they're expected to meet and auditors know exactly what is being tested. Replace spreadsheets filled with abstract descriptions with tangible tests that have a clear intent.   Find issues early. Automated compliance tests can start at the beginning of the development cycle. You'll detect any issues well before your code goes into production, when problems are expensive and time consuming to fix.   Write code quickly. The InSpec language includes a collection of resources that help you write audit controls quickly and easily. You can also create custom resources for your own particular situations. Run code anywhere. InSpec code can run in multiple platforms. You can execute the same set of tests locally, with remote commands that use SSH or WinRM, or with external mechanisms such as the Docker API.   Inspect machines, data, and APIs. Knowing that your physical servers are in compliance is, of course, essential. But your applications rely on more than just server configurations. With InSpec, you can assess data in a database or inspect the configuration of virtual resources by using their API. For example, you can check security group settings on your IaaS infrastructure. Compliance as Code The speed and collaboration of DevOps for security & compliance Security documents as executable code Compliance is assured from the start of the development cycle Security-focused framework DSL that helps you get started writing audit controls quickly & easily Inspec works the same way everywhere: locally, remotely, or executed via API Tailored to the needs of security professionals Flexible and extensible Easily create custom resources, if needed Create and share profiles for code reuse and modularity Inspect machine state, data state, and API configurations
  2. Be sure you are using the hostname of the target node that you noted previously in class. In the workplace, the target node's username and password will likely be different than shown in this example. We'll discuss using key pair access later in the module.
  3. Instructor Note: If a Linux target node's image has /etc/sudoers  `Defaults    requiretty` uncommented, then the Compliance server won't be able to connect to the target node unless we disable sudo on this page. Once the issue is fixed it should not matter if the target node /etc/sudoers  `Defaults   requiretty` is uncommented. The Linux AMI used in this course has /etc/sudoers  `Defaults    requiretty` commented so no worries."
  4. If your Status column does not indicate `Connection established`, please notify the instructor.
  5. As you may have noticed, you could add additional nodes by simply repeating the previous steps. You could also add a number of nodes at once by separating each hostname or IP address with a comma or a space, as shown in this illustration. Chef Compliance also supports bulk loading of nodes via API.
  6. Instructor Note: If you have extra time, you can walk the participants through this file.
  7. In the workplace, using security key pairs would be a more secure method for connecting to nodes than using the password method we are using in class. By clicking `Settings > Add New Key Pair` you will see where to paste your private key.
  8. This image shows the default Compliance Profiles as accessed from the Scan Nodes page. This page displays when you select nodes to scan and then click the Scan button. You'll access the profiles in a moment. These profiles determine what will be scanned on your nodes. You should be thoughtful with which profiles choose since the more you choose to run, the longer it will take to execute the scan. Notice how you can also choose to run a scan on demand (Scan now) or schedule a scan to run at a later time.
  9. There are also 6 critical issues related to ssh on the target node. Your results may be slightly different than this example. Instructor Note: This and the following slide should be used for a discussion of the scan results. The group exercise continues after that.
  10. The bottom half of the Compliance Report has a table of details of test results. These are sorted by severity so the critical issues are listed at the top and the compliant items are at the bottom of the list. If you click an issue as shown here, a bit more information about the issue displays, but that's not really telling us much.
  11. Instructor Note: Now we continue the group Lab but you should stop as needed to explain what this code means.
  12. Let's discuss what this profile is doing. The impact of 1.0 indicates this is a critical issue if it the scanned node violates what is in this code. We'll discuss severity mapping in a moment.
  13. The desc is typically human-readable description sourced from the CIS or source doc. The describe value is the actual test. In this case, this is saying the protocol for `ssh_config` Protocol should be `2`. If the actual value from the node is not Protocol 2, the Critical issue is reported as in this case. So when you run a scan, the Compliance Server connects to the node using the configuration we specified, in this case ssh, and then it will run this set of code, this InSpec control, on that node. The Compliance Server translates the InSpec code into ssh commands when it transmits across the wire. No agent or client is required to be running on the target node for this work.
  14. Here is the current mapping of Compliance Profile impact numbering to severity. The image at the top-right shows a Compliance Profile's impact numbering. The table at the bottom-left shows the current mapping of Compliance Profile impact numbering to severity. The image at the bottom-right is an example of the severities listed in the reports in the Compliance web UI. The mapping is currently analogous to the Common Vulnerability Scoring System (CVSS) framework, which can be viewed via the link at the bottom of this slide. This mapping will be made configurable in the future.