cfn-nag 0.5.27 → 0.5.28
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c4a52da85cbdeefb7d7283f69fc753bad3123fc3a24794c1b6be64711491f0b
|
4
|
+
data.tar.gz: ff67b04edb5444d1c1686ec1db1873cfd0938259f2bebf7c3b8c9a1a38e4ef7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee1342976006ea4fddf47a9154961540e5d59160721e28de1ba4b0dcb0743bb177f9fbe15494cd158f403d06c17208649809a2d836d40d5b37d81a8da9c64421
|
7
|
+
data.tar.gz: c5bc544b1dc4b8a18c89317395a5ca3fde8e8e081b167cf065bb231055de243fb0d938228edae44528188718075f439ab3a335130172c738e6f947dafda5064f
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require_relative 'base'
|
5
|
+
|
6
|
+
class ApiGatewayDeploymentUsagePlanRule < BaseRule
|
7
|
+
def rule_text
|
8
|
+
'AWS::ApiGateway::Deployment resources should be associated with an AWS::ApiGateway::UsagePlan. '
|
9
|
+
end
|
10
|
+
|
11
|
+
def rule_type
|
12
|
+
Violation::WARNING
|
13
|
+
end
|
14
|
+
|
15
|
+
def rule_id
|
16
|
+
'W68'
|
17
|
+
end
|
18
|
+
|
19
|
+
def audit_impl(cfn_model)
|
20
|
+
violating_api_deployments = cfn_model.resources_by_type('AWS::ApiGateway::Deployment').select do |deployment|
|
21
|
+
deployment.usage_plan_ids.empty?
|
22
|
+
end
|
23
|
+
|
24
|
+
violating_api_deployments.map(&:logical_resource_id)
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-nag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.4.
|
75
|
+
version: 0.4.23
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.4.
|
82
|
+
version: 0.4.23
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: logging
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/cfn-nag/custom_rules/AmplifyAppOauthTokenRule.rb
|
182
182
|
- lib/cfn-nag/custom_rules/AmplifyBranchBasicAuthConfigPasswordRule.rb
|
183
183
|
- lib/cfn-nag/custom_rules/ApiGatewayAccessLoggingRule.rb
|
184
|
+
- lib/cfn-nag/custom_rules/ApiGatewayDeploymentUsagePlanRule.rb
|
184
185
|
- lib/cfn-nag/custom_rules/ApiGatewayMethodAuthorizationTypeRule.rb
|
185
186
|
- lib/cfn-nag/custom_rules/ApiGatewaySecurityPolicyRule.rb
|
186
187
|
- lib/cfn-nag/custom_rules/ApiGatewayStageUsagePlanRule.rb
|