This job runs the static code analysis using [security-code-scan](https://security-code-scan.github.io/). On big projects this analysis can take quite some time. Use `security-scan-mode` to control the branches on which to run this automatically.
It uses the following variables:
| Input / Variable | Description | Default value |
| `security-scan-disabled` / `DOTNET_SECURITY_SCAN_DISABLED` | Set to true to disable [security-code-scan](https://security-code-scan.github.io/) analysis. | `false` |
| `security-scan-opts` / `DOTNET_SECURITY_SCAN_OPTS` | Additional [security-code-scan options](https://github.com/security-code-scan/security-code-scan) to pass to the analysis. | _none_ |
**Output artifacts:**
This job produces a SARIF report `dotnet-security-scan-<project>.security-scan.sarif` containing the findings. This SARIF is converted to GitLab SAST and Code Quality formats for reporting depending upon available subscription feature.
This job creates a Software Bill Of Materials (SBOM) for the project, libraries and executables using [CycloneDX cdxgen](https://github.com/CycloneDX/cdxgen).
"description":"Run [Security Code Scan](https://security-code-scan.github.io/) analysis during build to identify security vulnerabilities in your code.",
"disable_with":"DOTNET_SECURITY_SCAN_DISABLED",
"variables":[
{
"name":"DOTNET_SECURITY_SCAN_OPTS",
"description":"Additional [security-code-scan options](https://github.com/security-code-scan/security-code-scan) to pass to the analysis.",