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: e0591612f880302521b2713da96667d23c7fe0015f78ae5e42b194b12bee5eb7
4
- data.tar.gz: 2f1876121ee7680d0ae2134f2fedee1f458c3c536ff65a5f7d4748c94e30184d
3
+ metadata.gz: db1486b366e0ecc19c6d0b5499d5da1ecb50ea8d40f02654855f845ab102b413
4
+ data.tar.gz: e15e0619ed02cc66a9c49870911cc5a2f88b28700f5dfa64a10bf40ef2eeb287
5
5
  SHA512:
6
- metadata.gz: 784389cd1a4afb8855a1488be3844effc15adc1e4ecd3990c3970c9a0f0852729bc60203978f0e3ef2062da51ae3b70c2842ce45c8feacc4e6ba64e533da194b
7
- data.tar.gz: 1e1bf24ebf35f21bfb3d52dc960a52faaf2d8f7417694d3ab313c24d7d1b15f5965f6070556caeb01ccb239fa8c152e8902a5f511dd12950706598359a4d6b62
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.86
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