snyk-docker-plugin
Version:
Snyk CLI docker plugin
19 lines • 747 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getJarFileContentAction = void 0;
const path = require("path");
const stream_utils_1 = require("../../stream-utils");
const ignoredPaths = ["/usr/lib", "gradle/cache"];
const javaArchiveFileFormats = [".jar", ".war"];
function filePathMatches(filePath) {
const dirName = path.dirname(filePath);
const fileExtension = filePath.slice(-4);
return (javaArchiveFileFormats.includes(fileExtension) &&
!ignoredPaths.some((ignorePath) => dirName.includes(path.normalize(ignorePath))));
}
exports.getJarFileContentAction = {
actionName: "jar",
filePathMatches,
callback: stream_utils_1.streamToBuffer,
};
//# sourceMappingURL=static.js.map
;