Files
codeql/csharp/ql/test/query-tests/Security Features/CWE-338/TestInsecureRandomness.cs
2018-10-19 14:05:30 +02:00

18 lines
426 B
C#

using System;
using System.Security.Cryptography;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class InsecureRandomnessTest
{
[TestMethod]
public void TestUnsafe()
{
// ACCEPTABLE: Using insecure random, but this is a test
Random r = new Random();
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs