Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running SBOM as gitlab-runner fails with 'permission denied' #36

Open
thepip3r opened this issue Nov 27, 2023 · 0 comments
Open

Running SBOM as gitlab-runner fails with 'permission denied' #36

thepip3r opened this issue Nov 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@thepip3r
Copy link

thepip3r commented Nov 27, 2023

What happened: When running, docker sbom as root, the command works fine. When su-ing over to our 'gitlab-runner' user, installing the plugin for that user, docker reports it as an an "invalid plugin" with a "permission denied":

Invalid Plugins:
sbom failed to fetch metadata: fork/exec /home/gitlab-runner/.docker/cli-plugins/docker-sbom: permission denied

What you expected to happen: docker sbom to work for my 'gitlab-runner' user so I can integrate it into our CI/CD processes.

How to reproduce it (as minimally and precisely as possible): Run the install script for docker-sbom as the gitlab-runner user and once installed, just run docker [enter] to see the error.

Anything else we need to know?: Things I've tried or additional outputs:

  • verified permissions on docker-sbom between working instance (root) and non-working instance (gitlab-runner)
  • verified owner was properly set as root for root and gitlab-runner for gitlab-runner
    • but also tried changing gitlab-runner's docker-sbom's owner to 'root' and received the same error
  • all of these tests were run with SELinux off (for testing)
    • /var/log/audit/audit.log was additionally not showing any block/deny actions for docker sbom or sbom prior to being disabled for testing (setenforce 0)
  • output of id as gitlab-runner: uid=1002(gitlab-runner) gid=1002(gitlab-runner) groups=1002(gitlab-runner),979(docker) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
  • gitlab-runner can successfully run other docker commands, e.g.: build, tag, push, images, ps, etc. (all other commands we use in our pipeline)

Environment:

  • OS: RHEL 8.9
  • Output of docker version: Docker version 24.0.7, build afdd53b
  • Output of docker sbom version: sbom-cli-plugin 0.6.1, build 02cf1c8
@thepip3r thepip3r added the bug Something isn't working label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant