@@ -289,10 +289,24 @@ private module Cached {
289289 TypeTrackingInput:: withoutContentStepImpl ( _, n , _)
290290 }
291291
292+ private predicate isAutomaticVariable ( Node n ) {
293+ n .asExpr ( ) .( CfgNodes:: ExprNodes:: VarReadAccessCfgNode ) .getVariable ( ) .getName ( ) =
294+ [
295+ "args" , "ConsoleFileName" , "EnabledExperimentalFeatures" , "Error" , "Event" , "EventArgs" ,
296+ "EventSubscriber" , "ExecutionContext" , "HOME" , "Host" , "input" , "IsCoreCLR" , "IsLinux" ,
297+ "IsMacOS" , "IsWindows" , "LASTEXITCODE" , "MyInvocation" , "NestedPromptLevel" , "PID" ,
298+ "PROFILE" , "PSBoundParameters" , "PSCmdlet" , "PSCommandPath" , "PSCulture" , "PSDebugContext" ,
299+ "PSEdition" , "PSHOME" , "PSItem" , "PSScriptRoot" , "PSSenderInfo" , "PSUICulture" ,
300+ "PSVersionTable" , "PWD" , "Sender" , "ShellId" , "StackTrace"
301+ ]
302+ }
303+
292304 cached
293305 predicate isLocalSourceNode ( Node n ) {
294306 n instanceof ParameterNode
295307 or
308+ isAutomaticVariable ( n )
309+ or
296310 // Expressions that can't be reached from another entry definition or expression
297311 (
298312 n instanceof ExprNode
0 commit comments