SAST: gl-sast-report.json has incorrect ownership and/or permissions.
Summary
Using the SAST scanner to scan a Go project, the pipeline fails with following error:
open gl-sast-report.json: permission denied.
Please update the golang scanner to create gl-sast-report.json with at least group read permissions (0640).The report is created with the following ownership/permissions:
-rw------- 1 root root 356 Oct 12 17:16 gl-sast-report.json
Steps to reproduce
- In a Go project, use SAST scanner with a Kubernetes executor
Configuration used
- GitLab 15.3.3 on EKS cluster with shared runners installed via the Runner Operator
A basic gitlab-ci.yml:
stages:
- test
include:
- template: Jobs/SAST.gitlab-ci.ymlWorkaround
Add chmod 644 gl-sast-report.json after /analyzer run
iac-sast:
after_script:
- chmod 644 gl-sast-report.jsonEdited by Nathan Black