Skip to content

Commit

Permalink
Merge pull request #3501 from carlossanlop/SystemIOFile
Browse files Browse the repository at this point in the history
Fix name of WellKnownTypeNames.SystemIOFile
  • Loading branch information
mavasani authored Apr 14, 2020
2 parents de59248 + 17a4e1b commit f970239
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed class DoNotCallDangerousMethodsInDeserialization : DiagnosticAnaly

private ImmutableArray<(string, string[])> DangerousCallable = ImmutableArray.Create<(string, string[])>
(
(WellKnownTypeNames.SystemIOFileFullName, new[] { "WriteAllBytes", "WriteAllLines", "WriteAllText", "Copy", "Move", "AppendAllLines", "AppendAllText", "AppendText", "Delete" }),
(WellKnownTypeNames.SystemIOFile, new[] { "WriteAllBytes", "WriteAllLines", "WriteAllText", "Copy", "Move", "AppendAllLines", "AppendAllText", "AppendText", "Delete" }),
(WellKnownTypeNames.SystemIODirectory, new[] { "Delete" }),
(WellKnownTypeNames.SystemIOFileInfo, new[] { "Delete" }),
(WellKnownTypeNames.SystemIODirectoryInfo, new[] { "Delete" }),
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Compiler/WellKnownTypeNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal static class WellKnownTypeNames
public const string SystemIOCompressionZipFileExtensions = "System.IO.Compression.ZipFileExtensions";
public const string SystemIODirectory = "System.IO.Directory";
public const string SystemIODirectoryInfo = "System.IO.DirectoryInfo";
public const string SystemIOFileFullName = "System.IO.File";
public const string SystemIOFile = "System.IO.File";
public const string SystemIOFileInfo = "System.IO.FileInfo";
public const string SystemIOFileStream = "System.IO.FileStream";
public const string SystemIOLogLogStore = "System.IO.Log.LogStore";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static FilePathInjectionSinks()
( "Exists", new[] { "path" } ),
});
builder.AddSinkInfo(
WellKnownTypeNames.SystemIOFileFullName,
WellKnownTypeNames.SystemIOFile,
SinkKind.FilePathInjection,
isInterface: false,
isAnyStringParameterInConstructorASink: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static HardcodedCertificateSources()
var builder = PooledHashSet<SourceInfo>.GetInstance();

builder.AddSourceInfoSpecifyingTaintedTargets(
WellKnownTypeNames.SystemIOFileFullName,
WellKnownTypeNames.SystemIOFile,
isInterface: false,
taintedProperties: null,
taintedMethodsNeedsPointsToAnalysis: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static ZipSlipSinks()
("ExtractToFile", new[] { "destinationFileName" } ),
});
builder.AddSinkInfo(
WellKnownTypeNames.SystemIOFileFullName,
WellKnownTypeNames.SystemIOFile,
SinkKind.ZipSlip,
isInterface: false,
isAnyStringParameterInConstructorASink: false,
Expand Down

0 comments on commit f970239

Please sign in to comment.