inspec 4.28.0 → 4.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plugins/inspec-init/templates/profiles/aws/README.md +10 -10
- data/lib/plugins/inspec-init/templates/profiles/aws/controls/example.rb +3 -3
- data/lib/plugins/inspec-init/templates/profiles/aws/{attributes.yml → inputs.yml} +0 -0
- data/lib/plugins/inspec-init/templates/profiles/aws/inspec.yml +2 -3
- data/lib/plugins/inspec-init/templates/profiles/gcp/README.md +7 -7
- data/lib/plugins/inspec-init/templates/profiles/gcp/controls/example.rb +1 -1
- data/lib/plugins/inspec-init/templates/profiles/gcp/{attributes.yml → inputs.yml} +0 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/inspec.yml +3 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a0677c47fe97c8e59c605664d775598894a00156fea61a0d9c78b6cef41163
|
4
|
+
data.tar.gz: 78782452f56ad7b5e2bd0a9863c4027af2c3b236c452e121c9ce4161f1044b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0c3697bd64da097470b1b36960167b77e4e274dd7edf0925aa29623085d2e50d2fed82e935303eaea6e2b4ae04992320d88eb5e8aa816315dbec7012957519
|
7
|
+
data.tar.gz: ad15427262db05ff94ab436a4f01d69f52c8e6576e059210779736a3573704fa635b1c145451d7cf6f6de64231fa4d193a86204d4a5339c7c9c739eabd1cdf9d
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This example shows the implementation of an InSpec profile for AWS.
|
4
4
|
|
5
|
-
## Create a profile
|
5
|
+
## Create a profile
|
6
6
|
|
7
7
|
```
|
8
8
|
$ inspec init profile --platform aws my-profile
|
@@ -15,12 +15,12 @@ Creating new profile at /Users/spaterson/my-profile
|
|
15
15
|
• Creating directory controls
|
16
16
|
• Creating file controls/example.rb
|
17
17
|
• Creating file inspec.yml
|
18
|
-
• Creating file
|
18
|
+
• Creating file inputs.yml
|
19
19
|
• Creating file libraries/.gitkeep
|
20
|
-
|
20
|
+
|
21
21
|
```
|
22
22
|
|
23
|
-
## Optionally update `
|
23
|
+
## Optionally update `inputs.yml` to point to your custom VPC
|
24
24
|
|
25
25
|
```
|
26
26
|
aws_vpc_id: 'custom-vpc-id'
|
@@ -32,11 +32,11 @@ The related control will simply be skipped if this is not provided. See the [In
|
|
32
32
|
|
33
33
|
### With a VPC Identifier
|
34
34
|
|
35
|
-
With a supplied VPC identifier in `
|
35
|
+
With a supplied VPC identifier in `inputs.yml` both of the example controls will run. The 'aws-single-vpc-exists-check' control will only check for a VPC identifier in the currently configured AWS SDK region e.g. `eu-west-2` in the below:
|
36
36
|
|
37
37
|
```
|
38
38
|
$ cd my-profile/
|
39
|
-
$ inspec exec . -t aws:// --
|
39
|
+
$ inspec exec . -t aws:// --input-file=inputs.yml
|
40
40
|
|
41
41
|
Profile: AWS InSpec Profile (my-profile)
|
42
42
|
Version: 0.1.0
|
@@ -111,13 +111,13 @@ Test Summary: 53 successful, 0 failures, 0 skipped
|
|
111
111
|
```
|
112
112
|
|
113
113
|
|
114
|
-
### Without Supplying a VPC Identifier
|
114
|
+
### Without Supplying a VPC Identifier
|
115
115
|
|
116
|
-
If no VPC identifier is supplied, the 'aws-single-vpc-exists-check' control is skipped and the other control runs. The `
|
116
|
+
If no VPC identifier is supplied, the 'aws-single-vpc-exists-check' control is skipped and the other control runs. The `inputs.yml` file does not have to be specified to InSpec in this case.
|
117
117
|
|
118
118
|
```
|
119
119
|
$ cd my-profile/
|
120
|
-
$ inspec exec . -t aws://
|
120
|
+
$ inspec exec . -t aws://
|
121
121
|
|
122
122
|
Profile: AWS InSpec Profile (my-profile)
|
123
123
|
Version: 0.1.0
|
@@ -189,4 +189,4 @@ Target: aws://eu-west-2
|
|
189
189
|
|
190
190
|
Profile Summary: 2 successful controls, 0 control failures, 1 control skipped
|
191
191
|
Test Summary: 52 successful, 0 failures, 1 skipped
|
192
|
-
```
|
192
|
+
```
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
title "Sample Section"
|
4
4
|
|
5
|
-
aws_vpc_id =
|
5
|
+
aws_vpc_id = input("aws_vpc_id")
|
6
6
|
|
7
7
|
# You add controls here
|
8
|
-
control "aws-single-vpc-exists-check" do
|
9
|
-
only_if { aws_vpc_id != "" }
|
8
|
+
control "aws-single-vpc-exists-check" do # A unique ID for this control.
|
9
|
+
only_if { aws_vpc_id != "" } # Only run this control if the `aws_vpc_id` input is provided.
|
10
10
|
impact 1.0 # The criticality, if this control fails.
|
11
11
|
title "Check to see if custom VPC exists." # A human-readable title.
|
12
12
|
describe aws_vpc(aws_vpc_id) do # The test itself.
|
File without changes
|
@@ -7,14 +7,13 @@ license: Apache-2.0
|
|
7
7
|
summary: An InSpec Compliance Profile For AWS
|
8
8
|
version: 0.1.0
|
9
9
|
inspec_version: '~> 4'
|
10
|
-
|
10
|
+
inputs:
|
11
11
|
- name: aws_vpc_id
|
12
12
|
required: false
|
13
13
|
# Below is deliberately left as a default empty string to allow the profile to run when this is not provided.
|
14
14
|
# Please see the README for more details.
|
15
|
-
|
15
|
+
value: ''
|
16
16
|
description: 'Optional Custom AWS VPC Id'
|
17
|
-
type: string
|
18
17
|
depends:
|
19
18
|
- name: inspec-aws
|
20
19
|
url: https://github.com/inspec/inspec-aws/archive/master.tar.gz
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This example shows the implementation of an InSpec profile for GCP that depends on the [InSpec GCP Resource Pack](https://github.com/inspec/inspec-gcp). See the [README](https://github.com/inspec/inspec-gcp) for instructions on setting up appropriate GCP credentials.
|
4
4
|
|
5
|
-
## Create a profile
|
5
|
+
## Create a profile
|
6
6
|
|
7
7
|
```
|
8
8
|
$ inspec init profile --platform gcp my-profile
|
@@ -12,12 +12,12 @@ Create new profile at /Users/spaterson/my-profile
|
|
12
12
|
* Create directory controls
|
13
13
|
* Create file controls/example.rb
|
14
14
|
* Create file inspec.yml
|
15
|
-
* Create file
|
16
|
-
* Create file libraries/.gitkeep
|
17
|
-
|
15
|
+
* Create file inputs.yml
|
16
|
+
* Create file libraries/.gitkeep
|
17
|
+
|
18
18
|
```
|
19
19
|
|
20
|
-
## Update `
|
20
|
+
## Update `inputs.yml` to point to your project
|
21
21
|
|
22
22
|
```
|
23
23
|
gcp_project_id: 'my-gcp-project'
|
@@ -27,7 +27,7 @@ gcp_project_id: 'my-gcp-project'
|
|
27
27
|
|
28
28
|
```
|
29
29
|
$ cd gcp-profile/
|
30
|
-
$ inspec exec . -t gcp:// --
|
30
|
+
$ inspec exec . -t gcp:// --input-file=inputs.yml
|
31
31
|
|
32
32
|
Profile: GCP InSpec Profile (my-profile)
|
33
33
|
Version: 0.1.0
|
@@ -63,4 +63,4 @@ Target: gcp://local-service-account@my-gcp-project.iam.gserviceaccount.com
|
|
63
63
|
|
64
64
|
Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped
|
65
65
|
Test Summary: 18 successful, 0 failures, 0 skipped
|
66
|
-
```
|
66
|
+
```
|
File without changes
|
@@ -6,14 +6,13 @@ copyright_email: you@example.com
|
|
6
6
|
license: Apache-2.0
|
7
7
|
summary: An InSpec Compliance Profile For GCP
|
8
8
|
version: 0.1.0
|
9
|
-
inspec_version: '>=
|
10
|
-
|
9
|
+
inspec_version: '>= 4'
|
10
|
+
inputs:
|
11
11
|
- name: gcp_project_id
|
12
12
|
required: true
|
13
13
|
description: 'The GCP project identifier.'
|
14
|
-
type: string
|
15
14
|
depends:
|
16
15
|
- name: inspec-gcp
|
17
16
|
url: https://github.com/inspec/inspec-gcp/archive/master.tar.gz
|
18
17
|
supports:
|
19
|
-
- platform: gcp
|
18
|
+
- platform: gcp
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inspec-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.33.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
26
|
+
version: 4.33.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: train
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,15 +115,15 @@ files:
|
|
115
115
|
- lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Gemfile
|
116
116
|
- lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/inspec-plugin-template.gemspec
|
117
117
|
- lib/plugins/inspec-init/templates/profiles/aws/README.md
|
118
|
-
- lib/plugins/inspec-init/templates/profiles/aws/attributes.yml
|
119
118
|
- lib/plugins/inspec-init/templates/profiles/aws/controls/example.rb
|
119
|
+
- lib/plugins/inspec-init/templates/profiles/aws/inputs.yml
|
120
120
|
- lib/plugins/inspec-init/templates/profiles/aws/inspec.yml
|
121
121
|
- lib/plugins/inspec-init/templates/profiles/azure/README.md
|
122
122
|
- lib/plugins/inspec-init/templates/profiles/azure/controls/example.rb
|
123
123
|
- lib/plugins/inspec-init/templates/profiles/azure/inspec.yml
|
124
124
|
- lib/plugins/inspec-init/templates/profiles/gcp/README.md
|
125
|
-
- lib/plugins/inspec-init/templates/profiles/gcp/attributes.yml
|
126
125
|
- lib/plugins/inspec-init/templates/profiles/gcp/controls/example.rb
|
126
|
+
- lib/plugins/inspec-init/templates/profiles/gcp/inputs.yml
|
127
127
|
- lib/plugins/inspec-init/templates/profiles/gcp/inspec.yml
|
128
128
|
- lib/resource_support/aws.rb
|
129
129
|
- lib/resource_support/aws/aws_backend_base.rb
|