This is a pull request for the following functionalities:
Replaced deprecated phpcs-security-audit SAST analyzer with the latest one
Implemented Smegrep to the current gitlab pipeline
By default enable the sast jobs for hpcs-security-audit, together with bandit, eslint,nodejsandspot-bugs`
Made the config of the stage conformance and security simpler and more concise
pre-requisite
Confirm the existing phpcs-security-audit-sast is throwing warning by checking the log in the gitlab as below:
$ echo "This job was deprecated in GitLab 16.8 and removed in GitLab 17.0"
This job was deprecated in GitLab 16.8 and removed in GitLab 17.0
$ echo "For more information see https://docs.gitlab.com/ee/update/deprecations.html#sast-analyzer-coverage-changing-in-gitlab-170"
For more information see https://docs.gitlab.com/ee/update/deprecations.html#sast-analyzer-coverage-changing-in-gitlab-170
$ exit 1
And check the results in the gitlab pipeline dashboard
How to test?
Describe how the new functionalities can be tested by PR reviewers
Check out this PR and push it to gitlab
Confirm that semgrep-sast is executed successfully with log as below:
And check the results in the gitlab pipeline dashboard
How have functionalities been implemented?
Describe how the new functionalities have been implemented by the
changed code at a high level
By replacing the deprecated template Security/SAST.gitlab-ci.yml with Jobs/SAST.gitlab-ci.yml, the Semgrep analyzer will be triggered automatically, and this analyzer by default will perform Static Application Security Testing (SAST) scanning on repositories containing code written in several languages:
C# (.NET)
C
C++
Go
Kotlin
Java
JavaScript
Objective-C
PHP
Python
Ruby
Rust
Scala
Swift
TypeScript
Other Semgrep-based analyzers will also be triggered, for example:
Pull request for issue: #1867
This is a pull request for the following functionalities:
phpcs-security-audit
SAST analyzer with the latest oneSmegrep
to the current gitlab pipelinehpcs-security-audit
, together withbandit
,eslint,
nodejsand
spot-bugs`conformance and security
simpler and more concisepre-requisite
Confirm the existing
phpcs-security-audit-sast
is throwing warning by checking the log in the gitlab as below:And check the results in the gitlab pipeline dashboard
How to test?
Describe how the new functionalities can be tested by PR reviewers
semgrep-sast
is executed successfully with log as below:How have functionalities been implemented?
Describe how the new functionalities have been implemented by the changed code at a high level
By replacing the deprecated template
Security/SAST.gitlab-ci.yml
withJobs/SAST.gitlab-ci.yml
, theSemgrep
analyzer will be triggered automatically, and this analyzer by default will perform Static Application Security Testing (SAST) scanning on repositories containing code written in several languages:Other
Semgrep-based
analyzers will also be triggered, for example:Unless
SAST_EXCLUDED_ANALYZERS
has been provided, for example:Any issues with implementation?
None.
Any changes to automated tests?
None.
Any changes to documentation?
None.
Any technical debt repayment?
None.
Any improvements to CI/CD pipeline?
Replaced the deprecated template
Security/SAST.gitlab-ci.yml
withJobs/SAST.gitlab-ci.yml
.