mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
18 lines
426 B
C#
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
|