Skip to content

Commit

Permalink
allow dockerfile scan on filesystem analysis
Browse files Browse the repository at this point in the history
Signed-off-by: sushiMix <[email protected]>
  • Loading branch information
sushiMix committed Dec 11, 2023
1 parent 78731ce commit 64dc51a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4925,6 +4925,31 @@ export const createMultiXBom = async (pathList, options) => {
listComponents(options, {}, bomData.bomJson.components, "maven", "xml")
);
}
bomData = await createContainerSpecLikeBom(path, options);
if (
bomData &&
bomData.bomJson &&
bomData.bomJson.components &&
bomData.bomJson.components.length
) {
if (DEBUG_MODE) {
console.log(
`Found ${bomData.bomJson.components.length} docker dependencies at ${path}`
);
}
components = components.concat(bomData.bomJson.components);
dependencies = dependencies.concat(bomData.bomJson.dependencies);
if (
bomData.parentComponent &&
Object.keys(bomData.parentComponent).length
) {
parentSubComponents.push(bomData.parentComponent);
}
componentsXmls = componentsXmls.concat(
// COPIED FROM SECTION ABOVE BUT NO IDEA OF PARAMETERS VALUES TO PUT
listComponents(options, {}, bomData.bomJson.components, "docker", "tar")
);
}
} // for
if (options.lastWorkingDir && options.lastWorkingDir !== "") {
bomData = await createJarBom(options.lastWorkingDir, options);
Expand Down

0 comments on commit 64dc51a

Please sign in to comment.