cfn-nag 0.7.8 → 0.7.9
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: d784884fe82831b3d7dbc15678226578a7e00dade5a30ab32403f51e4b836fcd
|
4
|
+
data.tar.gz: 8176ca61daa578e55291b7c9e86ea2004500104108bb4ca186785bf404a726c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d75605726e854b37c5b1ac5fa52302cf5e84e5c398e7d106c14e85e7cd298f58146e6a228b5beb33996a8a0d34429f6620643da021e2e208002964244ffe76d4
|
7
|
+
data.tar.gz: e4cab446823bcd9a0e55c26c21846d89a508cbcb4c0971b15d0632ebd4c09f8dd9247408d66712a9d94adf1c0d75f3811e6d2a9052573a7f2e0c44b73836e281
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require_relative 'base'
|
5
|
+
|
6
|
+
class LambdaFunctionReservedConcurrentExecutionsRule < BaseRule
|
7
|
+
def rule_text
|
8
|
+
'Lambda functions should define ReservedConcurrentExecutions to reserve simultaneous executions'
|
9
|
+
end
|
10
|
+
|
11
|
+
def rule_type
|
12
|
+
Violation::WARNING
|
13
|
+
end
|
14
|
+
|
15
|
+
def rule_id
|
16
|
+
'W92'
|
17
|
+
end
|
18
|
+
|
19
|
+
def audit_impl(cfn_model)
|
20
|
+
lambda_functions = cfn_model.resources_by_type('AWS::Lambda::Function')
|
21
|
+
violating_lambda_functions = lambda_functions.select do |lambda_function|
|
22
|
+
lambda_function.reservedConcurrentExecutions.nil?
|
23
|
+
end
|
24
|
+
|
25
|
+
violating_lambda_functions.map(&:logical_resource_id)
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-nag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -284,6 +284,7 @@ files:
|
|
284
284
|
- lib/cfn-nag/custom_rules/KinesisStreamStreamEncryptionRule.rb
|
285
285
|
- lib/cfn-nag/custom_rules/LambdaFunctionCloudWatchLogsRule.rb
|
286
286
|
- lib/cfn-nag/custom_rules/LambdaFunctionInsideVPCRule.rb
|
287
|
+
- lib/cfn-nag/custom_rules/LambdaFunctionReservedConcurrentExecutionsRule.rb
|
287
288
|
- lib/cfn-nag/custom_rules/LambdaPermissionEventSourceTokenRule.rb
|
288
289
|
- lib/cfn-nag/custom_rules/LambdaPermissionInvokeFunctionActionRule.rb
|
289
290
|
- lib/cfn-nag/custom_rules/LambdaPermissionWildcardPrincipalRule.rb
|