inspec 4.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +63 -0
- data/inspec.gemspec +36 -0
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Gemfile +11 -0
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/inspec-plugin-template.gemspec +43 -0
- data/lib/plugins/inspec-init/templates/profiles/aws/README.md +192 -0
- data/lib/plugins/inspec-init/templates/profiles/aws/attributes.yml +2 -0
- data/lib/plugins/inspec-init/templates/profiles/aws/controls/example.rb +39 -0
- data/lib/plugins/inspec-init/templates/profiles/aws/inspec.yml +22 -0
- data/lib/plugins/inspec-init/templates/profiles/azure/README.md +56 -0
- data/lib/plugins/inspec-init/templates/profiles/azure/controls/example.rb +14 -0
- data/lib/plugins/inspec-init/templates/profiles/azure/inspec.yml +14 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/README.md +66 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/attributes.yml +2 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/controls/example.rb +27 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/inspec.yml +19 -0
- data/lib/resource_support/aws.rb +76 -0
- data/lib/resource_support/aws/aws_backend_base.rb +12 -0
- data/lib/resource_support/aws/aws_backend_factory_mixin.rb +12 -0
- data/lib/resource_support/aws/aws_plural_resource_mixin.rb +24 -0
- data/lib/resource_support/aws/aws_resource_mixin.rb +69 -0
- data/lib/resource_support/aws/aws_singular_resource_mixin.rb +27 -0
- data/lib/resources/aws/aws_billing_report.rb +107 -0
- data/lib/resources/aws/aws_billing_reports.rb +74 -0
- data/lib/resources/aws/aws_cloudtrail_trail.rb +97 -0
- data/lib/resources/aws/aws_cloudtrail_trails.rb +51 -0
- data/lib/resources/aws/aws_cloudwatch_alarm.rb +67 -0
- data/lib/resources/aws/aws_cloudwatch_log_metric_filter.rb +105 -0
- data/lib/resources/aws/aws_config_delivery_channel.rb +74 -0
- data/lib/resources/aws/aws_config_recorder.rb +99 -0
- data/lib/resources/aws/aws_ebs_volume.rb +127 -0
- data/lib/resources/aws/aws_ebs_volumes.rb +69 -0
- data/lib/resources/aws/aws_ec2_instance.rb +162 -0
- data/lib/resources/aws/aws_ec2_instances.rb +69 -0
- data/lib/resources/aws/aws_ecs_cluster.rb +88 -0
- data/lib/resources/aws/aws_eks_cluster.rb +105 -0
- data/lib/resources/aws/aws_elb.rb +85 -0
- data/lib/resources/aws/aws_elbs.rb +84 -0
- data/lib/resources/aws/aws_flow_log.rb +106 -0
- data/lib/resources/aws/aws_iam_access_key.rb +112 -0
- data/lib/resources/aws/aws_iam_access_keys.rb +153 -0
- data/lib/resources/aws/aws_iam_group.rb +62 -0
- data/lib/resources/aws/aws_iam_groups.rb +56 -0
- data/lib/resources/aws/aws_iam_password_policy.rb +121 -0
- data/lib/resources/aws/aws_iam_policies.rb +57 -0
- data/lib/resources/aws/aws_iam_policy.rb +311 -0
- data/lib/resources/aws/aws_iam_role.rb +60 -0
- data/lib/resources/aws/aws_iam_root_user.rb +82 -0
- data/lib/resources/aws/aws_iam_user.rb +145 -0
- data/lib/resources/aws/aws_iam_users.rb +160 -0
- data/lib/resources/aws/aws_kms_key.rb +100 -0
- data/lib/resources/aws/aws_kms_keys.rb +58 -0
- data/lib/resources/aws/aws_rds_instance.rb +74 -0
- data/lib/resources/aws/aws_route_table.rb +67 -0
- data/lib/resources/aws/aws_route_tables.rb +64 -0
- data/lib/resources/aws/aws_s3_bucket.rb +142 -0
- data/lib/resources/aws/aws_s3_bucket_object.rb +87 -0
- data/lib/resources/aws/aws_s3_buckets.rb +52 -0
- data/lib/resources/aws/aws_security_group.rb +314 -0
- data/lib/resources/aws/aws_security_groups.rb +71 -0
- data/lib/resources/aws/aws_sns_subscription.rb +82 -0
- data/lib/resources/aws/aws_sns_topic.rb +57 -0
- data/lib/resources/aws/aws_sns_topics.rb +60 -0
- data/lib/resources/aws/aws_sqs_queue.rb +66 -0
- data/lib/resources/aws/aws_subnet.rb +92 -0
- data/lib/resources/aws/aws_subnets.rb +56 -0
- data/lib/resources/aws/aws_vpc.rb +77 -0
- data/lib/resources/aws/aws_vpcs.rb +55 -0
- data/lib/resources/azure/azure_backend.rb +379 -0
- data/lib/resources/azure/azure_generic_resource.rb +55 -0
- data/lib/resources/azure/azure_resource_group.rb +151 -0
- data/lib/resources/azure/azure_virtual_machine.rb +262 -0
- data/lib/resources/azure/azure_virtual_machine_data_disk.rb +131 -0
- metadata +202 -0
@@ -0,0 +1,262 @@
|
|
1
|
+
require "resources/azure/azure_backend"
|
2
|
+
|
3
|
+
module Inspec::Resources
|
4
|
+
class AzureVirtualMachine < AzureResourceBase
|
5
|
+
name "azure_virtual_machine"
|
6
|
+
|
7
|
+
desc '
|
8
|
+
InSpec Resource to test Azure Virtual Machines
|
9
|
+
'
|
10
|
+
|
11
|
+
supports platform: "azure"
|
12
|
+
|
13
|
+
# Constructor for the resource. This calls the parent constructor to
|
14
|
+
# get the generic resource for the specified machine. This will provide
|
15
|
+
# static methods that are documented
|
16
|
+
#
|
17
|
+
# @author Russell Seymour
|
18
|
+
def initialize(opts = {})
|
19
|
+
# The generic resource needs to pass back a Microsoft.Compute/virtualMachines object so force it
|
20
|
+
opts[:type] = "Microsoft.Compute/virtualMachines"
|
21
|
+
super(opts)
|
22
|
+
|
23
|
+
# Find the virtual machines
|
24
|
+
resources
|
25
|
+
|
26
|
+
create_tag_methods
|
27
|
+
end
|
28
|
+
|
29
|
+
# Method to catch calls that are not explicitly defined.
|
30
|
+
# This allows the simple attributes of the virtual machine to be read without having
|
31
|
+
# to define each one in turn.
|
32
|
+
#
|
33
|
+
# rubocop:disable Metrics/AbcSize
|
34
|
+
#
|
35
|
+
# @param symobl method_id The symbol of the method that has been called
|
36
|
+
#
|
37
|
+
# @return Value of attribute that has been called
|
38
|
+
def method_missing(method_id)
|
39
|
+
# Depending on the method that has been called, determine what value should be returned
|
40
|
+
# These are set as camel case methods to comply with rubocop
|
41
|
+
image_reference_attrs = %w{sku publisher offer}
|
42
|
+
osdisk_attrs = %w{os_type caching create_option disk_size_gb}
|
43
|
+
hardware_profile_attrs = %w{vm_size}
|
44
|
+
os_profile_attrs = %w{computer_name admin_username}
|
45
|
+
osdisk_managed_disk_attrs = %w{storage_account_type}
|
46
|
+
|
47
|
+
# determine the method name to call by converting the snake_case to camelCase
|
48
|
+
# method_name = self.camel_case(method_id.to_s)
|
49
|
+
method_name = method_id.to_s.split("_").inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join
|
50
|
+
method_name.end_with?("Gb") ? method_name.gsub!(/Gb/, &:upcase) : false
|
51
|
+
|
52
|
+
if image_reference_attrs.include?(method_id.to_s)
|
53
|
+
properties.storageProfile.imageReference.send(method_name)
|
54
|
+
elsif osdisk_attrs.include?(method_id.to_s)
|
55
|
+
properties.storageProfile.osDisk.send(method_name)
|
56
|
+
elsif hardware_profile_attrs.include?(method_id.to_s)
|
57
|
+
properties.hardwareProfile.send(method_name)
|
58
|
+
elsif os_profile_attrs.include?(method_id.to_s)
|
59
|
+
properties.osProfile.send(method_name)
|
60
|
+
elsif osdisk_managed_disk_attrs.include?(method_id.to_s)
|
61
|
+
properties.storageProfile.osDisk.managedDisk.send(method_name)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Return the name of the os disk
|
66
|
+
#
|
67
|
+
# @return string Name of the OS disk
|
68
|
+
def os_disk_name
|
69
|
+
properties.storageProfile.osDisk.name
|
70
|
+
end
|
71
|
+
|
72
|
+
# Determine if the OS disk is a managed disk
|
73
|
+
#
|
74
|
+
# @return boolean
|
75
|
+
def has_managed_osdisk?
|
76
|
+
defined?(properties.storageProfile.osDisk.managedDisk)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Does the machine have any NICs connected
|
80
|
+
#
|
81
|
+
# @return boolean
|
82
|
+
def has_nics?
|
83
|
+
properties.networkProfile.networkInterfaces.count != 0
|
84
|
+
end
|
85
|
+
|
86
|
+
# How many NICs are connected to the machine
|
87
|
+
#
|
88
|
+
# @return integer
|
89
|
+
def nic_count
|
90
|
+
properties.networkProfile.networkInterfaces.count
|
91
|
+
end
|
92
|
+
|
93
|
+
# Return an array of the connected NICs so that it can be tested to ensure
|
94
|
+
# the machine is connected properly
|
95
|
+
#
|
96
|
+
# @return array Array of NIC names connected to the machine
|
97
|
+
def connected_nics
|
98
|
+
nic_names = []
|
99
|
+
properties.networkProfile.networkInterfaces.each do |nic|
|
100
|
+
nic_names << nic.id.split(%r{/}).last
|
101
|
+
end
|
102
|
+
nic_names
|
103
|
+
end
|
104
|
+
|
105
|
+
# Whether the machine has data disks or not
|
106
|
+
#
|
107
|
+
# @return boolean
|
108
|
+
def has_data_disks?
|
109
|
+
properties.storageProfile.dataDisks.count != 0
|
110
|
+
end
|
111
|
+
|
112
|
+
# How many data disks are connected
|
113
|
+
#
|
114
|
+
# @return integer
|
115
|
+
def data_disk_count
|
116
|
+
properties.storageProfile.dataDisks.count
|
117
|
+
end
|
118
|
+
|
119
|
+
# Does the machine allow password authentication
|
120
|
+
#
|
121
|
+
# This allows the use of
|
122
|
+
# it { should have_password_authentication }
|
123
|
+
# within the InSpec profile
|
124
|
+
#
|
125
|
+
# @return boolean
|
126
|
+
def has_password_authentication?
|
127
|
+
password_authentication?
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deteremine if the machine allows password authentication
|
131
|
+
#
|
132
|
+
# @return boolean
|
133
|
+
def password_authentication?
|
134
|
+
# if the osProfile property has a linuxConfiguration section then interrogate that
|
135
|
+
# otherwise it is a Windows machine and that always has password auth
|
136
|
+
if defined?(properties.osProfile.linuxConfiguration)
|
137
|
+
!properties.osProfile.linuxConfiguration.disablePasswordAuthentication
|
138
|
+
else
|
139
|
+
true
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Has the machine been given Custom Data at creation
|
144
|
+
#
|
145
|
+
# This allows the use of
|
146
|
+
# it { should have_custom_data }
|
147
|
+
# within the InSpec Profile
|
148
|
+
#
|
149
|
+
# @return boolean
|
150
|
+
def has_custom_data?
|
151
|
+
custom_data?
|
152
|
+
end
|
153
|
+
|
154
|
+
# Determine if custom data has been set
|
155
|
+
#
|
156
|
+
# @return boolean
|
157
|
+
def custom_data?
|
158
|
+
if defined?(properties.osProfile.CustomData)
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Are any SSH Keys assigned to the machine
|
166
|
+
#
|
167
|
+
# This allows the use of
|
168
|
+
# it { should have_ssh_keys }
|
169
|
+
# within the InSpec Profile
|
170
|
+
#
|
171
|
+
# @return boolean
|
172
|
+
def has_ssh_keys?
|
173
|
+
ssh_keys?
|
174
|
+
end
|
175
|
+
|
176
|
+
# Determine if any ssh keys have been asigned to the machine
|
177
|
+
#
|
178
|
+
# @return boolean
|
179
|
+
def ssh_keys?
|
180
|
+
if defined?(properties.osProfile.linuxConfiguration.ssh)
|
181
|
+
properties.osProfile.linuxConfiguration.ssh.publicKeys != 0
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Return the number of ssh keys that have been assigned to the machine
|
188
|
+
#
|
189
|
+
# @return integer
|
190
|
+
def ssh_key_count
|
191
|
+
if defined?(properties.osProfile.linuxConfiguration.ssh)
|
192
|
+
properties.osProfile.linuxConfiguration.ssh.publicKeys.count
|
193
|
+
else
|
194
|
+
0
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Determine is the specified key is in the ssh_keys list
|
199
|
+
#
|
200
|
+
# @return array Array of the public keys that are assigned to allow for testing of that key
|
201
|
+
def ssh_keys
|
202
|
+
# iterate around the keys
|
203
|
+
keys = []
|
204
|
+
properties.osProfile.linuxConfiguration.ssh.publicKeys.each do |key|
|
205
|
+
keys << key.keyData
|
206
|
+
end
|
207
|
+
keys
|
208
|
+
end
|
209
|
+
|
210
|
+
# Does the machine have boot diagnostics enabled
|
211
|
+
#
|
212
|
+
# @return boolean
|
213
|
+
def has_boot_diagnostics?
|
214
|
+
if defined?(properties.diagnosticsProfile)
|
215
|
+
properties.diagnosticsProfile.bootDiagnostics.enabled
|
216
|
+
else
|
217
|
+
false
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
# Return the URI that has been set for the boot diagnostics storage
|
222
|
+
#
|
223
|
+
# @return string
|
224
|
+
def boot_diagnostics_storage_uri
|
225
|
+
properties.diagnosticsProfile.bootDiagnostics.storageUri
|
226
|
+
end
|
227
|
+
|
228
|
+
# If this is a windows machine, returns whether the agent was provisioned or not
|
229
|
+
#
|
230
|
+
# @return boolean
|
231
|
+
def has_provision_vmagent?
|
232
|
+
if defined?(properties.osProfile.windowsConfiguration)
|
233
|
+
properties.osProfile.windowsConfiguration.provisionVMAgent
|
234
|
+
else
|
235
|
+
false
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# If a windows machine see if automatic updates for the agent are enabled
|
240
|
+
#
|
241
|
+
# @return boolean
|
242
|
+
def has_automatic_agent_update?
|
243
|
+
if defined?(properties.osProfile.windowsConfiguration)
|
244
|
+
properties.osProfile.windowsConfiguration.enableAutomaticUpdates
|
245
|
+
else
|
246
|
+
false
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# If this is a windows machine return a boolean to state of the WinRM options
|
251
|
+
# have been set
|
252
|
+
#
|
253
|
+
# @return boolean
|
254
|
+
def has_winrm_options?
|
255
|
+
if defined?(properties.osProfile.windowsConfiguration) && defined?(properties.osProfile.windowsConfiguration.winrm)
|
256
|
+
properties.osProfile.windowsConfiguration.winrm.protocol
|
257
|
+
else
|
258
|
+
false
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
require "resources/azure/azure_backend"
|
2
|
+
require "uri"
|
3
|
+
|
4
|
+
module Inspec::Resources
|
5
|
+
class AzureVirtualMachineDataDisk < AzureResourceBase
|
6
|
+
name "azure_virtual_machine_data_disk"
|
7
|
+
|
8
|
+
desc '
|
9
|
+
InSpec Resource to ensure that the data disks attached to a machine are correct
|
10
|
+
'
|
11
|
+
|
12
|
+
supports platform: "azure"
|
13
|
+
|
14
|
+
# Create a filter table so that tests on the disk can be performed
|
15
|
+
filter = FilterTable.create
|
16
|
+
filter.register_custom_matcher(:exists?) { |x| !x.entries.empty? }
|
17
|
+
filter.register_column(:disk, field: :disk)
|
18
|
+
.register_column(:number, field: :number)
|
19
|
+
.register_column(:name, field: :name)
|
20
|
+
.register_column(:size, field: :size)
|
21
|
+
.register_column(:vhd_uri, field: :vhd_uri)
|
22
|
+
.register_column(:storage_account_name, field: :storage_account_name)
|
23
|
+
.register_column(:lun, field: :lun)
|
24
|
+
.register_column(:caching, field: :caching)
|
25
|
+
.register_column(:create_option, field: :create_option)
|
26
|
+
.register_column(:is_managed_disk?, field: :is_managed_disk?)
|
27
|
+
.register_column(:storage_account_type, field: :storage_account_type)
|
28
|
+
.register_column(:subscription_id, field: :subscription_id)
|
29
|
+
.register_column(:resource_group, field: :resource_group)
|
30
|
+
filter.install_filter_methods_on_resource(self, :datadisk_details)
|
31
|
+
|
32
|
+
# Constructor for the resource. This calls the parent constructor to
|
33
|
+
# get the generic resource for the specified machine. This will provide
|
34
|
+
# static methods that are documented
|
35
|
+
#
|
36
|
+
# @author Russell Seymour
|
37
|
+
def initialize(opts = {})
|
38
|
+
# The generic resource needs to pass back a Microsoft.Compute/virtualMachines object so force it
|
39
|
+
opts[:type] = "Microsoft.Compute/virtualMachines"
|
40
|
+
super(opts)
|
41
|
+
|
42
|
+
# Get the data disks
|
43
|
+
resources
|
44
|
+
end
|
45
|
+
|
46
|
+
# Return information about the disks and add to the filter table so that
|
47
|
+
# assertions can be performed
|
48
|
+
#
|
49
|
+
# @author Russell Seymour
|
50
|
+
def datadisk_details
|
51
|
+
return if failed_resource?
|
52
|
+
|
53
|
+
# Iterate around the data disks on the machine
|
54
|
+
properties.storageProfile.dataDisks.each_with_index.map do |datadisk, index|
|
55
|
+
# Call function to parse the data disks and return an object based on the parameters
|
56
|
+
parse_datadisk(datadisk, index)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Return boolean to denote if the machine has data disks attached or not
|
61
|
+
def has_data_disks?
|
62
|
+
!entries.empty?
|
63
|
+
end
|
64
|
+
|
65
|
+
# Return an integer stating how many data disks are attached to the machine
|
66
|
+
def count
|
67
|
+
entries.count
|
68
|
+
end
|
69
|
+
|
70
|
+
# Return boolean to state if the machine is using managed disks for data disks
|
71
|
+
def has_managed_disks?
|
72
|
+
# iterate around the entries
|
73
|
+
result = entries.each.select { |e| e[:is_managed_disk?] }
|
74
|
+
result.empty? ? false : true
|
75
|
+
end
|
76
|
+
|
77
|
+
private
|
78
|
+
|
79
|
+
# Parse the data disk to determine if these are managed disks or in a storage account
|
80
|
+
# for example. The disk index, name and size will be returned
|
81
|
+
#
|
82
|
+
# params object disk Object containing the details of the disk
|
83
|
+
# params integer index Index denoting which disk number this is on the machine
|
84
|
+
#
|
85
|
+
# return hashtable
|
86
|
+
def parse_datadisk(disk, index)
|
87
|
+
# Configure parsed hashtable to hold the information
|
88
|
+
# Initialise this with common attributes from the different types of disk
|
89
|
+
parsed = {
|
90
|
+
disk: index,
|
91
|
+
number: index + 1,
|
92
|
+
lun: disk.lun,
|
93
|
+
name: disk.name,
|
94
|
+
size: disk.diskSizeGB,
|
95
|
+
caching: disk.caching,
|
96
|
+
create_option: disk.createOption,
|
97
|
+
}
|
98
|
+
|
99
|
+
# Determine if the current disk is a managed disk or not
|
100
|
+
if defined?(disk.vhd)
|
101
|
+
# As this is in a storage account this is not a managed disk
|
102
|
+
parsed[:is_managed_disk?] = false
|
103
|
+
|
104
|
+
# Set information about the disk
|
105
|
+
# Parse the uri of the disk URI so that the storage account can be retrieved
|
106
|
+
uri = URI.parse(disk.vhd.uri)
|
107
|
+
parsed[:vhd_uri] = disk.vhd.uri
|
108
|
+
parsed[:storage_account_name] = uri.host.split(".").first
|
109
|
+
|
110
|
+
elsif defined?(disk.managedDisk)
|
111
|
+
# State that this is a managed disk
|
112
|
+
parsed[:is_managed_disk?] = true
|
113
|
+
|
114
|
+
# Get information about the managed disk
|
115
|
+
parsed[:storage_account_type] = disk.managedDisk.storageAccountType
|
116
|
+
parsed[:id] = disk.managedDisk.id
|
117
|
+
|
118
|
+
# Break up the ID string so that the following information can get retreived
|
119
|
+
# - subscription_id
|
120
|
+
# - resource_group
|
121
|
+
id_parts = parsed[:id].split(%r{/}).reject(&:empty?)
|
122
|
+
|
123
|
+
parsed[:subscription_id] = id_parts[1]
|
124
|
+
parsed[:resource_group] = id_parts[3]
|
125
|
+
end
|
126
|
+
|
127
|
+
# return the parsed object
|
128
|
+
parsed
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inspec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 4.22.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chef InSpec Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: inspec-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.22.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.22.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: train
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday_middleware
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.12.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.12.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: train-habitat
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: train-aws
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.1'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: train-winrm
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.2'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.2'
|
97
|
+
description: InSpec provides a framework for creating end-to-end infrastructure tests.
|
98
|
+
You can use it for integration or even compliance testing. Create fully portable
|
99
|
+
test profiles and use them in your workflow to ensure stability and security. Integrate
|
100
|
+
InSpec in your change lifecycle for local testing, CI/CD, and deployment verification.
|
101
|
+
email:
|
102
|
+
- inspec@chef.io
|
103
|
+
executables: []
|
104
|
+
extensions: []
|
105
|
+
extra_rdoc_files: []
|
106
|
+
files:
|
107
|
+
- Gemfile
|
108
|
+
- inspec.gemspec
|
109
|
+
- lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Gemfile
|
110
|
+
- lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/inspec-plugin-template.gemspec
|
111
|
+
- lib/plugins/inspec-init/templates/profiles/aws/README.md
|
112
|
+
- lib/plugins/inspec-init/templates/profiles/aws/attributes.yml
|
113
|
+
- lib/plugins/inspec-init/templates/profiles/aws/controls/example.rb
|
114
|
+
- lib/plugins/inspec-init/templates/profiles/aws/inspec.yml
|
115
|
+
- lib/plugins/inspec-init/templates/profiles/azure/README.md
|
116
|
+
- lib/plugins/inspec-init/templates/profiles/azure/controls/example.rb
|
117
|
+
- lib/plugins/inspec-init/templates/profiles/azure/inspec.yml
|
118
|
+
- lib/plugins/inspec-init/templates/profiles/gcp/README.md
|
119
|
+
- lib/plugins/inspec-init/templates/profiles/gcp/attributes.yml
|
120
|
+
- lib/plugins/inspec-init/templates/profiles/gcp/controls/example.rb
|
121
|
+
- lib/plugins/inspec-init/templates/profiles/gcp/inspec.yml
|
122
|
+
- lib/resource_support/aws.rb
|
123
|
+
- lib/resource_support/aws/aws_backend_base.rb
|
124
|
+
- lib/resource_support/aws/aws_backend_factory_mixin.rb
|
125
|
+
- lib/resource_support/aws/aws_plural_resource_mixin.rb
|
126
|
+
- lib/resource_support/aws/aws_resource_mixin.rb
|
127
|
+
- lib/resource_support/aws/aws_singular_resource_mixin.rb
|
128
|
+
- lib/resources/aws/aws_billing_report.rb
|
129
|
+
- lib/resources/aws/aws_billing_reports.rb
|
130
|
+
- lib/resources/aws/aws_cloudtrail_trail.rb
|
131
|
+
- lib/resources/aws/aws_cloudtrail_trails.rb
|
132
|
+
- lib/resources/aws/aws_cloudwatch_alarm.rb
|
133
|
+
- lib/resources/aws/aws_cloudwatch_log_metric_filter.rb
|
134
|
+
- lib/resources/aws/aws_config_delivery_channel.rb
|
135
|
+
- lib/resources/aws/aws_config_recorder.rb
|
136
|
+
- lib/resources/aws/aws_ebs_volume.rb
|
137
|
+
- lib/resources/aws/aws_ebs_volumes.rb
|
138
|
+
- lib/resources/aws/aws_ec2_instance.rb
|
139
|
+
- lib/resources/aws/aws_ec2_instances.rb
|
140
|
+
- lib/resources/aws/aws_ecs_cluster.rb
|
141
|
+
- lib/resources/aws/aws_eks_cluster.rb
|
142
|
+
- lib/resources/aws/aws_elb.rb
|
143
|
+
- lib/resources/aws/aws_elbs.rb
|
144
|
+
- lib/resources/aws/aws_flow_log.rb
|
145
|
+
- lib/resources/aws/aws_iam_access_key.rb
|
146
|
+
- lib/resources/aws/aws_iam_access_keys.rb
|
147
|
+
- lib/resources/aws/aws_iam_group.rb
|
148
|
+
- lib/resources/aws/aws_iam_groups.rb
|
149
|
+
- lib/resources/aws/aws_iam_password_policy.rb
|
150
|
+
- lib/resources/aws/aws_iam_policies.rb
|
151
|
+
- lib/resources/aws/aws_iam_policy.rb
|
152
|
+
- lib/resources/aws/aws_iam_role.rb
|
153
|
+
- lib/resources/aws/aws_iam_root_user.rb
|
154
|
+
- lib/resources/aws/aws_iam_user.rb
|
155
|
+
- lib/resources/aws/aws_iam_users.rb
|
156
|
+
- lib/resources/aws/aws_kms_key.rb
|
157
|
+
- lib/resources/aws/aws_kms_keys.rb
|
158
|
+
- lib/resources/aws/aws_rds_instance.rb
|
159
|
+
- lib/resources/aws/aws_route_table.rb
|
160
|
+
- lib/resources/aws/aws_route_tables.rb
|
161
|
+
- lib/resources/aws/aws_s3_bucket.rb
|
162
|
+
- lib/resources/aws/aws_s3_bucket_object.rb
|
163
|
+
- lib/resources/aws/aws_s3_buckets.rb
|
164
|
+
- lib/resources/aws/aws_security_group.rb
|
165
|
+
- lib/resources/aws/aws_security_groups.rb
|
166
|
+
- lib/resources/aws/aws_sns_subscription.rb
|
167
|
+
- lib/resources/aws/aws_sns_topic.rb
|
168
|
+
- lib/resources/aws/aws_sns_topics.rb
|
169
|
+
- lib/resources/aws/aws_sqs_queue.rb
|
170
|
+
- lib/resources/aws/aws_subnet.rb
|
171
|
+
- lib/resources/aws/aws_subnets.rb
|
172
|
+
- lib/resources/aws/aws_vpc.rb
|
173
|
+
- lib/resources/aws/aws_vpcs.rb
|
174
|
+
- lib/resources/azure/azure_backend.rb
|
175
|
+
- lib/resources/azure/azure_generic_resource.rb
|
176
|
+
- lib/resources/azure/azure_resource_group.rb
|
177
|
+
- lib/resources/azure/azure_virtual_machine.rb
|
178
|
+
- lib/resources/azure/azure_virtual_machine_data_disk.rb
|
179
|
+
homepage: https://github.com/inspec/inspec
|
180
|
+
licenses:
|
181
|
+
- Apache-2.0
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - "~>"
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '2.4'
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubygems_version: 3.0.3
|
199
|
+
signing_key:
|
200
|
+
specification_version: 4
|
201
|
+
summary: Infrastructure and compliance testing.
|
202
|
+
test_files: []
|