kics-github-action icon indicating copy to clipboard operation
kics-github-action copied to clipboard

Permission Denied error for Kics Scan Result.Json : "Error: open /github/workspace/results.json: permission denied"

Open Cybervol-Platform opened this issue 2 years ago • 2 comments

Hello,

I am having issue running the Kics Scan in my enterprise repo. I keep getting this error "Error: open /github/workspace/results.json: permission denied". I think the container does not have the permissions to write to the github/workspace. After doing some research I noted that GitHub Actions must be run by the default Docker user (root). it there a way to specify this in my workflow to ensure the container runs as root.

Please any help with this will be appreciated

Cybervol-Platform avatar Jun 14 '23 17:06 Cybervol-Platform

I have the similar erro due to using a container manager that does not require root (podman). Here is how I got around the error:

podman run -t -v .:/path checkmarx/kics scan -p /path --verbose | tee kics.log

Instead of writing the log to the container dir /report, which is a mounted volume from the host, the command outputs the log to stdOut then pipes it to tee. In turn tee writes the log on the host.

Hope this helps.

davidjeddy avatar Dec 25 '23 16:12 davidjeddy

On fedora 39 and also have this problem with podman. Has there been any update on a permanent fix for this?

Rafael-Schippers avatar Apr 25 '24 07:04 Rafael-Schippers