lib/contrast/extension/assess/kernel.rb in contrast-agent-4.14.1 vs lib/contrast/extension/assess/kernel.rb in contrast-agent-5.0.0

- old
+ new

@@ -1,10 +1,11 @@ -# 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 require 'contrast/extension/assess/exec_trigger' require 'contrast/components/logger' +require 'contrast/agent/assess/events/event_data' module Contrast module Extension module Assess # This module provides us with a way to invoke Kernel propagation for those @@ -43,11 +44,15 @@ format_string = preshift.args[0] args = preshift.args[1] parent_events = [] track_sprintf(ret, format_string, args, parent_events) - - properties.build_event(patcher, ret, preshift.object, ret, preshift.args, 1) + event_data = Contrast::Agent::Assess::Events::EventData.new(patcher, + ret, + preshift.object, + ret, + preshift.args) + properties.build_event(event_data, 1) properties.event.instance_variable_set(:@_parent_events, parent_events) ret end