Add PHP language support to gitlab-advanced-sast
What does this MR do and why?
This MR adds configurable PHP file scanning support to gitlab-advanced-sast through a new input parameter ff_glas_enable_php_support.
Key changes:
- Added
ff_glas_enable_php_supportinput (default:true) to control PHP scanning behavior - When enabled:
gitlab-advanced-sastscans PHP files,semgrep-sastexcludes them - When disabled:
semgrep-sastcontinues to scan PHP files (backward compatible) - Refactored template using
!referencetags for better maintainability
Usage:
include:
- component: gitlab.com/components/sast/sast@latest
inputs:
run_advanced_sast: true
ff_glas_enable_php_support: false # Optional: disable PHP scanning in Advanced SAST
References
https://gitlab.com/gitlab-org/gitlab/-/issues/523657+s
Manual QA
Before
- Project: https://gitlab.com/philipcunningham/manual-qa-glas-php-ci-component
- Pipeline: https://gitlab.com/philipcunningham/manual-qa-glas-php-ci-component/-/pipelines/1736011450
After ff_glas_enable_php_support: false
- Project: https://gitlab.com/philipcunningham/manual-qa-glas-php-ci-component
- Pipeline: https://gitlab.com/philipcunningham/manual-qa-glas-php-ci-component/-/pipelines/1833380752
After ff_glas_enable_php_support: true
Edited by Philip Cunningham