diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/IQueryAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/ISessionAspect.cs similarity index 69% rename from tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/IQueryAspect.cs rename to tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/ISessionAspect.cs index d1a23a3b1281..2616036efcb2 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/IQueryAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/NHibernate/ISessionAspect.cs @@ -1,4 +1,4 @@ -// +// // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // @@ -7,7 +7,6 @@ using Datadog.Trace.Configuration; using Datadog.Trace.Iast.Dataflow; -using Datadog.Trace.Logging; namespace Datadog.Trace.Iast.Aspects.NHibernate; @@ -15,20 +14,18 @@ namespace Datadog.Trace.Iast.Aspects.NHibernate; [AspectClass("NHibernate", AspectType.Sink, VulnerabilityType.SqlInjection)] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] -public class IQueryAspect +public class ISessionAspect { - private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(IQueryAspect)); - /// /// NHibernate aspect /// - /// the mongodb command + /// the mongodb command /// the original command [AspectMethodInsertBefore("NHibernate.ISession::CreateQuery(System.String)", 0)] [AspectMethodInsertBefore("NHibernate.ISession::CreateSQLQuery(System.String)", 0)] - public static object AnalyzeQuery(string command) + public static object AnalyzeQuery(string query) { - IastModule.OnSqlQuery(command, IntegrationId.NHibernate); - return command; + IastModule.OnSqlQuery(query, IntegrationId.NHibernate); + return query; } }