Skip to content

Commit

Permalink
test: update reflection using user input snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
didroe committed Oct 17, 2023
1 parent 9a376f8 commit 00a3779
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 5,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -43,7 +43,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 6,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -77,7 +77,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 7,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -111,7 +111,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 8,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 10,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 12,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -213,7 +213,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 14,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -247,7 +247,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 15,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 17,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -315,7 +315,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 18,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down Expand Up @@ -349,7 +349,7 @@ exports[`php_lang_reflection_using_user_input bad 1`] = `
],
"id": "php_lang_reflection_using_user_input",
"title": "Use of reflection influenced by user input detected.",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\nmethod(params[:method])\\n\`\`\`\\n\\n✅ Use user input indirectly when using reflection:\\n\\n\`\`\`php\\nmethod_name =\\n case params[:action]\\n when \\"option1\\"\\n \\"method1\\"\\n when \\"option2\\"\\n \\"method2\\"\\n end\\n\\nmethod(method_name)\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"description": "## Description\\n\\nApplications should not look up or manipulate code using user-supplied data.\\n\\n## Remediations\\n\\n❌ Avoid using user input when using reflection:\\n\\n\`\`\`php\\n$class = new ReflectionClass($_GET[\\"class\\"])\\n\`\`\`\\n\\n## Resources\\n- [OWASP Code injection explained](https://owasp.org/www-community/attacks/Code_Injection)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/php_lang_reflection_using_user_input",
"line_number": 19,
"full_filename": "/tmp/bearer-scan/bad.php",
Expand Down

0 comments on commit 00a3779

Please sign in to comment.