Skip to content

Commit

Permalink
Add placeholder security tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Oct 28, 2024
1 parent 5cc709c commit 803ffbb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
7 changes: 0 additions & 7 deletions test/Nerdbank.MessagePack.Tests/MessagePackSerializerTests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// Copyright (c) Andrew Arnott. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Immutable;
using Nerdbank.MessagePack;
using Nerdbank.Streams;
using TypeShape;
using Xunit;
using Xunit.Abstractions;

public partial class MessagePackSerializerTests(ITestOutputHelper logger)
{
private MessagePackSerializer serializer = new();
Expand Down
19 changes: 19 additions & 0 deletions test/Nerdbank.MessagePack.Tests/SecurityTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
public class SecurityTests
{
/// <summary>
/// Verifies that the deserializer will guard against stack overflow attacks.
/// </summary>
[Fact(Skip = "Not yet implemented.")]
public void StackGuard()
{
// The max depth should be configurable on the MessagePackSerializer object.
}

/// <summary>
/// Verifies that the
/// </summary>
[Fact(Skip = "Not yet implemented.")]
public void CollisionResistantHashMaps()
{
}
}
9 changes: 9 additions & 0 deletions test/Nerdbank.MessagePack.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) Andrew Arnott. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

global using System.Collections.Immutable;
global using Nerdbank.MessagePack;
global using Nerdbank.Streams;
global using TypeShape;
global using Xunit;
global using Xunit.Abstractions;

0 comments on commit 803ffbb

Please sign in to comment.