Skip to content

Commit

Permalink
Merge pull request #1179 from davidwrede/doc_edits
Browse files Browse the repository at this point in the history
Changing headings to align with SEO best practices
  • Loading branch information
arlimus committed Sep 30, 2016
2 parents 642b2bd + 9283f19 commit b08de66
Show file tree
Hide file tree
Showing 67 changed files with 887 additions and 887 deletions.
20 changes: 10 additions & 10 deletions docs/resources/apache_conf.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: About the apache_conf Resource

Use the `apache_conf` InSpec audit resource to test the configuration settings for Apache. This file is typically located under `/etc/apache2` on the Debian and Ubuntu platforms and under `/etc/httpd` on the Fedora, CentOS, RedHat Enterprise Linux, and ArchLinux platforms. The configuration settings may vary significantly from platform to platform.

# Syntax
## Syntax

An `apache_conf` InSpec audit resource block declares configuration settings that should be tested:

Expand All @@ -20,7 +20,7 @@ where
* `('path')` is the non-default path to the Apache configuration file
* `{ should eq 'value' }` is the value that is expected

# Matchers
## Matchers

This InSpec audit resource matches any service that is listed in the Apache configuration file:

Expand All @@ -38,37 +38,37 @@ For example:
end


## be
### be

<%= partial "/shared/matcher_be" %>

## cmp
### cmp

<%= partial "/shared/matcher_cmp" %>

## eq
### eq

<%= partial "/shared/matcher_eq" %>

## include
### include

<%= partial "/shared/matcher_include" %>

## match
### match

<%= partial "/shared/matcher_match" %>

# Examples
## Examples

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

## Test for blocking .htaccess files on CentOS
### Test for blocking .htaccess files on CentOS

describe apache_conf do
its('AllowOverride') { should eq 'None' }
end

## Test ports for SSL
### Test ports for SSL

describe apache_conf do
its('Listen') { should eq '443'}
Expand Down
26 changes: 13 additions & 13 deletions docs/resources/apt.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: About the apt Resource

Use the `apt` InSpec audit resource to verify Apt repositories on the Debian and Ubuntu platforms, and also PPA repositories on the Ubuntu platform.

# Syntax
## Syntax

An `apt` resource block tests the contents of Apt and PPA repositories:

Expand All @@ -22,61 +22,61 @@ where
* `exist` and `be_enabled` are a valid matchers for this resource


# Matchers
## Matchers

This InSpec audit resource has the following matchers:

## be
### be

<%= partial "/shared/matcher_be" %>

## be_enabled
### be_enabled

The `be_enabled` matcher tests if a package exists in the repository:

it { should be_enabled }

## cmp
### cmp

<%= partial "/shared/matcher_cmp" %>

## eq
### eq

<%= partial "/shared/matcher_eq" %>

## exist
### exist

The `exist` matcher tests if a package exists on the system:

it { should exist }

## include
### include

<%= partial "/shared/matcher_include" %>

## match
### match

<%= partial "/shared/matcher_match" %>

# Examples
## Examples

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

## Test if apt repository exists and is enabled
### Test if apt repository exists and is enabled

describe apt('http://ppa.launchpad.net/juju/stable/ubuntu') do
it { should exist }
it { should be_enabled }
end

## Verify that a PPA repository exists and is enabled
### Verify that a PPA repository exists and is enabled

describe apt('ppa:nginx/stable') do
it { should exist }
it { should be_enabled }
end

## Verify that a repository is not present
### Verify that a repository is not present

describe apt('ubuntu-wine/ppa') do
it { should_not exist }
Expand Down
20 changes: 10 additions & 10 deletions docs/resources/audit_policy.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: About the audit_policy Resource

Use the `audit_policy` Inspec audit resource to test auditing policies on the Windows platform. An auditing policy is a category of security-related events to be audited. Auditing is disabled by default and may be enabled for categories like account management, logon events, policy changes, process tracking, privilege use, system events, or object access. For each auditing category property that is enabled, the auditing level may be set to `No Auditing`, `Not Specified`, `Success`, `Success and Failure`, or `Failure`.

# Syntax
## Syntax

