/* goodG2B() - use goodsource and badsink */ private static void GoodG2B() { string data; /* FIX: Use a hardcoded string */ data = "foo"; CWE78_OS_Command_Injection__Environment_71b.GoodG2BSink((Object)data); }
public override void Bad() { string data; /* get environment variable ADD */ /* POTENTIAL FLAW: Read data from an environment variable */ data = Environment.GetEnvironmentVariable("ADD"); CWE78_OS_Command_Injection__Environment_71b.BadSink((Object)data); }