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; diff --git a/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs b/dotnet/tests/Microsoft.Agents.AI.FeatureRegistry.UnitTests/FeatureRegistryTests.cs index 1b671a0508b..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; @@ -431,5 +433,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); }