From ebb03924eda751a753f020c12b9b78c988b24f07 Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Tue, 25 Aug 2026 11:39:51 +0100 Subject: [PATCH 1/5] Suppress false positive Zip Slip alert Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8c7b4b0-21bf-4b63-ba64-75e5c4b7ab34 --- .../Skills/Loaders/AgentMcpSkillArchiveExtractor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/AgentMcpSkillArchiveExtractor.cs b/dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/AgentMcpSkillArchiveExtractor.cs index 15e37926a77..3957aaf0c8b 100644 --- a/dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/AgentMcpSkillArchiveExtractor.cs +++ b/dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/AgentMcpSkillArchiveExtractor.cs @@ -159,7 +159,7 @@ private static void ExtractZip(Stream source, string fullTarget, int maxFileCoun throw new InvalidDataException($"Skill archive exceeds the maximum allowed file count ({maxFileCount})."); } - string? destination = ResolveDestination(fullTarget, entry.FullName); + string? destination = ResolveDestination(fullTarget, entry.FullName); // CodeQL [SM02729] ResolveDestination rejects paths outside fullTarget. if (destination is null) { continue; From f84445dcfd895a7636b1f3210b072c75a2c627bd Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Tue, 25 Aug 2026 11:56:46 +0100 Subject: [PATCH 2/5] Fix FeatureDeclaration analyzer warning Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8c7b4b0-21bf-4b63-ba64-75e5c4b7ab34 --- .../FeatureRegistryTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs index 1b671a0508b..60f07f3fc2f 100644 --- a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs @@ -431,5 +431,5 @@ private static void AssertNoErrors(IReadOnlyCollection errors) private sealed record RegistryEntry(int Index, string Id); - private sealed record FeatureDeclaration(string Owner, string MemberName, int Index, string FilePath); + private readonly record struct FeatureDeclaration(string Owner, string MemberName, int Index, string FilePath); } From 5603ab3dbde5f3649827496ab204902a9b91b3ea Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Tue, 25 Aug 2026 12:27:02 +0100 Subject: [PATCH 3/5] Remove unnecessary CodeAnalysis import Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8c7b4b0-21bf-4b63-ba64-75e5c4b7ab34 --- .../FeatureRegistryTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs index 60f07f3fc2f..0641bd66e73 100644 --- a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs @@ -5,7 +5,6 @@ using System.Globalization; using System.IO; using System.Linq; -using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -335,7 +334,7 @@ private static List ReadFeatureDeclarations( foreach (EnumDeclarationSyntax featureIndex in enums) { - if (!featureIndex.Modifiers.Any(SyntaxKind.InternalKeyword)) + if (!featureIndex.Modifiers.Any(static modifier => modifier.RawKind == (int)SyntaxKind.InternalKeyword)) { errors.Add($"{filePath}: FeatureIndex must be internal."); } From a45de3f1956ca7b317bf044e1c85c7665f8994df Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Tue, 25 Aug 2026 12:58:46 +0100 Subject: [PATCH 4/5] Restore FeatureRegistry test imports Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8c7b4b0-21bf-4b63-ba64-75e5c4b7ab34 --- .../FeatureRegistryTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs index 0641bd66e73..60f07f3fc2f 100644 --- a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs @@ -5,6 +5,7 @@ using System.Globalization; using System.IO; using System.Linq; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -334,7 +335,7 @@ private static List ReadFeatureDeclarations( foreach (EnumDeclarationSyntax featureIndex in enums) { - if (!featureIndex.Modifiers.Any(static modifier => modifier.RawKind == (int)SyntaxKind.InternalKeyword)) + if (!featureIndex.Modifiers.Any(SyntaxKind.InternalKeyword)) { errors.Add($"{filePath}: FeatureIndex must be internal."); } From d460522be5f50b799422794f28477fbf3ca148ce Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Tue, 25 Aug 2026 13:11:54 +0100 Subject: [PATCH 5/5] Suppress platform-specific unused import warning Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8c7b4b0-21bf-4b63-ba64-75e5c4b7ab34 --- .../FeatureRegistryTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs index 60f07f3fc2f..386b6b833f6 100644 --- a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs @@ -5,9 +5,11 @@ using System.Globalization; using System.IO; using System.Linq; +#pragma warning disable IDE0005 // Required by Windows builds for Roslyn APIs. using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +#pragma warning restore IDE0005 namespace Microsoft.Agents.AI.FeatureRegistry.UnitTests;