Skip to content

Commit

Permalink
Support for fail-on-error for container sbom generation. Env variable…
Browse files Browse the repository at this point in the history
… to force non-strict tar extraction.

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Dec 26, 2024
1 parent 3d78683 commit f0e70a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/dockertests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:
jobs:
linux-tests:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
node-version: ['23.x']
Expand Down
2 changes: 2 additions & 0 deletions lib/managers/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ export const extractTar = async (fullImageName, dir, options) => {
} else if (err.code === "TAR_BAD_ARCHIVE") {
if (DEBUG_MODE) {
console.log(`Archive ${fullImageName} is empty. Skipping.`);
// Empty tar images need not lead to failure.
return false;
}
} else if (["EACCES"].includes(err.code)) {
console.log(err);
Expand Down
2 changes: 1 addition & 1 deletion types/lib/managers/docker.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0e70a6

Please sign in to comment.