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

Support for Azure Linux 3.0 #1829

Closed
eric-desrochers opened this issue Apr 25, 2024 · 5 comments
Closed

Support for Azure Linux 3.0 #1829

eric-desrochers opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request new-matcher

Comments

@eric-desrochers
Copy link

eric-desrochers commented Apr 25, 2024

What would you like to be added:
Support for AZL3.

Why is this needed:
CVE detection.

Additional context:
/etc/os-release
ID=azurelinux

@eric-desrochers eric-desrochers added the enhancement New feature or request label Apr 25, 2024
@tgerla tgerla moved this to Ready in OSS May 2, 2024
@eric-desrochers
Copy link
Author

We would like support for both grype and syft.

@willmurphyscode willmurphyscode moved this from Ready to In Progress in OSS May 7, 2024
@willmurphyscode
Copy link
Contributor

Hi @eric-desrochers I believe syft support is already done (syft doesn't need to be explicitly told about new distros that use /etc/os-release to identify themselves):

$ syft version
$ syft -q -o json azurelinuxpreview.azurecr.io/public/azurelinux/base/core:3.0 | jq .distro
{
  "prettyName": "Microsoft Azure Linux 3.0",
  "name": "Microsoft Azure Linux",
  "id": "azurelinux",
  "version": "3.0.20240417",
  "versionID": "3.0",
  "homeURL": "https://aka.ms/azurelinux",
  "supportURL": "https://aka.ms/azurelinux",
  "bugReportURL": "https://aka.ms/azurelinux"
}

We've started work on support for grype, see #1848 and anchore/vunnel#569

I'll post manual testing steps here once those two PRs are closer to ready.

@willmurphyscode
Copy link
Contributor

willmurphyscode commented May 9, 2024

Hi @eric-desrochers this is ready for you all to test.

To test this, you need to pull down branches of 3 repos: grype, grype-db, and vunnel. You'll also need to make grype-db depend on the local version of grype, since nothing is released yet. You'll need Python, poetry, and Go available.

Here's a script to set up the directories, to be run from an empty directory where you want to work on this stuff:

git clone https://github.com/anchore/grype.git -b feat-azure-linux-3-support

git clone https://github.com/anchore/grype-db.git -b feat-azure-linux-3-support

pushd grype-db 2>/dev/null
  go work init || true
  go work use .
  go work use ../grype
popd

git clone https://github.com/anchore/vunnel.git -b feat-azure-linux-3-support

The actual testing will be done from the vunnel repo:

cd vunnel
poetry install
make dev provider=mariner

Running make dev provider=mariner starts a development shell where you can test out building a grype database that includes the Azure Linux 3 feeds and test on some images.

Then you can build the grype db and test the local build of grype against some images. anchore/test_images:azurelinux3-d028093 is a test image based on Azure Linux 3 that has an old version of the kernel RPM installed so that grype will find some vulnerabilities (you can see the dockerfile here: https://github.com/anchore/test-images/blob/main/containers/azurelinux3/Dockerfile)

# run this in the development shell from the previous step
make update-db
./bin/grype anchore/test_images:azurelinux3-d028093

You should see several vulnerabilities in the output (8 as of this writing). Feel free to run ./bin/grype against other images as well.

Please let me know if you have any issues or questions.

@willmurphyscode willmurphyscode moved this from In Progress to In Review in OSS May 9, 2024
@eric-desrochers
Copy link
Author

Thanks will give it a try next week.

@willmurphyscode willmurphyscode moved this from In Review to In Progress in OSS May 21, 2024
@willmurphyscode willmurphyscode moved this from In Progress to In Review in OSS May 29, 2024
@wagoodman wagoodman self-assigned this Jun 3, 2024
@wagoodman wagoodman removed their assignment Sep 9, 2024
@willmurphyscode willmurphyscode moved this from In Progress to In Review in OSS Sep 24, 2024
@willmurphyscode
Copy link
Contributor

Implemented by #1848 - will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-matcher
Projects
Archived in project
Development

No branches or pull requests

4 participants