bundler-trivy 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bundler/trivy/config.rb +2 -2
- data/lib/bundler/trivy/scanner.rb +4 -5
- data/lib/bundler/trivy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3079187f7de00f3634dd3f042607d9c4b2f505d96239eec97c5633478b4c3e80
|
|
4
|
+
data.tar.gz: 1ca3ac43876af2b7eff2b5a0bd10ae0f2af13ee1eaf754d90bfd7f93a4b6e131
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f8298ad2fe95f9b1b72c824b93f59bcea9ffc398f3e681c1591cfdde8475850a71632e599eabcb155dcd7cc3903c52afa31395da5889284c76ffa627f911902
|
|
7
|
+
data.tar.gz: c374956836874f08ed84bab869e2b625155cd0b413f77e9907c05b7631e69729b5162a82fdff3dc7c2daedb5f4d6c80aab53531e906da56652a790e7ae3f205c
|
data/lib/bundler/trivy/config.rb
CHANGED
|
@@ -274,12 +274,12 @@ module Bundler
|
|
|
274
274
|
|
|
275
275
|
return {} unless File.exist?(config_path)
|
|
276
276
|
|
|
277
|
-
config = YAML.
|
|
277
|
+
config = YAML.safe_load_file(config_path, permitted_classes: [Date]) || {}
|
|
278
278
|
|
|
279
279
|
# Load global config and merge
|
|
280
280
|
global_config_path = File.expand_path("~/.bundle/trivy.yml")
|
|
281
281
|
if File.exist?(global_config_path)
|
|
282
|
-
global = YAML.
|
|
282
|
+
global = YAML.safe_load_file(global_config_path, permitted_classes: [Date]) || {}
|
|
283
283
|
config = deep_merge(global, config)
|
|
284
284
|
end
|
|
285
285
|
|
|
@@ -67,11 +67,10 @@ module Bundler
|
|
|
67
67
|
args = build_trivy_args
|
|
68
68
|
timeout = @config.trivy_timeout
|
|
69
69
|
|
|
70
|
-
# Execute Trivy with
|
|
71
|
-
stdout, stderr, status =
|
|
72
|
-
*args
|
|
73
|
-
|
|
74
|
-
)
|
|
70
|
+
# Execute Trivy with timeout for robust command execution
|
|
71
|
+
stdout, stderr, status = Timeout.timeout(timeout) do
|
|
72
|
+
Open3.capture3(*args)
|
|
73
|
+
end
|
|
75
74
|
|
|
76
75
|
# Handle Trivy exit codes:
|
|
77
76
|
# 0 = success, no vulnerabilities
|