An `audit_policy` resource block declares a parameter that belongs to an audit policy category or subcategory:

Expand All @@ -20,41 +20,41 @@ where
* `'value'` must be one of `No Auditing`, `Not Specified`, `Success`, `Success and Failure`, or `Failure`


# Matchers
## Matchers

This InSpec audit resource has the following matchers:

## be
### be

<%= partial "/shared/matcher_be" %>

## cmp
### cmp

<%= partial "/shared/matcher_cmp" %>

## eq
### eq

<%= partial "/shared/matcher_eq" %>

## include
### include

<%= partial "/shared/matcher_include" %>

## match
### match

<%= partial "/shared/matcher_match" %>

# Examples
## Examples

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

## Test that a parameter is not set to "No Auditing"
### Test that a parameter is not set to "No Auditing"

describe audit_policy do
its('Other Account Logon Events') { should_not eq 'No Auditing' }
end

## Test that a parameter is set to "Success"
### Test that a parameter is set to "Success"

describe audit_policy do
its('User Account Management') { should eq 'Success' }
Expand Down
20 changes: 10 additions & 10 deletions docs/resources/auditd_conf.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: About the auditd_conf Resource

Use the `auditd_conf` InSpec audit resource to test the configuration settings for the audit daemon. This file is typically located under `/etc/audit/auditd.conf'` on Unix and Linux platforms.

# Syntax
## Syntax

A `auditd_conf` resource block declares configuration settings that should be tested:

Expand All @@ -21,27 +21,27 @@ where
* `{ should cmp 'value' }` is the value that is expected


# Matchers
## Matchers

This InSpec audit resource has the following matchers:

## be
### be

<%= partial "/shared/matcher_be" %>

## cmp
### cmp

<%= partial "/shared/matcher_cmp" %>

## eq
### eq

<%= partial "/shared/matcher_eq" %>

## include
### include

<%= partial "/shared/matcher_include" %>

## keyword
### keyword

This matcher will matche any keyword that is listed in the `auditd.conf` configuration file. Option names and values are case-insensitive:

Expand All @@ -51,15 +51,15 @@ or:

its('max_log_file') { should cmp 6 }

## match
### match

<%= partial "/shared/matcher_match" %>

# Examples
## Examples

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

## Test the auditd.conf file
### Test the auditd.conf file

describe auditd_conf do
its('log_file') { should cmp '/full/path/to/file' }
Expand Down
22 changes: 11 additions & 11 deletions docs/resources/auditd_rules.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: About the auditd_rules Resource
Use the `auditd_rules` InSpec audit resource to test the rules for logging that exist on the system. The `audit.rules` file is typically located under `/etc/audit/` and contains the list of rules that define what is captured in log files. This resource uses `auditctl` to query the run-time `auditd` rules setup, which may be different from `audit.rules`.


# Syntax
## Syntax

An `auditd_rules` resource block declares one (or more) rules to be tested, and then what that rule should do. The syntax depends on the version of `audit`:

Expand Down Expand Up @@ -62,35 +62,35 @@ or test that individual rules are defined:
where each test must declare one (or more) rules to be tested.


# Matchers
## Matchers

This InSpec audit resource has the following matchers:

## be
### be

<%= partial "/shared/matcher_be" %>

## cmp
### cmp

<%= partial "/shared/matcher_cmp" %>

## eq
### eq

<%= partial "/shared/matcher_eq" %>

## include
### include

<%= partial "/shared/matcher_include" %>

## match
### match

<%= partial "/shared/matcher_match" %>

# Examples
## Examples

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

## Test if a rule contains a matching element that is identified by a regular expression
### Test if a rule contains a matching element that is identified by a regular expression

For `audit` >= 2.3:

Expand All @@ -109,13 +109,13 @@ For `audit` < 2.3:
end


## Query the audit daemon status
### Query the audit daemon status

describe auditd_rules.status('backlog') do
it { should cmp 0 }
end

## Query properties of rules targeting specific syscalls or files
### Query properties of rules targeting specific syscalls or files

describe auditd_rules.syscall('open').action do
it { should eq(['always']) }
Expand Down
Loading

0 comments on commit b08de66

Please sign in to comment.