lib/contrast/agent/assess/policy/propagator/trim.rb in contrast-agent-4.14.1 vs lib/contrast/agent/assess/policy/propagator/trim.rb in contrast-agent-5.0.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
+# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true
module Contrast
module Agent
module Assess
@@ -22,22 +22,27 @@
return ret unless ret && !ret.empty?
return ret unless (properties = Contrast::Agent::Assess::Tracker.properties!(ret))
properties.copy_from(preshift.object, ret)
handle_tr(policy_node, preshift, ret, properties)
-
- properties.build_event(policy_node, ret, preshift.object, ret, preshift.args, 1)
+ event_data = Contrast::Agent::Assess::Events::EventData.new(policy_node,
+ ret,
+ preshift.object,
+ ret,
+ preshift.args)
+ properties.build_event(event_data, 1)
ret
end
def tr_s_tagger patcher, preshift, ret, _block
return unless ret && !ret.empty?
return unless (properties = Contrast::Agent::Assess::Tracker.properties!(ret))
source = preshift.object
args = preshift.args
properties.splat_from(source, ret)
- properties.build_event(patcher, ret, source, ret, args)
+ event_data = Contrast::Agent::Assess::Events::EventData.new patcher, ret, source, ret, args
+ properties.build_event(event_data)
ret
end
private