pipedawg-vl 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipedawg/job/qualys/scan.rb +6 -6
- data/lib/pipedawg/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56ff1d69ec188005383c30e4594b7a5aae53162fcd58164485268f0f3ea06203
|
4
|
+
data.tar.gz: 29b3b826419a85126655905d9d31c715f1ac0da4e99759163fbcdb6e97012162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc64d10e13605d0db7d8190ee9a987e48473dd7af468cba59d65b53dbb4d226676dc99be62f85b0d86e5fc7ad5cdb47d76a2fb7c00c31a9a8b334b0dee0f3e54
|
7
|
+
data.tar.gz: ae734afcea10a98114808a8656ea05f68025daf5766ea9a251eec23d06923fa70cbecf137feedee92b4b613165e83312c31e18d9dee94c0a7744e9fb94e22daa
|
@@ -50,7 +50,7 @@ module Pipedawg
|
|
50
50
|
"image_target=\"#{opts[:scan_target_prefix]}:$(echo #{opts[:scan_image]} | sed 's/^[^/]*\\///'| sed 's/[:/]/-/g')\"", # rubocop:disable Layout/LineLength
|
51
51
|
"docker --config=\"${CONFIG}\" pull \"#{opts[:scan_image]}\"",
|
52
52
|
"docker image tag \"#{opts[:scan_image]}\" \"${image_target}\"",
|
53
|
-
"image_id=$(docker inspect --format=\"{{index .Id}}\" \"#{opts[:scan_image]}\" |
|
53
|
+
"image_id=$(docker inspect --format=\"{{index .Id}}\" \"#{opts[:scan_image]}\" | sed 's/sha256://')",
|
54
54
|
'echo "Image ID: ${image_id}"'
|
55
55
|
]
|
56
56
|
end
|
@@ -69,7 +69,7 @@ module Pipedawg
|
|
69
69
|
def scan_start
|
70
70
|
[
|
71
71
|
'while true; do ' \
|
72
|
-
"result=$(curl -s -o /dev/null -w ''%{http_code}'' --location --request GET \"https://#{opts[:gateway]}/csapi/v1.
|
72
|
+
"result=$(curl -s -o /dev/null -w ''%{http_code}'' --location --request GET \"https://#{opts[:gateway]}/csapi/v1.3/images/$image_id\" --header \"Authorization: Bearer $token\"); " + # rubocop:disable Layout/LineLength, Style/FormatStringToken
|
73
73
|
'echo "Waiting for scan to start..."; ' \
|
74
74
|
'echo " Result: ${result}"; ' \
|
75
75
|
'if [ "${result}" = "200" ]; then break; fi; ' \
|
@@ -80,7 +80,7 @@ module Pipedawg
|
|
80
80
|
def scan_complete
|
81
81
|
[
|
82
82
|
'while true; do ' \
|
83
|
-
"result=$(curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.
|
83
|
+
"result=$(curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.3/images/$image_id\" --header \"Authorization: Bearer $token\" | jq -r '.scanStatus'); " + # rubocop:disable Layout/LineLength
|
84
84
|
'echo "Waiting for scan to complete..."; ' \
|
85
85
|
'echo " Result: ${result}"; ' \
|
86
86
|
'if [ "${result}" = "SUCCESS" ]; then break; fi; ' \
|
@@ -90,14 +90,14 @@ module Pipedawg
|
|
90
90
|
|
91
91
|
def artifacts
|
92
92
|
[
|
93
|
-
"curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.
|
94
|
-
"curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.
|
93
|
+
"curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.3/images/$image_id/software\" --header \"Authorization: Bearer $token\" | jq . > software.json", # rubocop:disable Layout/LineLength
|
94
|
+
"curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.3/images/$image_id/vuln\" --header \"Authorization: Bearer $token\" | jq . > vulnerabilities.json" # rubocop:disable Layout/LineLength
|
95
95
|
]
|
96
96
|
end
|
97
97
|
|
98
98
|
def severities
|
99
99
|
[
|
100
|
-
"response=$(curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.
|
100
|
+
"response=$(curl -s --location --request GET \"https://#{opts[:gateway]}/csapi/v1.3/images/$image_id/vuln/count\" --header \"Authorization: Bearer $token\")", # rubocop:disable Layout/LineLength
|
101
101
|
'severity5=$(jq -r ".severity5Count" <<< "${response}")',
|
102
102
|
'severity4=$(jq -r ".severity4Count" <<< "${response}")'
|
103
103
|
]
|
data/lib/pipedawg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipedawg-vl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- harbottle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Generate GitLab CI pipelines.
|
14
14
|
email:
|
@@ -33,8 +33,7 @@ files:
|
|
33
33
|
- lib/pipedawg/util.rb
|
34
34
|
- lib/pipedawg/version.rb
|
35
35
|
homepage: https://github.com/ValdrinLushaj/pipedawg
|
36
|
-
licenses:
|
37
|
-
- MIT
|
36
|
+
licenses: []
|
38
37
|
metadata:
|
39
38
|
homepage_uri: https://github.com/ValdrinLushaj/pipedawg
|
40
39
|
source_code_uri: https://github.com/ValdrinLushaj/pipedawg
|