Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private bool ValidResourceFiles(ITaskItem[] inputFiles)

strFileName = inputFile.ItemSpec;

if (!File.Exists(TaskHelper.CreateFullFilePath(strFileName, SourceDir)))
if (!File.Exists(TaskHelper.CreateFullFilePath(strFileName, SourceDir))) // CodeQL [SM00414] Trusted build-time input, not attacker-controlled
{
bValid = false;
Log.LogErrorWithCodeFromResources(nameof(SR.FileNotFound), strFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private bool ManageUids()

using (Stream uidStream = new FileStream(tempFile, FileMode.Create))
{
using (Stream source = File.OpenRead(inputFile.ItemSpec))
using (Stream source = File.OpenRead(inputFile.ItemSpec)) // CodeQL [SM00414] Trusted build-time input, not attacker-controlled
{
UidWriter writer = new UidWriter(collector, source, uidStream);
writer.UpdateUidWrite();
Expand Down Expand Up @@ -297,7 +297,7 @@ private bool ManageUids()

using (Stream uidStream = new FileStream(tempFile, FileMode.Create))
{
using (Stream source = File.OpenRead(inputFile.ItemSpec))
using (Stream source = File.OpenRead(inputFile.ItemSpec)) // CodeQL [SM00414] Trusted build-time input, not attacker-controlled
{
UidWriter writer = new UidWriter(collector, source, uidStream);
writer.RemoveUidWrite();
Expand Down Expand Up @@ -371,9 +371,9 @@ private void RenameFile(string src, string dest)

private void RemoveFile(string fileName)
{
if (File.Exists(fileName))
if (File.Exists(fileName)) // CodeQL [SM00414] Trusted build-time path, not attacker-controlled
{
File.Delete(fileName);
File.Delete(fileName); // CodeQL [SM00414] Trusted build-time path, not attacker-controlled
}
}

Expand Down Expand Up @@ -476,7 +476,7 @@ private UidCollector ParseFile(string fileName)
{
UidCollector collector = new UidCollector(fileName );

using (Stream xamlStream = File.OpenRead(fileName))
using (Stream xamlStream = File.OpenRead(fileName)) // CodeQL [SM00414] Trusted build-time input, not attacker-controlled
{
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
XmlParserContext context = new XmlParserContext(
Expand Down