outliers 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/outliers/filters/aws/ec2/tags.rb +0 -10
- data/lib/outliers/info.rb +4 -0
- data/lib/outliers/version.rb +1 -1
- data/reference.yaml +20 -22
- data/shared.yaml +6 -0
- data/spec/info_spec.rb +27 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8130b824d6821946ba5d05a836e3232c030427f4
|
4
|
+
data.tar.gz: c8afbce03b925b289ec32f46a7370bc1134b743f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5da1d78eecef950a795f1d06ca1f97fef7c260ffbec34b356e0b9728695ca1bb9bd46e5175186408682c0d12a75b7d6e5faa0ca867b434b59a3679492b9265e2
|
7
|
+
data.tar.gz: b1468e505bd7edca7a87f10be45fc823c3e647ae5686dbcdae2dca8b21e5b53dd94a3a3c1b37b9e7aa995c7c2db2832ab5025082737ef7e39d1c21398e93308a
|
data/CHANGELOG.md
CHANGED
data/lib/outliers/info.rb
CHANGED
data/lib/outliers/version.rb
CHANGED
data/reference.yaml
CHANGED
@@ -1,36 +1,26 @@
|
|
1
|
-
all:
|
2
|
-
credentials:
|
3
|
-
access_key_id: AWS Account Access Key
|
4
|
-
secret_access_key: AWS Account Secret Key
|
5
|
-
region: AWS Region (Default us-east-1)
|
6
|
-
resources:
|
7
|
-
shared:
|
8
|
-
description: Verifications which are available to all resources.
|
9
|
-
verifications:
|
10
|
-
none_exist:
|
11
|
-
description: Verify no resources exist in list.
|
12
|
-
equals:
|
13
|
-
description: Verify no resources match the given list of keys.
|
14
|
-
args: 'keys: [KEY1,KEY2]'
|
15
|
-
|
16
1
|
aws_cloud_formation:
|
17
2
|
credentials:
|
18
3
|
access_key_id: AWS Account Access Key
|
19
4
|
secret_access_key: AWS Account Secret Key
|
20
|
-
region: AWS Region
|
5
|
+
region: AWS Region
|
21
6
|
resources:
|
22
7
|
stack:
|
23
8
|
description: AWS Cloud Formation Stack
|
9
|
+
filters: {}
|
24
10
|
verifications: {}
|
25
11
|
|
26
12
|
aws_ec2:
|
27
13
|
credentials:
|
28
14
|
access_key_id: AWS Account Access Key
|
29
15
|
secret_access_key: AWS Account Secret Key
|
30
|
-
region: AWS Region
|
16
|
+
region: AWS Region
|
31
17
|
resources:
|
32
18
|
instance:
|
33
19
|
description: AWS EC2 Instance
|
20
|
+
filters:
|
21
|
+
tag:
|
22
|
+
description: Filter instances tagged with the given tag name and value.
|
23
|
+
args: 'TAG_NAME:VALUE'
|
34
24
|
verifications:
|
35
25
|
classic:
|
36
26
|
description: Instance is in AWS Classic (No VPC).
|
@@ -45,21 +35,24 @@ aws_ec2:
|
|
45
35
|
description: Instance is in a VPC.
|
46
36
|
security_group:
|
47
37
|
description: AWS EC2 Security Group
|
38
|
+
filters: {}
|
48
39
|
verifications:
|
49
40
|
no_public_internet_ingress:
|
50
41
|
description: Security Group has no rules open to 0.0.0.0/0.
|
51
42
|
image:
|
52
43
|
description: AWS EC2 AMI
|
44
|
+
filters: {}
|
53
45
|
verifications: {}
|
54
46
|
|
55
47
|
aws_elb:
|
56
48
|
credentials:
|
57
49
|
access_key_id: AWS Account Access Key
|
58
50
|
secret_access_key: AWS Account Secret Key
|
59
|
-
region: AWS Region
|
51
|
+
region: AWS Region
|
60
52
|
resources:
|
61
53
|
load_balancer:
|
62
54
|
description: AWS ELB (Elastic Load Balancer)
|
55
|
+
filters: {}
|
63
56
|
verifications:
|
64
57
|
ssl_certificates_valid:
|
65
58
|
description: Validates all SSL certificates associated with an ELB are valid for given number of days.
|
@@ -69,10 +62,11 @@ aws_iam:
|
|
69
62
|
credentials:
|
70
63
|
access_key_id: AWS Account Access Key
|
71
64
|
secret_access_key: AWS Account Secret Key
|
72
|
-
region: AWS Region
|
65
|
+
region: AWS Region
|
73
66
|
resources:
|
74
67
|
user:
|
75
68
|
description: AWS IAM User
|
69
|
+
filters: {}
|
76
70
|
verifications:
|
77
71
|
mfa_enabled:
|
78
72
|
description: Verify MFA enabled for user.
|
@@ -85,10 +79,11 @@ aws_rds:
|
|
85
79
|
credentials:
|
86
80
|
access_key_id: AWS Account Access Key
|
87
81
|
secret_access_key: AWS Account Secret Key
|
88
|
-
region: AWS Region
|
82
|
+
region: AWS Region
|
89
83
|
resources:
|
90
84
|
db_instance:
|
91
85
|
description: AWS RDS Database Instance
|
86
|
+
filters: {}
|
92
87
|
verifications:
|
93
88
|
backup_retention_period:
|
94
89
|
description: Validate the backup retention period equals given days for the db_instance.
|
@@ -97,16 +92,18 @@ aws_rds:
|
|
97
92
|
description: RDS Multi AZ set to yes.
|
98
93
|
db_snapshot:
|
99
94
|
description: AWS RDS Database Snapshot
|
95
|
+
filters: {}
|
100
96
|
verifications: {}
|
101
97
|
|
102
98
|
aws_s3:
|
103
99
|
credentials:
|
104
100
|
access_key_id: AWS Account Access Key
|
105
101
|
secret_access_key: AWS Account Secret Key
|
106
|
-
region: AWS Region
|
102
|
+
region: AWS Region
|
107
103
|
resources:
|
108
104
|
bucket:
|
109
105
|
description: AWS S3 Bucket
|
106
|
+
filters: {}
|
110
107
|
verifications:
|
111
108
|
empty:
|
112
109
|
description: Bucket has no objects.
|
@@ -121,8 +118,9 @@ aws_sqs:
|
|
121
118
|
credentials:
|
122
119
|
access_key_id: AWS Account Access Key
|
123
120
|
secret_access_key: AWS Account Secret Key
|
124
|
-
region: AWS Region
|
121
|
+
region: AWS Region
|
125
122
|
resources:
|
126
123
|
queue:
|
127
124
|
description: AWS SQS Queue
|
125
|
+
filters: {}
|
128
126
|
verifications: {}
|
data/shared.yaml
ADDED
data/spec/info_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe Outliers::Info do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should be able to load reference.yaml" do
|
15
|
-
expect(subject.reference.keys.
|
15
|
+
expect(subject.reference.keys.count > 0).to be_true
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should verify each provider class has a entry in reference.yaml" do
|
@@ -23,19 +23,43 @@ describe Outliers::Info do
|
|
23
23
|
expect((@resources - ['all_shared']).sort).to eq(Outliers::Resources.list.map {|r| r.to_human}.sort)
|
24
24
|
end
|
25
25
|
|
26
|
-
it "should validate each resource has a verification list and description" do
|
26
|
+
it "should validate each resource has a verification list, filter list and description" do
|
27
27
|
subject.reference.each_value do |provider_data|
|
28
28
|
provider_data['resources'].each_value do |resource_data|
|
29
29
|
expect(resource_data['verifications'].class).to eq(Hash)
|
30
|
+
expect(resource_data['filters'].class).to eq(Hash)
|
30
31
|
expect(resource_data['description'].class).to eq(String)
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
35
36
|
it "should validate each resource has a list of credentials" do
|
36
|
-
subject.reference.
|
37
|
+
subject.reference.each_pair do |name,provider_data|
|
37
38
|
expect(provider_data['credentials'].class).to eq(Hash)
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
42
|
+
|
43
|
+
context "#shared" do
|
44
|
+
before do
|
45
|
+
@verifications = Outliers::Verifications::Shared.instance_methods.map {|m| m.to_s.chomp('?')}
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should be able to load shared.yaml" do
|
49
|
+
expect(subject.shared.keys.count > 0).to be_true
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should verify each shared verfiication method has an entry in shared.yaml" do
|
53
|
+
@verifications.each do |name|
|
54
|
+
expect(subject.shared['verifications'].keys.include?(name)).to be_true
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should verify each verification in shared.yaml has a shared verification method" do
|
59
|
+
subject.shared['verifications'].keys.each do |name|
|
60
|
+
expect(@verifications.include?(name)).to be_true
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
41
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outliers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Weaver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- lib/outliers/version.rb
|
139
139
|
- outliers.gemspec
|
140
140
|
- reference.yaml
|
141
|
+
- shared.yaml
|
141
142
|
- spec/collection_spec.rb
|
142
143
|
- spec/credentials_spec.rb
|
143
144
|
- spec/evaluation_spec.rb
|