gitlab_quality-test_tooling 1.10.0 → 1.10.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 021ba0cb90bad4c0b19863f72833bd2c4afc9e67c8ffccc82ed8faafd99cb651
|
|
4
|
+
data.tar.gz: 965d8b9a2afd8c3679fa0fbd58c0aac7865134430cca0af96eaf20c29c4cce45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6b98c6fee95ea011fafda00a24a3bf57ecd110832e7dd4eaa68a8104cf963fe4a70dc62e5b17376436df041a6fbc2a1f322aecf53356284d4b2c85b43d07c2e
|
|
7
|
+
data.tar.gz: e317015e67335421cec8593bf4713cf1cd07996eba501a9fe77315120ba057893a03678d851673ad39d3959db23ad94378dfb24b1bbb2e3bc7958d187c351c5d
|
data/Gemfile.lock
CHANGED
|
@@ -29,7 +29,9 @@ module GitlabQuality
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
exception['message'].gsub!(/(private_token=)[\w-]+/, '********')
|
|
32
|
+
exception['message'].gsub!(/("Authorization": \[\n\s*"token )([\w-]+)/, '\1********')
|
|
32
33
|
exception.content = exception.content.gsub(/(private_token=)[\w-]+/, '********')
|
|
34
|
+
exception.content = exception.content.gsub(/("Authorization": \[\n\s*"token )([\w-]+)/, '\1********')
|
|
33
35
|
{
|
|
34
36
|
'message' => "#{exception['type']}: #{exception['message']}",
|
|
35
37
|
'stacktrace' => trace.slice(0..spec_file_first_index).join("\n"),
|
|
@@ -5,6 +5,7 @@ module GitlabQuality
|
|
|
5
5
|
module TestResult
|
|
6
6
|
class JsonTestResult < BaseTestResult
|
|
7
7
|
PRIVATE_TOKEN_REGEX = /(private_token=)[\w-]+/
|
|
8
|
+
AUTHENTICATION_TOKEN_REGEX = /("Authorization": \[\n\s*"token )([\w-]+)/
|
|
8
9
|
|
|
9
10
|
OTHER_TESTS_MAX_DURATION = 45.40 # seconds
|
|
10
11
|
|
|
@@ -144,8 +145,8 @@ module GitlabQuality
|
|
|
144
145
|
line.include?(File.basename(report['file_path']))
|
|
145
146
|
end
|
|
146
147
|
|
|
147
|
-
message =
|
|
148
|
-
message_lines = Array(exception['message_lines']).map { |line|
|
|
148
|
+
message = redact_private_and_auth_tokens(exception['message'])
|
|
149
|
+
message_lines = Array(exception['message_lines']).map { |line| redact_private_and_auth_tokens(line) }
|
|
149
150
|
|
|
150
151
|
{
|
|
151
152
|
'message' => "#{exception['class']}: #{message}",
|
|
@@ -193,8 +194,9 @@ module GitlabQuality
|
|
|
193
194
|
message_lines.is_a?(Array) ? message_lines.join("\n") : message_lines
|
|
194
195
|
end
|
|
195
196
|
|
|
196
|
-
def
|
|
197
|
-
text.gsub(PRIVATE_TOKEN_REGEX, '********')
|
|
197
|
+
def redact_private_and_auth_tokens(text)
|
|
198
|
+
private_redacted = text.gsub(PRIVATE_TOKEN_REGEX, '********')
|
|
199
|
+
private_redacted.gsub(AUTHENTICATION_TOKEN_REGEX, '\1********')
|
|
198
200
|
end
|
|
199
201
|
end
|
|
200
202
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab_quality-test_tooling
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.10.
|
|
4
|
+
version: 1.10.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab Quality
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-01-
|
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|