sonar-dotnet icon indicating copy to clipboard operation
sonar-dotnet copied to clipboard

FN S5443: No issue is raised if the publicly writable directory path is assembled with the help of a constant interpolated string

Open csaba-sagi-sonarsource opened this issue 3 years ago • 0 comments

Description

S5443 does not raised an issue in case the publicly writable directory path is assembled with the help of a constant interpolated string.

Repro steps

const string t = "T";
const string e = "E";
const string m = "M";
const string p = "P";
const string noncompliant = $"{t}{e}{m}{p}";
var tmp2 = Environment.GetEnvironmentVariable(noncompliant); // FN

Expected behavior

An issue should be raised.

Actual behavior

No issues are raised.

Known workarounds

None

Related information

  • C#/VB.NET Plugins version: 8.42.0.51121

csaba-sagi-sonarsource avatar Aug 02 '22 11:08 csaba-sagi-sonarsource