Skip to content

Commit e7bc758

Browse files
authored
feat: add support for new wolfi/chainguard apk database location CN-150 (#667)
Update the apk database scanning logic to look at /usr/lib/apk/db/installed in addition to /lib/apk/db/installed. Recently, Chainguard/Wolfi images have moved the location of /lib/apk to /usr/lib/apk. Without this change, snyk container scanning fails to find and analyze the apk package database on newer Chainguard/Wolfi container images.
1 parent bce585b commit e7bc758

3 files changed

Lines changed: 850 additions & 2 deletions

File tree

lib/inputs/apk/static.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { streamToString } from "../../stream-utils";
66
export const getApkDbFileContentAction: ExtractAction = {
77
actionName: "apk-db",
88
filePathMatches: (filePath) =>
9-
filePath === normalizePath("/lib/apk/db/installed"),
9+
filePath === normalizePath("/lib/apk/db/installed") ||
10+
filePath === normalizePath("/usr/lib/apk/db/installed"),
1011
callback: streamToString,
1112
};
1213

0 commit comments

Comments
 (0)