From d02419173e9bdeb1adb26ce7bee37254c0f48285 Mon Sep 17 00:00:00 2001 From: NachoEchevarria Date: Wed, 30 Oct 2024 15:38:51 +0100 Subject: [PATCH 1/3] Restrict RASP lfI operations to read --- .../Iast/Aspects/System.IO/DirectoryAspect.cs | 2 +- .../Aspects/System.IO/DirectoryInfoAspect.cs | 2 +- .../Iast/Aspects/System.IO/FileAspect.cs | 83 ++++++++++++------- .../Iast/Aspects/System.IO/FileInfoAspect.cs | 2 +- .../Aspects/System.IO/StreamWriterAspect.cs | 2 +- 5 files changed, 55 insertions(+), 36 deletions(-) diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryAspect.cs index 4a745f6a9824..d045032674cf 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryAspect.cs @@ -77,7 +77,7 @@ public static string ReviewPath(string path) { try { - VulnerabilitiesModule.OnPathTraversal(path); + IastModule.OnPathTraversal(path); return path; } catch (Exception ex) when (ex is not BlockException) diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryInfoAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryInfoAspect.cs index dd8c5f38eff2..c3b45f07e755 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryInfoAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/DirectoryInfoAspect.cs @@ -62,7 +62,7 @@ public static string ReviewPath(string path) { try { - VulnerabilitiesModule.OnPathTraversal(path); + IastModule.OnPathTraversal(path); return path; } catch (Exception ex) when (ex is not BlockException) diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs index feec1776e720..a64b0d46ea06 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs @@ -25,29 +25,7 @@ public class FileAspect [AspectMethodInsertBefore("System.IO.File::Create(System.String)")] [AspectMethodInsertBefore("System.IO.File::CreateText(System.String)")] [AspectMethodInsertBefore("System.IO.File::Delete(System.String)")] - [AspectMethodInsertBefore("System.IO.File::OpenRead(System.String)")] - [AspectMethodInsertBefore("System.IO.File::OpenText(System.String)")] [AspectMethodInsertBefore("System.IO.File::OpenWrite(System.String)")] - [AspectMethodInsertBefore("System.IO.File::ReadAllBytes(System.String)")] -#if !NETFRAMEWORK - [AspectMethodInsertBefore("System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)", 1)] -#endif - [AspectMethodInsertBefore("System.IO.File::ReadAllLines(System.String)")] - [AspectMethodInsertBefore("System.IO.File::ReadAllLines(System.String,System.Text.Encoding)", 1)] -#if !NETFRAMEWORK - [AspectMethodInsertBefore("System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)", 1)] - [AspectMethodInsertBefore("System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] -#endif - [AspectMethodInsertBefore("System.IO.File::ReadAllText(System.String)")] -#if !NETFRAMEWORK - [AspectMethodInsertBefore("System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] - [AspectMethodInsertBefore("System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)", 1)] -#endif - [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String)")] -#if NET6_0_OR_GREATER - [AspectMethodInsertBefore("System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)", 1)] - [AspectMethodInsertBefore("System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] -#endif [AspectMethodInsertBefore("System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)", 1)] [AspectMethodInsertBefore("System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)", 2)] [AspectMethodInsertBefore("System.IO.File::AppendAllText(System.String,System.String)", 1)] @@ -59,20 +37,10 @@ public class FileAspect [AspectMethodInsertBefore("System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)", 3)] #endif [AspectMethodInsertBefore("System.IO.File::AppendText(System.String)")] - [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String,System.Text.Encoding)", 1)] - [AspectMethodInsertBefore("System.IO.File::ReadAllText(System.String,System.Text.Encoding)", 1)] - [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String,System.Text.Encoding)", 1)] [AspectMethodInsertBefore("System.IO.File::Create(System.String,System.Int32)", 1)] [AspectMethodInsertBefore("System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)", 2)] #if NETFRAMEWORK [AspectMethodInsertBefore("System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions,System.Security.AccessControl.FileSecurity)", 3)] -#endif - [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode)", 1)] - [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)", 2)] - [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)", 3)] -#if NET6_0_OR_GREATER - [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileStreamOptions)", 1)] - [AspectMethodInsertBefore("System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)", 5)] #endif [AspectMethodInsertBefore("System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)", 1)] [AspectMethodInsertBefore("System.IO.File::WriteAllBytes(System.String,System.Byte[])", 1)] @@ -102,6 +70,57 @@ public class FileAspect [AspectMethodInsertBefore("System.IO.File::Replace(System.String,System.String,System.String)", new int[] { 0, 1, 2 })] [AspectMethodInsertBefore("System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)", new int[] { 1, 2, 3 })] public static string ReviewPath(string path) + { + try + { + IastModule.OnPathTraversal(path); + return path; + } + catch (Exception ex) when (ex is not BlockException) + { + IastModule.Log.Error(ex, $"Error invoking {nameof(FileAspect)}.{nameof(ReviewPath)}"); + return path; + } + } + + /// + /// Launches a path traversal vulnerability if the file is tainted + /// + /// the path or file + /// the path parameter + [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String,System.Text.Encoding)", 1)] + [AspectMethodInsertBefore("System.IO.File::ReadAllText(System.String,System.Text.Encoding)", 1)] + [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String,System.Text.Encoding)", 1)] + [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode)", 1)] + [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)", 2)] + [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)", 3)] + [AspectMethodInsertBefore("System.IO.File::OpenText(System.String)")] +#if NET6_0_OR_GREATER + [AspectMethodInsertBefore("System.IO.File::Open(System.String,System.IO.FileStreamOptions)", 1)] + [AspectMethodInsertBefore("System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)", 5)] +#endif + [AspectMethodInsertBefore("System.IO.File::ReadAllBytes(System.String)")] +#if !NETFRAMEWORK + [AspectMethodInsertBefore("System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)", 1)] +#endif + [AspectMethodInsertBefore("System.IO.File::ReadAllLines(System.String)")] + [AspectMethodInsertBefore("System.IO.File::ReadAllLines(System.String,System.Text.Encoding)", 1)] +#if !NETFRAMEWORK + [AspectMethodInsertBefore("System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)", 1)] + [AspectMethodInsertBefore("System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] +#endif + [AspectMethodInsertBefore("System.IO.File::ReadAllText(System.String)")] +#if !NETFRAMEWORK + [AspectMethodInsertBefore("System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] + [AspectMethodInsertBefore("System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)", 1)] +#endif + [AspectMethodInsertBefore("System.IO.File::ReadLines(System.String)")] +#if NET6_0_OR_GREATER + [AspectMethodInsertBefore("System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)", 1)] + [AspectMethodInsertBefore("System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)", 2)] +#endif + [AspectMethodInsertBefore("System.IO.File::OpenRead(System.String)")] + public static string ReviewPathRead(string path) { try { diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileInfoAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileInfoAspect.cs index 8aa3d7ea5edc..cac9fd79a8db 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileInfoAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileInfoAspect.cs @@ -35,7 +35,7 @@ public static string ReviewPath(string path) { try { - VulnerabilitiesModule.OnPathTraversal(path); + IastModule.OnPathTraversal(path); return path; } catch (Exception ex) when (ex is not BlockException) diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/StreamWriterAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/StreamWriterAspect.cs index 708fb758dec9..fb2e20461cfb 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/StreamWriterAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/StreamWriterAspect.cs @@ -34,7 +34,7 @@ public static string ReviewPath(string path) { try { - VulnerabilitiesModule.OnPathTraversal(path); + IastModule.OnPathTraversal(path); return path; } catch (global::System.Exception ex) From 362971dc7b074f1e2858efa3545c5ad636440e4d Mon Sep 17 00:00:00 2001 From: NachoEchevarria Date: Wed, 30 Oct 2024 18:02:47 +0100 Subject: [PATCH 2/3] Update autegenerated files --- .../AspectsDefinitions.g.cs | 52 +++++------ .../AspectsDefinitions.g.cs | 88 +++++++++---------- .../AspectsDefinitions.g.cs | 72 +++++++-------- .../AspectsDefinitions.g.cs | 72 +++++++-------- 4 files changed, 142 insertions(+), 142 deletions(-) diff --git a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs index 5595d308cdc8..1e06f8ac955d 100644 --- a/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs @@ -349,28 +349,15 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions,System.Security.AccessControl.FileSecurity)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllLines(System.String,System.String[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -384,6 +371,19 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String)\",\"\",[0,1],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", @@ -742,28 +742,15 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions,System.Security.AccessControl.FileSecurity)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllLines(System.String,System.String[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -777,6 +764,19 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String)\",\"\",[0,1],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", diff --git a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs index c64b5782b1da..38e1e26bccb1 100644 --- a/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs @@ -362,21 +362,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -386,16 +372,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileStreamOptions)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)\",\"\",[5],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -415,6 +393,28 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileStreamOptions)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)\",\"\",[5],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", @@ -832,21 +832,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -856,16 +842,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileStreamOptions)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)\",\"\",[5],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -885,6 +863,28 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileStreamOptions)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenHandle(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.IO.FileOptions,System.Int64)\",\"\",[5],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", diff --git a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs index 4e89def8f0c3..3573d02e9786 100644 --- a/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs @@ -358,19 +358,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -380,14 +368,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -407,6 +389,24 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", @@ -817,19 +817,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -839,14 +827,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -866,6 +848,24 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", diff --git a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs index ae9b51314c2f..8b341d2618a9 100644 --- a/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs +++ b/tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/AspectsDefinitionsGenerator/AspectsDefinitions.g.cs @@ -343,19 +343,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -365,14 +353,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -392,6 +374,24 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", @@ -775,19 +775,7 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::CreateText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Delete(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::OpenWrite(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLines(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllText(System.String,System.String)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", @@ -797,14 +785,8 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendAllLinesAsync(System.String,System.Collections.Generic.IEnumerable`1,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::AppendText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Create(System.String,System.Int32,System.IO.FileOptions)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", -" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::SetAttributes(System.String,System.IO.FileAttributes)\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytes(System.String,System.Byte[])\",\"\",[1],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::WriteAllBytesAsync(System.String,System.Byte[],System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPath(System.String)", @@ -824,6 +806,24 @@ internal static partial class AspectDefinitions " [AspectMethodInsertBefore(\"System.IO.File::Move(System.String,System.String,System.Boolean)\",\"\",[1,2],[False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String)\",\"\",[0,1,2],[False,False,False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.File::Replace(System.String,System.String,System.String,System.Boolean)\",\"\",[1,2,3],[False,False,False],[None],Default,[])] ReviewPath(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)\",\"\",[3],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytes(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllBytesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLines(System.String,System.Text.Encoding)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllLinesAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllText(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Text.Encoding,System.Threading.CancellationToken)\",\"\",[2],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadAllTextAsync(System.String,System.Threading.CancellationToken)\",\"\",[1],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::ReadLines(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", +" [AspectMethodInsertBefore(\"System.IO.File::OpenRead(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPathRead(System.String)", "[AspectClass(\"mscorlib,System.IO.FileSystem,System.Runtime\",[None],Sink,[PathTraversal])] Datadog.Trace.Iast.Aspects.FileInfoAspect", " [AspectMethodInsertBefore(\"System.IO.FileInfo::.ctor(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", " [AspectMethodInsertBefore(\"System.IO.FileInfo::CopyTo(System.String)\",\"\",[0],[False],[None],Default,[])] ReviewPath(System.String)", From e15c0c700f2bae5bd00722a54a05b5aa4e646376 Mon Sep 17 00:00:00 2001 From: NachoEchevarria <53266532+NachoEchevarria@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:49:24 +0100 Subject: [PATCH 3/3] Update FileAspect.cs --- tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs index a64b0d46ea06..2e3d1aaac907 100644 --- a/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs +++ b/tracer/src/Datadog.Trace/Iast/Aspects/System.IO/FileAspect.cs @@ -129,7 +129,7 @@ public static string ReviewPathRead(string path) } catch (Exception ex) when (ex is not BlockException) { - IastModule.Log.Error(ex, $"Error invoking {nameof(FileAspect)}.{nameof(ReviewPath)}"); + IastModule.Log.Error(ex, $"Error invoking {nameof(FileAspect)}.{nameof(ReviewPathRead)}"); return path; } }