cfn-nag 0.3.86 → 0.3.87
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: db1486b366e0ecc19c6d0b5499d5da1ecb50ea8d40f02654855f845ab102b413
|
4
|
+
data.tar.gz: e15e0619ed02cc66a9c49870911cc5a2f88b28700f5dfa64a10bf40ef2eeb287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40af3f07c3aa893cb4b82d0b6abefbbc7764de078278f5e33e387d64689baf3477c185af89fd4ac8cccdb20af45d4444a22e9eb6b6ff68dc5257545ab9410f5c
|
7
|
+
data.tar.gz: 608f332094859a43e1473d3d4795b82ac592881b723c4d6164031bf83a145dd8737e60dd93d3d28a579bee033c18bca68eae80264cc596094e73abe3956db0dc
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-nag/violation'
|
4
|
+
require_relative 'base'
|
5
|
+
|
6
|
+
class BatchJobDefinitionContainerPropertiesPrivilegedRule < BaseRule
|
7
|
+
def rule_text
|
8
|
+
'Batch Job Definition Container Properties should not have Privileged set to true'
|
9
|
+
end
|
10
|
+
|
11
|
+
def rule_type
|
12
|
+
Violation::WARNING
|
13
|
+
end
|
14
|
+
|
15
|
+
def rule_id
|
16
|
+
'W34'
|
17
|
+
end
|
18
|
+
|
19
|
+
def audit_impl(cfn_model)
|
20
|
+
violating_job_definitions = cfn_model.resources_by_type('AWS::Batch::JobDefinition')
|
21
|
+
.select do |job_definition|
|
22
|
+
truthy?(job_definition.containerProperties['Privileged'])
|
23
|
+
end
|
24
|
+
|
25
|
+
violating_job_definitions.map(&:logical_resource_id)
|
26
|
+
end
|
27
|
+
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.3.
|
4
|
+
version: 0.3.87
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/cfn-nag/cfn_nag.rb
|
140
140
|
- lib/cfn-nag/cfn_nag_logging.rb
|
141
141
|
- lib/cfn-nag/custom_rule_loader.rb
|
142
|
+
- lib/cfn-nag/custom_rules/BatchJobDefinitionContainerPropertiesPrivilegedRule.rb
|
142
143
|
- lib/cfn-nag/custom_rules/CloudFormationAuthenticationRule.rb
|
143
144
|
- lib/cfn-nag/custom_rules/CloudFrontDistributionAccessLoggingRule.rb
|
144
145
|
- lib/cfn-nag/custom_rules/CodeBuildEncryptionKeyRule.rb
|