inspec-core 4.23.11 → 4.23.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inspec/rule.rb +8 -8
- data/lib/inspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d456ded6249283aa4db22d7dc054afeb37996472a16d9d8d007bd492f7a6c8
|
4
|
+
data.tar.gz: f355c608691df7895a0440a7f70a0ffb0f8cd0d7167da490dfcefeec45bba2bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9c878fa83d12844ea6d0b1a58da70d6e39650a41e5ad7b7041bfc11faee21c8ce67adee8c5eae29ef04a4734b7c916415d285dab888c0c776a80717037c049b
|
7
|
+
data.tar.gz: f072fbccdb85a007f3a33ba9294024b403eda80b184ee806a08226a47728681aaed1692ac61cbefde5fe7e965ea0db5e6306405e6c808f15d4011a44a6215542
|
data/lib/inspec/rule.rb
CHANGED
@@ -343,14 +343,8 @@ module Inspec
|
|
343
343
|
__waiver_data["skipped_due_to_waiver"] = false
|
344
344
|
__waiver_data["message"] = ""
|
345
345
|
|
346
|
-
#
|
347
|
-
#
|
348
|
-
# is false-like, since all non-skipped waiver operations are handled
|
349
|
-
# during reporting phase.
|
350
|
-
return unless __waiver_data.key?("run") && !__waiver_data["run"]
|
351
|
-
|
352
|
-
# OK, the intent is to skip. Does it have an expiration date, and
|
353
|
-
# if so, is it in the future?
|
346
|
+
# Does it have an expiration date, and if so, is it in the future?
|
347
|
+
# This sets a waiver message before checking `run: true`
|
354
348
|
expiry = __waiver_data["expiration_date"]
|
355
349
|
if expiry
|
356
350
|
# YAML will automagically give us a Date or a Time.
|
@@ -370,6 +364,12 @@ module Inspec
|
|
370
364
|
end
|
371
365
|
end
|
372
366
|
|
367
|
+
# Waivers should have a hash value with keys possibly including "run" and
|
368
|
+
# expiration_date. We only care here if it has a "run" key and it
|
369
|
+
# is false-like, since all non-skipped waiver operations are handled
|
370
|
+
# during reporting phase.
|
371
|
+
return unless __waiver_data.key?("run") && !__waiver_data["run"]
|
372
|
+
|
373
373
|
# OK, apply a skip.
|
374
374
|
@__skip_rule[:result] = true
|
375
375
|
@__skip_rule[:type] = :waiver
|
data/lib/inspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.23.
|
4
|
+
version: 4.23.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-telemetry
|