コード例 #1
0
        /* goodG2B() - use goodsource and badsink */
        private static void GoodG2B()
        {
            string data = CWE427_Uncontrolled_Search_Path_Element__ReadLine_61b.GoodG2BSource();

            /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
            Environment.SetEnvironmentVariable("PATH", data);
        }
コード例 #2
0
        public override void Bad()
        {
            string data = CWE427_Uncontrolled_Search_Path_Element__ReadLine_61b.BadSource();

            /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
            Environment.SetEnvironmentVariable("PATH", data);
        }