pipedawg-vl 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd2aba4cbdd48b205d57a29ce3e77348edd02e801c3cb31a9f283eec70af6cbb
4
- data.tar.gz: 16354766dfc2315272f819d9a659ec007705f6150dfbee2b16a754d3b74f4668
3
+ metadata.gz: 56ff1d69ec188005383c30e4594b7a5aae53162fcd58164485268f0f3ea06203
4
+ data.tar.gz: 29b3b826419a85126655905d9d31c715f1ac0da4e99759163fbcdb6e97012162
5
5
  SHA512:
6
- metadata.gz: 643a168abba7e45160a6d90429c9eea5d735a2a77fb545fcbf686547373216701f797e3ddee14f665cbec6ee8c2aa82232f15bf2f8e7d00c9729f6c110377682
7
- data.tar.gz: 319bf7a55c5f8ac0067cb7ece3df5695b4ba867430d522f1b1f7dc0cae5778fbd9dc8cdcc7d6c6a33839fbe0c776e0e9eec245cc3e756dd84f3d29d04bfa5fb4
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]}\" | cut -c8-19)",
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.2/images/$image_id\" --header \"Authorization: Bearer $token\"); " + # rubocop:disable Layout/LineLength, Style/FormatStringToken
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.2/images/$image_id\" --header \"Authorization: Bearer $token\" | jq -r '.scanStatus'); " + # rubocop:disable Layout/LineLength
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.2/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.2/images/$image_id/vuln\" --header \"Authorization: Bearer $token\" | jq . > vulnerabilities.json" # rubocop:disable Layout/LineLength
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.2/images/$image_id/vuln/count\" --header \"Authorization: Bearer $token\")", # rubocop:disable Layout/LineLength
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
  ]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pipedawg
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.6'
5
5
  end
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.5
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-06-15 00:00:00.000000000 Z
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