Sha256: e67f38b04eff9f2b39ff2ebaad7f50d3237b7e71b26a04f6a39b44f3f22ca5db

Contents?: true

Size: 1.26 KB

Versions: 20

Compression:

Stored size: 1.26 KB

Contents

---
title: About the security_policy Resource
platform: windows
---

# security_policy

Use the `security_policy` InSpec audit resource to test security policies on the Windows platform.

<br>

## Availability

### Installation

This resource is distributed along with InSpec itself. You can use it automatically.

### Version

This resource first became available in v1.0.0 of InSpec.

## Syntax

A `security_policy` resource block declares the name of a security policy and the value to be tested:

    describe security_policy do
      its('policy_name') { should eq 'value' }
    end

where

* `'policy_name'` must specify a security policy
* `{ should eq 'value' }` tests the value of `policy_name` against the value declared in the test

<br>

## Examples

The following examples show how to use this InSpec audit resource.

### Verify that only the Administrators group has remote access

    describe security_policy do
      its('SeRemoteInteractiveLogonRight') { should eq '*S-1-5-32-544' }
    end

<br>

## Matchers

For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).

### policy_name

The `policy_name` matcher must be the name of a security policy:

    its('SeNetworkLogonRight') { should eq '*S-1-5-11' }

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
inspec-core-2.3.10 docs/resources/security_policy.md.erb
inspec-2.3.10 docs/resources/security_policy.md.erb
inspec-core-2.3.5 docs/resources/security_policy.md.erb
inspec-2.3.5 docs/resources/security_policy.md.erb
inspec-core-2.3.4 docs/resources/security_policy.md.erb
inspec-2.3.4 docs/resources/security_policy.md.erb
inspec-core-2.2.112 docs/resources/security_policy.md.erb
inspec-2.2.112 docs/resources/security_policy.md.erb
inspec-core-2.2.102 docs/resources/security_policy.md.erb
inspec-2.2.102 docs/resources/security_policy.md.erb
inspec-core-2.2.101 docs/resources/security_policy.md.erb
inspec-2.2.101 docs/resources/security_policy.md.erb
inspec-core-2.2.78 docs/resources/security_policy.md.erb
inspec-2.2.78 docs/resources/security_policy.md.erb
inspec-core-2.2.70 docs/resources/security_policy.md.erb
inspec-2.2.70 docs/resources/security_policy.md.erb
inspec-core-2.2.64 docs/resources/security_policy.md.erb
inspec-2.2.64 docs/resources/security_policy.md.erb
inspec-core-2.2.61 docs/resources/security_policy.md.erb
inspec-2.2.61 docs/resources/security_policy.md.erb