inspec-core 4.56.17 → 4.56.19
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: 58efdb5e3457dcb1bf97227b98e1f723c672c7eadc995ef3f07b1f2a910c47db
|
4
|
+
data.tar.gz: 0f789e778551423ccfdacc52dbcda63c597b3e8d83b00739aa36becc52502213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96f3692d1e3dee025002b7e661a635a33cf8ae353e164e2931a6d139d2711c1c94162e69fdc9db52a28fe3a1eb85319f7b08ae27e0f68528603c0e9096a758e2
|
7
|
+
data.tar.gz: dc1ec6f7322e4cbac56cb1cfe6f6761f44b455c77d069b414c3ec759695ce9ff260deee62c9a0a3184f0a800d31e5fdad8c791bd04fc40bc4d0fafc1fe87f84e
|
@@ -61,9 +61,13 @@ module Inspec::Resources
|
|
61
61
|
raise Inspec::Exceptions::ResourceFailed, "Oracle query with errors: #{out}"
|
62
62
|
else
|
63
63
|
begin
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
unless inspec_cmd.stdout.empty?
|
65
|
+
DatabaseHelper::SQLQueryResult.new(inspec_cmd, parse_csv_result(inspec_cmd.stdout))
|
66
|
+
else
|
67
|
+
inspec_cmd.stdout
|
68
|
+
end
|
69
|
+
rescue Exception => ex
|
70
|
+
raise Inspec::Exceptions::ResourceFailed, "Oracle query with exception: #{ex}"
|
67
71
|
end
|
68
72
|
end
|
69
73
|
end
|
@@ -55,8 +55,10 @@ module Inspec::Resources
|
|
55
55
|
psql_cmd = create_psql_cmd(query, db)
|
56
56
|
cmd = inspec.command(psql_cmd, redact_regex: %r{(:\/\/[a-z]*:).*(@)})
|
57
57
|
out = cmd.stdout + "\n" + cmd.stderr
|
58
|
-
if cmd.exit_status != 0
|
59
|
-
raise Inspec::Exceptions::ResourceFailed, "PostgreSQL
|
58
|
+
if cmd.exit_status != 0 && ( out =~ /could not connect to/ || out =~ /password authentication failed/ ) && out.downcase =~ /error:/
|
59
|
+
raise Inspec::Exceptions::ResourceFailed, "PostgreSQL connection error: #{out}"
|
60
|
+
elsif cmd.exit_status != 0 && out.downcase =~ /error:/
|
61
|
+
Lines.new(out, "PostgreSQL query with error: #{query}")
|
60
62
|
else
|
61
63
|
Lines.new(cmd.stdout.strip, "PostgreSQL query: #{query}")
|
62
64
|
end
|
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.56.
|
4
|
+
version: 4.56.19
|
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: 2022-03-
|
11
|
+
date: 2022-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-telemetry
|