Skip to content

Commit

Permalink
⭐️ Detect packages on Wolfi container distro (#3586)
Browse files Browse the repository at this point in the history
This distro uses apk so add it to the mapping.

```
cnquery shell container image cgr.dev/chainguard/caddy
→ connected to Wolfi
  ___ _ __   __ _ _   _  ___ _ __ _   _
 / __| '_ \ / _` | | | |/ _ \ '__| | | |
| (__| | | | (_| | |_| |  __/ |  | |_| |
 \___|_| |_|\__, |\__,_|\___|_|   \__, |
  mondoo™      |_|                |___/  interactive shell

cnquery> packages
packages.list: [
  0: package name="ca-certificates-bundle" version="1708982311:20240226-r0"
  1: package name="caddy" version="1710420294:2.7.6-r4"
  2: package name="wolfi-baselayout" version="1701735113:20230201-r7"
]
```

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Mar 18, 2024
1 parent 3a44b77 commit f43a6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/os/resources/packages/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func ResolveSystemPkgManager(conn shared.Connection) (OperatingSystemPkgManager,
pm = &RpmPkgManager{conn: conn, platform: asset.Platform}
case asset.Platform.IsFamily("suse"): // suse handling
pm = &SusePkgManager{RpmPkgManager{conn: conn, platform: asset.Platform}}
case asset.Platform.Name == "alpine": // alpine
case asset.Platform.Name == "alpine" || asset.Platform.Name == "wolfi": // alpine & wolfi share apk
pm = &AlpinePkgManager{conn: conn, platform: asset.Platform}
case asset.Platform.Name == "macos": // mac os family
pm = &MacOSPkgManager{conn: conn}
Expand Down

0 comments on commit f43a6c8

Please sign in to comment.