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

🐛 Fix platformID for containers #1951

Merged
merged 2 commits into from
Sep 27, 2023
Merged

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Sep 27, 2023

No description provided.

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Sep 27, 2023

It does not have its own issue, but fixes what I saw here: #1950 (comment)

cnquery run container bc7fbc466c7c -c "asset{ platform ids name title }"
...
asset: {
  title: "Alpine Linux v3.16, Docker Container"
  platform: "alpine"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/docker/containers/bc7fbc466c7c9682217d950d935aead1f415d1b69b6e87c0b0ac801eb513feff"
  ]
  name: "musing_hermann"
}

When scanning a single image which isn't present in the local docker daemon, the platformID was missing.

Fixes #1952

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Sep 27, 2023

And for non-local container images:

cnquery run container image alpine:3.8.4 -c "asset{ platform ids name title version labels }"                                                                                ✔ │ 5s │ 15:48:07 
! using builtin provider for os
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
! using builtin provider for os
asset: {
  version: "3.8.4"
  title: "Alpine Linux v3.8, Docker Image"
  labels: {}
  platform: "alpine"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/docker/images/899a03e9816e5283edba63d71ea528cd83576b28a7586cf617ce78af5526f209"
  ]
  name: "index.docker.io/library/alpine@899a03e9816e"
}

The ID was only missing for images, which weren't present in the local docker daemon.

@vjeffrey vjeffrey merged commit 5409771 into main Sep 27, 2023
10 checks passed
@vjeffrey vjeffrey deleted the christian/v9_container_platform_ids branch September 27, 2023 19:54
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants