contrast-agent 3.10.1 → 3.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/funchook/autom4te.cache/requests +47 -47
- data/funchook/config.log +2 -2
- data/lib/contrast/agent/feature_state.rb +2 -2
- data/lib/contrast/agent/response.rb +27 -8
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/components/sampling.rb +1 -1
- data/service_executables/VERSION +1 -1
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820720cd5c39b14ced3612d327179d48901c63fc196a9f8c99716d35f53115e4
|
4
|
+
data.tar.gz: b7a25f4bb481df7bade588d2d7cf7cc70024176d48b9c76a0b65bed99bc49e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24a2efa0ed4aab95794c773220f90895a584fc60c8eac499d9789e1e0c9138d4ea12cc33a482227ceb7226e03a9b98801b37070d60f93dc92f84f54636b3ff43
|
7
|
+
data.tar.gz: 5d7ee9d12c77e0c5242b31f0b4f09efec75b969ef02b9c6ec915d9ae06dc393824b9de1f0cbb40ea7aef1aa4b9793550564e70a4d7448ba8f5485930ccd1fbeb
|
@@ -14,64 +14,64 @@
|
|
14
14
|
'configure.ac'
|
15
15
|
],
|
16
16
|
{
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
20
|
-
'
|
21
|
-
'
|
22
|
-
'
|
23
|
-
'AC_FC_PP_SRCEXT' => 1,
|
24
|
-
'm4_pattern_allow' => 1,
|
25
|
-
'AM_MAKEFILE_INCLUDE' => 1,
|
26
|
-
'_m4_warn' => 1,
|
27
|
-
'AC_CONFIG_FILES' => 1,
|
28
|
-
'AC_INIT' => 1,
|
29
|
-
'AM_XGETTEXT_OPTION' => 1,
|
17
|
+
'AM_ENABLE_MULTILIB' => 1,
|
18
|
+
'AC_SUBST' => 1,
|
19
|
+
'AC_CONFIG_HEADERS' => 1,
|
20
|
+
'AC_SUBST_TRACE' => 1,
|
21
|
+
'AM_PROG_F77_C_O' => 1,
|
22
|
+
'AC_CONFIG_AUX_DIR' => 1,
|
30
23
|
'm4_include' => 1,
|
31
|
-
'
|
32
|
-
'
|
33
|
-
'
|
24
|
+
'_AM_MAKEFILE_INCLUDE' => 1,
|
25
|
+
'AM_MAINTAINER_MODE' => 1,
|
26
|
+
'_AM_SUBST_NOTMAKE' => 1,
|
27
|
+
'AM_SILENT_RULES' => 1,
|
28
|
+
'm4_pattern_forbid' => 1,
|
34
29
|
'_AM_COND_ENDIF' => 1,
|
35
|
-
'
|
36
|
-
'AC_CANONICAL_SYSTEM' => 1,
|
37
|
-
'AC_FC_PP_DEFINE' => 1,
|
30
|
+
'AM_GNU_GETTEXT' => 1,
|
38
31
|
'AH_OUTPUT' => 1,
|
39
|
-
'_AM_SUBST_NOTMAKE' => 1,
|
40
|
-
'AM_AUTOMAKE_VERSION' => 1,
|
41
|
-
'_AM_COND_IF' => 1,
|
42
|
-
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
43
|
-
'AC_CONFIG_LINKS' => 1,
|
44
32
|
'_AM_COND_ELSE' => 1,
|
45
|
-
'
|
46
|
-
'
|
33
|
+
'AC_CONFIG_SUBDIRS' => 1,
|
34
|
+
'_m4_warn' => 1,
|
35
|
+
'AM_PROG_LIBTOOL' => 1,
|
36
|
+
'AM_PATH_GUILE' => 1,
|
37
|
+
'AC_CONFIG_LINKS' => 1,
|
38
|
+
'AC_PROG_LIBTOOL' => 1,
|
39
|
+
'AM_INIT_AUTOMAKE' => 1,
|
40
|
+
'AM_NLS' => 1,
|
41
|
+
'm4_sinclude' => 1,
|
47
42
|
'_LT_AC_TAGCONFIG' => 1,
|
48
|
-
'AM_ENABLE_MULTILIB' => 1,
|
49
|
-
'AC_FC_FREEFORM' => 1,
|
50
|
-
'AM_GNU_GETTEXT' => 1,
|
51
|
-
'AM_PROG_MOC' => 1,
|
52
43
|
'AC_LIBSOURCE' => 1,
|
53
|
-
'
|
54
|
-
'AC_CANONICAL_TARGET' => 1,
|
55
|
-
'AM_SILENT_RULES' => 1,
|
44
|
+
'AC_CANONICAL_SYSTEM' => 1,
|
56
45
|
'LT_INIT' => 1,
|
46
|
+
'AC_CANONICAL_BUILD' => 1,
|
47
|
+
'AM_PROG_AR' => 1,
|
48
|
+
'_AM_COND_IF' => 1,
|
49
|
+
'AM_PROG_FC_C_O' => 1,
|
50
|
+
'AC_CONFIG_FILES' => 1,
|
57
51
|
'AC_CANONICAL_HOST' => 1,
|
58
|
-
'
|
59
|
-
'
|
52
|
+
'LT_SUPPORTED_TAG' => 1,
|
53
|
+
'AC_FC_SRCEXT' => 1,
|
54
|
+
'AM_PROG_CXX_C_O' => 1,
|
55
|
+
'LT_CONFIG_LTDL_DIR' => 1,
|
56
|
+
'AM_XGETTEXT_OPTION' => 1,
|
57
|
+
'AM_PROG_MOC' => 1,
|
58
|
+
'AC_CANONICAL_TARGET' => 1,
|
59
|
+
'AC_FC_FREEFORM' => 1,
|
60
|
+
'AM_POT_TOOLS' => 1,
|
61
|
+
'AC_REQUIRE_AUX_FILE' => 1,
|
62
|
+
'm4_pattern_allow' => 1,
|
63
|
+
'AM_MAKEFILE_INCLUDE' => 1,
|
64
|
+
'sinclude' => 1,
|
60
65
|
'AM_PROG_CC_C_O' => 1,
|
66
|
+
'AC_INIT' => 1,
|
61
67
|
'AC_DEFINE_TRACE_LITERAL' => 1,
|
62
|
-
'
|
63
|
-
'AC_CONFIG_HEADERS' => 1,
|
64
|
-
'AM_MAINTAINER_MODE' => 1,
|
65
|
-
'include' => 1,
|
66
|
-
'sinclude' => 1,
|
67
|
-
'AM_POT_TOOLS' => 1,
|
68
|
-
'AC_PROG_LIBTOOL' => 1,
|
68
|
+
'AM_CONDITIONAL' => 1,
|
69
69
|
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
70
|
-
'
|
71
|
-
'
|
72
|
-
'
|
73
|
-
'
|
74
|
-
'
|
70
|
+
'AC_FC_PP_DEFINE' => 1,
|
71
|
+
'AC_FC_PP_SRCEXT' => 1,
|
72
|
+
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
73
|
+
'include' => 1,
|
74
|
+
'AM_AUTOMAKE_VERSION' => 1
|
75
75
|
}
|
76
76
|
], 'Autom4te::Request' )
|
77
77
|
);
|
data/funchook/config.log
CHANGED
@@ -10,7 +10,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
|
10
10
|
## Platform. ##
|
11
11
|
## --------- ##
|
12
12
|
|
13
|
-
hostname =
|
13
|
+
hostname = 4130b02c-90d4-4e19-922d-61e69e36360b-fj5m5
|
14
14
|
uname -m = x86_64
|
15
15
|
uname -r = 4.19.95-flatcar
|
16
16
|
uname -s = Linux
|
@@ -326,7 +326,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
|
326
326
|
CONFIG_COMMANDS =
|
327
327
|
$ ./config.status
|
328
328
|
|
329
|
-
on
|
329
|
+
on 4130b02c-90d4-4e19-922d-61e69e36360b-fj5m5
|
330
330
|
|
331
331
|
config.status:822: creating Makefile
|
332
332
|
config.status:822: creating src/Makefile
|
@@ -59,7 +59,7 @@ module Contrast
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def scan_response?
|
62
|
-
|
62
|
+
!false?(CONFIG.root.assess.enable_scan_response)
|
63
63
|
end
|
64
64
|
|
65
65
|
def omit_body?
|
@@ -254,7 +254,7 @@ module Contrast
|
|
254
254
|
cas = CONFIG.root.assess&.sampling
|
255
255
|
|
256
256
|
{
|
257
|
-
enabled: [cas&.enable, settings&.enabled, DEFAULT_SAMPLING_ENABLED] .reject(&:nil?).first,
|
257
|
+
enabled: true?([cas&.enable, settings&.enabled, DEFAULT_SAMPLING_ENABLED] .reject(&:nil?).first),
|
258
258
|
baseline: [cas&.baseline, settings&.baseline, DEFAULT_SAMPLING_BASELINE] .map(&:to_i).find(&:positive?),
|
259
259
|
request_frequency: [cas&.request_frequency, settings&.request_frequency, DEFAULT_SAMPLING_REQUEST_FREQUENCY] .map(&:to_i).find(&:positive?),
|
260
260
|
response_frequency: [cas&.response_frequency, settings&.response_frequency, DEFAULT_SAMPLING_RESPONSE_FREQUENCY].map(&:to_i).find(&:positive?),
|
@@ -51,8 +51,8 @@ module Contrast
|
|
51
51
|
end
|
52
52
|
context_response.parsed_response_headers = true
|
53
53
|
|
54
|
-
context_response.
|
55
|
-
context_response.parsed_response_body =
|
54
|
+
context_response.response_body_binary = Contrast::Utils::StringUtils.force_utf8(body)
|
55
|
+
context_response.parsed_response_body = false
|
56
56
|
|
57
57
|
doc_type = document_type
|
58
58
|
context_response.document_type = doc_type if doc_type
|
@@ -120,15 +120,12 @@ module Contrast
|
|
120
120
|
|
121
121
|
# The response body can change during the request lifecycle
|
122
122
|
# We should not extract it out as a variable here, or we'll miss those
|
123
|
-
# changes.
|
123
|
+
# changes.
|
124
124
|
def body
|
125
125
|
return unless @rack_response
|
126
126
|
|
127
|
-
|
128
|
-
|
129
|
-
elsif Contrast::Utils::DuckUtils.quacks_to?(@rack_response, :body)
|
130
|
-
extract_body(@rack_response.body)
|
131
|
-
end
|
127
|
+
body_content = @is_array ? @rack_response[2] : @rack_response.body
|
128
|
+
extract_body(body_content)
|
132
129
|
end
|
133
130
|
|
134
131
|
def update_body body_string
|
@@ -184,16 +181,38 @@ module Contrast
|
|
184
181
|
true
|
185
182
|
end
|
186
183
|
|
184
|
+
# Given some holder of the content of the response's body, extract that
|
185
|
+
# content and return it as a String
|
186
|
+
#
|
187
|
+
# @param body [String, Rack::File, Rack::BodyProxy,
|
188
|
+
# ActionDispatch::Response::RackBody, Rack::Response] Something that
|
189
|
+
# holds, wraps, or is the body of the Response
|
190
|
+
# @return [nil, String] the content of the body
|
187
191
|
def extract_body body
|
188
192
|
return nil unless body
|
189
193
|
|
190
194
|
if defined?(Rack::File) && body.is_a?(Rack::File)
|
191
195
|
# not sure what to do in this situation, so don't do anything.
|
192
196
|
nil
|
197
|
+
elsif body.is_a?(Rack::BodyProxy)
|
198
|
+
next_body = body.instance_variable_get(:@body)
|
199
|
+
case next_body
|
200
|
+
when Array
|
201
|
+
extract_body(next_body[0])
|
202
|
+
else
|
203
|
+
extract_body(next_body)
|
204
|
+
end
|
205
|
+
elsif defined?(ActionDispatch::Response::RackBody) && body.is_a?(ActionDispatch::Response::RackBody)
|
206
|
+
extract_body(body.body)
|
207
|
+
elsif body.is_a?(Rack::Response)
|
208
|
+
extract_body(body.body)
|
193
209
|
elsif Contrast::Utils::DuckUtils.quacks_to?(body, :each)
|
194
210
|
acc = []
|
195
211
|
body.each { |tmp| acc << read_or_string(tmp) }
|
196
212
|
acc.compact.join(Contrast::Utils::ObjectShare::NEW_LINE)
|
213
|
+
elsif ActionView::OutputBuffer
|
214
|
+
# https://stackoverflow.com/questions/15654676/how-to-convert-activesupportsafebuffer-to-string
|
215
|
+
body.to_str
|
197
216
|
else
|
198
217
|
read_or_string(body)
|
199
218
|
end
|
@@ -23,7 +23,7 @@ module Contrast
|
|
23
23
|
cas = CONFIG.root.assess&.sampling
|
24
24
|
|
25
25
|
{
|
26
|
-
enabled: [cas&.enable, settings&.enabled, DEFAULT_SAMPLING_ENABLED] .reject(&:nil?).first,
|
26
|
+
enabled: true?([cas&.enable, settings&.enabled, DEFAULT_SAMPLING_ENABLED] .reject(&:nil?).first),
|
27
27
|
baseline: [cas&.baseline, settings&.baseline, DEFAULT_SAMPLING_BASELINE] .map(&:to_i).find(&:positive?),
|
28
28
|
request_frequency: [cas&.request_frequency, settings&.request_frequency, DEFAULT_SAMPLING_REQUEST_FREQUENCY] .map(&:to_i).find(&:positive?),
|
29
29
|
response_frequency: [cas&.response_frequency, settings&.response_frequency, DEFAULT_SAMPLING_RESPONSE_FREQUENCY].map(&:to_i).find(&:positive?),
|
data/service_executables/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.4
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contrast-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- galen.palmer@contrastsecurity.com
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|
@@ -420,21 +420,21 @@ executables:
|
|
420
420
|
- contrast_service
|
421
421
|
extensions:
|
422
422
|
- ext/cs__common/extconf.rb
|
423
|
-
- ext/cs__assess_yield_track/extconf.rb
|
424
|
-
- ext/cs__assess_string_interpolation26/extconf.rb
|
425
|
-
- ext/cs__contrast_patch/extconf.rb
|
426
|
-
- ext/cs__assess_hash/extconf.rb
|
427
|
-
- ext/cs__assess_basic_object/extconf.rb
|
428
|
-
- ext/cs__assess_regexp/extconf.rb
|
429
|
-
- ext/cs__assess_array/extconf.rb
|
430
423
|
- ext/cs__assess_fiber_track/extconf.rb
|
424
|
+
- ext/cs__assess_active_record_named/extconf.rb
|
431
425
|
- ext/cs__protect_kernel/extconf.rb
|
426
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
427
|
+
- ext/cs__contrast_patch/extconf.rb
|
432
428
|
- ext/cs__assess_kernel/extconf.rb
|
433
|
-
- ext/
|
434
|
-
- ext/cs__assess_active_record_named/extconf.rb
|
429
|
+
- ext/cs__assess_regexp/extconf.rb
|
435
430
|
- ext/cs__assess_module/extconf.rb
|
431
|
+
- ext/cs__assess_array/extconf.rb
|
436
432
|
- ext/cs__assess_string/extconf.rb
|
433
|
+
- ext/cs__assess_basic_object/extconf.rb
|
437
434
|
- ext/cs__assess_marshal_module/extconf.rb
|
435
|
+
- ext/cs__assess_yield_track/extconf.rb
|
436
|
+
- ext/cs__assess_regexp_track/extconf.rb
|
437
|
+
- ext/cs__assess_hash/extconf.rb
|
438
438
|
extra_rdoc_files: []
|
439
439
|
files:
|
440
440
|
- ".clang-format"
|