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

Unable to use Grype from GitLab CI/CD #1335

Closed
kuwv opened this issue Jun 2, 2023 · 4 comments
Closed

Unable to use Grype from GitLab CI/CD #1335

kuwv opened this issue Jun 2, 2023 · 4 comments
Assignees
Labels
bug Something isn't working changelog-ignore Don't include this issue in the release changelog

Comments

@kuwv
Copy link

kuwv commented Jun 2, 2023

What happened:

GitLab utilizes shells of container images to run CI/CD jobs. The Grype container doesn't not provide any shells. While the distroless images do provide a focused base image for CLI images it prevents Grype from being used by all CI/CD platforms where it is intended.

What you expected to happen:

GitLab should be able to utilize a shell and perform any additional pre/post setup actions for Grype.

Steps to reproduce the issue:

Create a project with a pipeline on GitLab.com (or any CI/CD utilizing shells) and attempt to use Grype:

image:
  name: docker.io/anchore/syft:v0.82.0
  entrypoint: ''

Anything else we need to know?:
https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#override-the-entrypoint-of-an-image
anchore/syft#833
anchore/syft#1858

@kuwv kuwv added the bug Something isn't working label Jun 2, 2023
@kuwv kuwv changed the title Unable to use Gryp from GitLab CI/CD Unable to use Grype from GitLab CI/CD Jun 2, 2023
@kzantow
Copy link
Contributor

kzantow commented Aug 24, 2023

Hi @kuwv, we currently publish a -debug tag, in the format: anchore/grype:<version>-debug (introduced in PR 1106). This should provide a shell that is compatible with GitLab. Would you be able to try this and see if it works for you?

@wagoodman
Copy link
Contributor

We can do the same suggestion here anchore/syft#1858 (comment)

@spiffcs
Copy link
Contributor

spiffcs commented Oct 24, 2023

Linked answer from anchore/syft#1858 (comment)

I've also added a new grype job to that gitlab repo. It shows how the debug image can be invoked.

Let me know if you have other questions on this one and I can reopen if the images are still not functioning as intended

@spiffcs spiffcs closed this as completed Oct 24, 2023
@kuwv
Copy link
Author

kuwv commented Oct 24, 2023

Yeah, I'm installing from apk for now. It probably won't in siloed environments though.

@spiffcs spiffcs added the changelog-ignore Don't include this issue in the release changelog label Oct 24, 2023
@spiffcs spiffcs self-assigned this Oct 24, 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 changelog-ignore Don't include this issue in the release changelog
Projects
Archived in project
Development

No branches or pull requests

4 participants