diff --git a/.github/workflows/repotests.yml b/.github/workflows/repotests.yml index 1b71ea30b..b4cf3ae83 100644 --- a/.github/workflows/repotests.yml +++ b/.github/workflows/repotests.yml @@ -739,6 +739,14 @@ jobs: mkdir -p "~/.rbenv/plugins" git clone https://github.com/rbenv/ruby-build.git --depth=1 "~/.rbenv/plugins/ruby-build" if: runner.os != 'Windows' + - name: repotests - no exec + run: | + bin/cdxgen.js -p -t pnpm ${GITHUB_WORKSPACE} --no-recurse -o ${GITHUB_WORKSPACE}/bomresults/bom-self.json --fail-on-error + shell: bash + env: + NODE_OPTIONS: "--permission --allow-fs-read=${{ runner.temp }}/cdxgen-repotests/* --allow-fs-read=${{ github.workspace }}/* --allow-fs-write=${{ github.workspace }}/bomresults/bom-self.json --trace-warnings" + CDXGEN_TEMP_DIR: ${{ runner.temp }}/cdxgen-repotests + JAVA_HOME: "" - name: repotests run: | bin/cdxgen.js -p -t java ${GITHUB_WORKSPACE}/repotests/java-sec-code -o ${GITHUB_WORKSPACE}/bomresults/bom-java-sec-code-1.json --fail-on-error diff --git a/bin/cdxgen.js b/bin/cdxgen.js index 5153aa2ce..1808a3c70 100755 --- a/bin/cdxgen.js +++ b/bin/cdxgen.js @@ -28,6 +28,7 @@ import { isMac, isSecureMode, isWin, + safeExistsSync, } from "../lib/helpers/utils.js"; import { validateBom } from "../lib/helpers/validator.js"; import { postProcess } from "../lib/stages/postgen/postgen.js"; @@ -579,7 +580,9 @@ const checkPermissions = (filePath, options) => { console.log( "\x1b[1;35mSecure mode requires permission-related arguments. These can be passed as CLI arguments directly to the node runtime or set the NODE_OPTIONS environment variable as shown below.\x1b[0m", ); - const nodeOptionsVal = `--permission --allow-fs-read="${getTmpDir()}/*" --allow-fs-write="${getTmpDir()}/*" --allow-fs-read="${fullFilePath}/*" --allow-fs-write="${options.output}" --allow-child-process`; + const childProcessArgs = + options?.lifecycle !== "pre-build" ? " --allow-child-process" : ""; + const nodeOptionsVal = `--permission --allow-fs-read="${getTmpDir()}/*" --allow-fs-write="${getTmpDir()}/*" --allow-fs-read="${fullFilePath}/*" --allow-fs-write="${options.output}"${childProcessArgs}`; console.log( `${isWin ? "$env:" : "export "}NODE_OPTIONS='${nodeOptionsVal}'`, ); @@ -680,11 +683,11 @@ const checkPermissions = (filePath, options) => { } if (!process.permission.has("fs.write", getTmpDir())) { console.log( - `FileSystemWrite permission may be required to the TEMP directory. Please invoke cdxgen with the argument --allow-fs-write="${join(getTmpDir(), "*")}"`, + `FileSystemWrite permission may be required for the TEMP directory. Please invoke cdxgen with the argument --allow-fs-write="${join(getTmpDir(), "*")}" in case of any crashes.`, ); if (isMac) { console.log( - "TIP: macOS doesn't use `/tmp` prefix for TEMP directories. Use the argument shown above.", + "TIP: macOS doesn't use the `/tmp` prefix for TEMP directories. Use the argument shown above.", ); } } @@ -752,7 +755,7 @@ const checkPermissions = (filePath, options) => { (process.env.SBOM_SIGN_ALGORITHM && process.env.SBOM_SIGN_ALGORITHM !== "none" && process.env.SBOM_SIGN_PRIVATE_KEY && - fs.existsSync(process.env.SBOM_SIGN_PRIVATE_KEY))) + safeExistsSync(process.env.SBOM_SIGN_PRIVATE_KEY))) ) { let alg = process.env.SBOM_SIGN_ALGORITHM || "RS512"; if (alg.includes("none")) { @@ -794,7 +797,7 @@ const checkPermissions = (filePath, options) => { ); if ( process.env.SBOM_SIGN_PUBLIC_KEY && - fs.existsSync(process.env.SBOM_SIGN_PUBLIC_KEY) + safeExistsSync(process.env.SBOM_SIGN_PUBLIC_KEY) ) { jwkPublicKey = crypto .createPublicKey( diff --git a/deno.json b/deno.json index e9995bd81..33739fc7d 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "11.1.6", + "version": "11.1.7", "exports": "./lib/cli/index.js", "compilerOptions": { "lib": ["deno.window"], @@ -68,7 +68,7 @@ "packageurl-js": "npm:packageurl-js@1.0.2", "prettify-xml": "npm:prettify-xml@^1.2.0", "properties-reader": "npm:properties-reader@^2.3.0", - "semver": "npm:semver@^7.6.3", + "semver": "npm:semver@^7.7.0", "ssri": "npm:ssri@^12.0.0", "table": "npm:table@^6.9.0", "tar": "npm:tar@^7.4.3", diff --git a/docs/PERMISSIONS.md b/docs/PERMISSIONS.md index 0f47fa963..72495ebfc 100644 --- a/docs/PERMISSIONS.md +++ b/docs/PERMISSIONS.md @@ -38,6 +38,27 @@ Use the custom container image `ghcr.io/cyclonedx/cdxgen-secure` which comes con docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-secure cdxgen -r /app -o /app/bom.json -t java ``` +### Identifying NODE_OPTIONS + +Run cdxgen with the environment variable `CDXGEN_SECURE_MODE=true` to obtain a suggested value for the `NODE_OPTIONS` environment variable. + +Example: + +```text +cdxgen -t pnpm --no-recurse -o bom.json $(pwd) --exclude "**/__fixtures__/**" --lifecycle pre-build + +Secure mode requires permission-related arguments. These can be passed as CLI arguments directly to the node runtime or set the NODE_OPTIONS environment variable as shown below. +export NODE_OPTIONS='--permission --allow-fs-read="/var/folders/h5/43_6kqvs4w7cclqtdbpj_7g80000gn/T/*" --allow-fs-write="/var/folders/h5/43_6kqvs4w7cclqtdbpj_7g80000gn/T/*" --allow-fs-read="/Volumes/Work/sandbox/pnpm/*" --allow-fs-write="/Volumes/Work/sandbox/pnpm/bom.json"' +``` + +## Controlling the permissions for external commands + +Use the environment variable `CDXGEN_NODE_OPTIONS` to control the permissions for the external node-based commands such as npm, atom, and yarn etc. + +```shell +export CDXGEN_NODE_OPTIONS="--permission --allow-fs-read --allow-fs-write=/foo/usages.slices.json" +``` + ## GitHub Action Workflow sample Our repotests include a working configuration to enable secure mode in GitHub Action Workflows. Below is a snippet. diff --git a/jsr.json b/jsr.json index f7a921a2f..7606728be 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "11.1.6", + "version": "11.1.7", "exports": "./lib/cli/index.js", "include": ["*.js", "lib/**", "bin/**", "data/**", "types/**"], "exclude": [ diff --git a/lib/cli/index.js b/lib/cli/index.js index 155ea281b..af2de430c 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -3,9 +3,7 @@ import { spawnSync } from "node:child_process"; import { constants, accessSync, - existsSync, lstatSync, - mkdirSync, mkdtempSync, readFileSync, rmSync, @@ -152,6 +150,8 @@ import { parseYarnLock, readZipEntry, recomputeScope, + safeExistsSync, + safeMkdirSync, shouldFetchLicense, splitOutputByGradleProjects, } from "../helpers/utils.js"; @@ -242,7 +242,7 @@ const createDefaultParentComponent = ( path = resolve(path); // Create a parent component based on the directory name let dirNameStr = - existsSync(path) && lstatSync(path).isDirectory() + safeExistsSync(path) && lstatSync(path).isDirectory() ? basename(path) : dirname(path); const tmpA = dirNameStr.split(sep); @@ -1274,7 +1274,7 @@ export function createBinaryBom(path, options) { const tempDir = mkdtempSync(join(getTmpDir(), "blint-tmp-")); const binaryBomFile = join(tempDir, "bom.json"); getBinaryBom(path, binaryBomFile, options.deep); - if (existsSync(binaryBomFile)) { + if (safeExistsSync(binaryBomFile)) { const binaryBom = JSON.parse( readFileSync(binaryBomFile, { encoding: "utf-8" }), ); @@ -1307,7 +1307,7 @@ export async function createJavaBom(path, options) { // war/ear mode if (path.endsWith(".war") || path.endsWith(".jar")) { // Check if the file exists - if (existsSync(path)) { + if (safeExistsSync(path)) { if (DEBUG_MODE) { console.log(`Retrieving packages from ${path}`); } @@ -1416,7 +1416,7 @@ export async function createJavaBom(path, options) { continue; } const settingsXml = join(basePath, "settings.xml"); - if (existsSync(settingsXml)) { + if (safeExistsSync(settingsXml)) { console.log( `maven settings.xml found in ${basePath}. Please set the MVN_ARGS environment variable based on the full mvn build command used for this project.\nExample: MVN_ARGS='--settings ${settingsXml}'`, ); @@ -1481,7 +1481,7 @@ export async function createJavaBom(path, options) { mvnTreeArgs = mvnTreeArgs.concat(addArgs); } // Automatically use settings.xml to improve the success for fallback - if (existsSync(settingsXml)) { + if (safeExistsSync(settingsXml)) { mvnTreeArgs.push("-s"); mvnTreeArgs.push(settingsXml); } @@ -1500,7 +1500,7 @@ export async function createJavaBom(path, options) { }, ); if (result.status === 0) { - if (existsSync(tempMvnParentTree)) { + if (safeExistsSync(tempMvnParentTree)) { const mvnTreeString = readFileSync(tempMvnParentTree, { encoding: "utf-8", }); @@ -1582,7 +1582,7 @@ export async function createJavaBom(path, options) { pkgList = pkgList.concat(dlist); } } else { - if (existsSync(tempMvnTree)) { + if (safeExistsSync(tempMvnTree)) { const mvnTreeString = readFileSync(tempMvnTree, { encoding: "utf-8", }); @@ -1715,10 +1715,10 @@ export async function createJavaBom(path, options) { let gradleRootPath = path; if ( gradleFiles?.length && - !existsSync(join(path, "settings.gradle")) && - !existsSync(join(path, "settings.gradle.kts")) && - !existsSync(join(path, "build.gradle")) && - !existsSync(join(path, "build.gradle.kts")) + !safeExistsSync(join(path, "settings.gradle")) && + !safeExistsSync(join(path, "settings.gradle.kts")) && + !safeExistsSync(join(path, "build.gradle")) && + !safeExistsSync(join(path, "build.gradle.kts")) ) { gradleRootPath = dirname(gradleFiles[0]); } @@ -1964,7 +1964,10 @@ export async function createJavaBom(path, options) { bazelTarget, ]; // Automatically load any bazelrc file - if (!process.env.BAZEL_ARGS && existsSync(join(basePath, ".bazelrc"))) { + if ( + !process.env.BAZEL_ARGS && + safeExistsSync(join(basePath, ".bazelrc")) + ) { bArgs = ["--bazelrc=.bazelrc", "build", bazelTarget]; } console.log("Executing", BAZEL_CMD, bArgs.join(" "), "in", basePath); @@ -1988,7 +1991,10 @@ export async function createJavaBom(path, options) { let query = [...(process.env?.BAZEL_ARGS?.split(" ") || [])]; let bazelParser; // Automatically load any bazelrc file - if (!process.env.BAZEL_ARGS && existsSync(join(basePath, ".bazelrc"))) { + if ( + !process.env.BAZEL_ARGS && + safeExistsSync(join(basePath, ".bazelrc")) + ) { query = ["--bazelrc=.bazelrc"]; } if (["true", "1"].includes(process.env.BAZEL_USE_ACTION_GRAPH)) { @@ -2121,7 +2127,7 @@ export async function createJavaBom(path, options) { sbtVersion != null && gte(sbtVersion, "1.4.0"); const tempDir = mkdtempSync(join(getTmpDir(), "cdxsbt-")); const tempSbtgDir = mkdtempSync(join(getTmpDir(), "cdxsbtg-")); - mkdirSync(tempSbtgDir, { recursive: true }); + safeMkdirSync(tempSbtgDir, { recursive: true }); // Create temporary plugins file const tempSbtPlugins = join(tempSbtgDir, "dep-plugins.sbt"); @@ -2191,7 +2197,7 @@ export async function createJavaBom(path, options) { if (!standalonePluginFile) { cleanupPlugin(basePath, pluginFile); } - if (existsSync(dlFile)) { + if (safeExistsSync(dlFile)) { const retMap = parseSbtTree(dlFile); if (retMap.pkgList?.length) { const tmpParentComponent = retMap.pkgList.splice(0, 1)[0]; @@ -2410,7 +2416,7 @@ export async function createNodejsBom(path, options) { // Projects such as juice-shop prevent lockfile creations using .npmrc files // Plus, they might require specific npm install args such as --legacy-peer-deps that could lead to strange node_modules structure // To keep life simple, let's look for any .npmrc file that has package-lock=false to toggle before npm install - if (pkgMgr === "npm" && existsSync(join(basePath, ".npmrc"))) { + if (pkgMgr === "npm" && safeExistsSync(join(basePath, ".npmrc"))) { const npmrcData = readFileSync(join(basePath, ".npmrc")); if ( npmrcData?.includes("package-lock=false") && @@ -2606,7 +2612,7 @@ export async function createNodejsBom(path, options) { // Determine the parent component const packageJsonF = join(basePath, "package.json"); if (!Object.keys(parentComponent).length) { - if (existsSync(packageJsonF)) { + if (safeExistsSync(packageJsonF)) { const pcs = await parsePkgJson(packageJsonF, true); if (pcs.length && Object.keys(pcs[0]).length) { parentComponent = { ...pcs[0] }; @@ -2687,7 +2693,7 @@ export async function createNodejsBom(path, options) { if (!Object.keys(parentComponent).length) { const basePath = dirname(f); const packageJsonF = join(basePath, "package.json"); - if (existsSync(packageJsonF)) { + if (safeExistsSync(packageJsonF)) { const pcs = await parsePkgJson(packageJsonF, true); if (pcs.length && Object.keys(pcs[0]).length) { tmpParentComponent = { ...pcs[0] }; @@ -2727,13 +2733,13 @@ export async function createNodejsBom(path, options) { } } if ( - existsSync(join(path, "rush.json")) && + safeExistsSync(join(path, "rush.json")) && isPackageManagerAllowed("rush", ["npm", "yarn", "pnpm"], options) ) { // Rush.js creates node_modules inside common/temp directory const nmDir = join(path, "common", "temp", "node_modules"); // Do rush install if we don't have node_modules directory - if (!existsSync(nmDir)) { + if (!safeExistsSync(nmDir)) { console.log("Executing 'rush install --no-link'", path); const result = spawnSync( "rush", @@ -2758,7 +2764,7 @@ export async function createNodejsBom(path, options) { "shrinkwrap-deps.json", ); const pnpmLock = join(path, "common", "config", "rush", "pnpm-lock.yaml"); - if (existsSync(swFile)) { + if (safeExistsSync(swFile)) { let pkgList = await parseNodeShrinkwrap(swFile); if (allImports && Object.keys(allImports).length) { pkgList = await addEvidenceForImports( @@ -2774,7 +2780,7 @@ export async function createNodejsBom(path, options) { filename: "shrinkwrap-deps.json", }); } - if (existsSync(pnpmLock)) { + if (safeExistsSync(pnpmLock)) { let pkgList = await parsePnpmLock(pnpmLock); if (allImports && Object.keys(allImports).length) { pkgList = await addEvidenceForImports( @@ -2812,7 +2818,7 @@ export async function createNodejsBom(path, options) { const basePath = dirname(f); // Determine the parent component const packageJsonF = join(basePath, "package.json"); - if (existsSync(packageJsonF)) { + if (safeExistsSync(packageJsonF)) { const pcs = await parsePkgJson(packageJsonF, true); if (pcs.length && Object.keys(pcs[0]).length) { const tmpParentComponent = { ...pcs[0] }; @@ -2899,7 +2905,7 @@ export async function createNodejsBom(path, options) { } // We might reach here if the project has no lock files // Eg: juice-shop - if (!pkgList.length && existsSync(join(path, "node_modules"))) { + if (!pkgList.length && safeExistsSync(join(path, "node_modules"))) { // Collect all package.json files from all node_modules directory const pkgJsonFiles = getAllFiles( path, @@ -2914,7 +2920,7 @@ export async function createNodejsBom(path, options) { } } if (!parentComponent || !Object.keys(parentComponent).length) { - if (existsSync(join(path, "package.json"))) { + if (safeExistsSync(join(path, "package.json"))) { const pcs = await parsePkgJson(join(path, "package.json"), true); if (pcs.length && Object.keys(pcs[0]).length) { parentComponent = { ...pcs[0] }; @@ -2982,7 +2988,7 @@ export function createPixiBom(path, options) { // if pixi.toml file found then we // Add parentComponent Details - const pixiTomlMode = existsSync(pixiToml); + const pixiTomlMode = safeExistsSync(pixiToml); if (pixiTomlMode) { parentComponent = parsePixiTomlFile(pixiToml); parentComponent.type = "application"; @@ -2999,7 +3005,7 @@ export function createPixiBom(path, options) { } const pixiLockFile = join(path, "pixi.lock"); - const pixiFilesMode = existsSync(pixiLockFile); + const pixiFilesMode = safeExistsSync(pixiLockFile); if (pixiFilesMode) { // Instead of what we do in createPythonBOM // where we install packages and run `getPipFrozenTree` @@ -3012,7 +3018,7 @@ export function createPixiBom(path, options) { generatePixiLockFile(path); const pixiLockFile = join(path, "pixi.lock"); - if (!existsSync(pixiLockFile) && DEBUG_MODE) { + if (!safeExistsSync(pixiLockFile) && DEBUG_MODE) { console.log( "Unexpected Error tried to generate pixi.lock file but failed.", ); @@ -3056,13 +3062,13 @@ export async function createPythonBom(path, options) { const tempDir = mkdtempSync(join(getTmpDir(), "cdxgen-venv-")); let parentComponent = createDefaultParentComponent(path, "pypi", options); // We are checking only the root here for pipenv - const pipenvMode = existsSync(join(path, "Pipfile")); + const pipenvMode = safeExistsSync(join(path, "Pipfile")); // If pixi is used then just return that as output instead const pixiLockFile = join(path, "pixi.lock"); - const pixiFilesMode = existsSync(pixiLockFile); + const pixiFilesMode = safeExistsSync(pixiLockFile); const pixiToml = join(path, "pixi.toml"); - const pixiTomlMode = existsSync(pixiToml); + const pixiTomlMode = safeExistsSync(pixiToml); if (pixiTomlMode || pixiFilesMode) { const BomNSData = createPixiBom(path, options); if (BomNSData) { @@ -3123,7 +3129,7 @@ export async function createPythonBom(path, options) { // Is this a pyproject based project. // TODO: Support nested directories const pyProjectFile = join(path, "pyproject.toml"); - const pyProjectMode = existsSync(pyProjectFile); + const pyProjectMode = safeExistsSync(pyProjectFile); if (pyProjectMode) { const pyProjMap = parsePyProjectTomlFile(pyProjectFile); const tmpParentComponent = pyProjMap.parentComponent; @@ -3156,7 +3162,7 @@ export async function createPythonBom(path, options) { // TODO: Support for nested directories const setupPy = join(path, "setup.py"); - const setupPyMode = existsSync(setupPy); + const setupPyMode = safeExistsSync(setupPy); // Poetry sets up its own virtual env containing site-packages so // we give preference to poetry lock file. Issue# 129 if (poetryMode) { @@ -3262,7 +3268,7 @@ export async function createPythonBom(path, options) { // TODO: Support for nested directories spawnSync("pipenv", ["install"], { cwd: path, encoding: "utf-8" }); const piplockFile = join(path, "Pipfile.lock"); - if (existsSync(piplockFile)) { + if (safeExistsSync(piplockFile)) { const lockData = JSON.parse(readFileSync(piplockFile)); const dlist = await parsePiplockData(lockData); if (dlist?.length) { @@ -3967,7 +3973,7 @@ export async function createRustBom(path, options) { if ( options.deep === true || (options.installDeps && - !existsSync(f.replace(".toml", ".lock")) && + !safeExistsSync(f.replace(".toml", ".lock")) && ["build", "post-build"].includes(options.lifecycle)) ) { const basePath = dirname(f); @@ -5213,7 +5219,7 @@ export function createPHPBom(path, options) { ); if (composerLockFiles.length) { // Look for any root composer.json to capture the parentComponent - if (existsSync(join(path, "composer.json"))) { + if (safeExistsSync(join(path, "composer.json"))) { const { moduleParent } = parseComposerJson(join(path, "composer.json")); parentComponent = moduleParent; } @@ -5225,7 +5231,7 @@ export function createPHPBom(path, options) { } let rootRequires = []; // Is there a composer.json to find the module parent component - if (existsSync(join(basePath, "composer.json"))) { + if (safeExistsSync(join(basePath, "composer.json"))) { const retMap = parseComposerJson(join(basePath, "composer.json")); moduleParent = retMap.moduleParent; rootRequires = retMap.rootRequires; @@ -5884,7 +5890,7 @@ export async function createCsharpBom(path, options) { join(path, options.depsSlicesFile) || join(getTmpDir(), "dosai.json"), ); // Create the slices file if it doesn't exist - if (!existsSync(slicesFile)) { + if (!safeExistsSync(slicesFile)) { const sliceResult = getDotnetSlices(resolve(path), resolve(slicesFile)); if (!sliceResult && DEBUG_MODE) { console.log( @@ -6745,9 +6751,9 @@ export async function createXBom(path, options) { return undefined; } if ( - existsSync(join(path, "package.json")) || - existsSync(join(path, "rush.json")) || - existsSync(join(path, "yarn.lock")) + safeExistsSync(join(path, "package.json")) || + safeExistsSync(join(path, "rush.json")) || + safeExistsSync(join(path, "yarn.lock")) ) { return await createNodejsBom(path, options); } @@ -6773,10 +6779,11 @@ export async function createXBom(path, options) { return await createJavaBom(path, options); } // python - const pipenvMode = existsSync(join(path, "Pipfile")); - const poetryMode = existsSync(join(path, "poetry.lock")); - const pyProjectMode = !poetryMode && existsSync(join(path, "pyproject.toml")); - const setupPyMode = existsSync(join(path, "setup.py")); + const pipenvMode = safeExistsSync(join(path, "Pipfile")); + const poetryMode = safeExistsSync(join(path, "poetry.lock")); + const pyProjectMode = + !poetryMode && safeExistsSync(join(path, "pyproject.toml")); + const setupPyMode = safeExistsSync(join(path, "setup.py")); if (pipenvMode || poetryMode || pyProjectMode || setupPyMode) { return await createPythonBom(path, options); } @@ -7111,7 +7118,7 @@ export async function createBom(path, options) { allLayersDir: path, allLayersExplodedDir: path, }; - if (existsSync(join(path, "all-layers"))) { + if (safeExistsSync(join(path, "all-layers"))) { exportData.allLayersDir = join(path, "all-layers"); } exportData.pkgPathList = getPkgPathList(exportData, undefined); diff --git a/lib/evinser/evinser.js b/lib/evinser/evinser.js index 96b8b2689..c24b52e7a 100644 --- a/lib/evinser/evinser.js +++ b/lib/evinser/evinser.js @@ -16,6 +16,8 @@ import { getMavenCommand, getTimestamp, getTmpDir, + safeExistsSync, + safeMkdirSync, } from "../helpers/utils.js"; import { postProcess } from "../stages/postgen/postgen.js"; import { createSemanticsSlices } from "./swiftsem.js"; @@ -29,16 +31,16 @@ const typePurlsCache = {}; * @param {Object} options Command line options */ export async function prepareDB(options) { - if (!options.dbPath.includes("memory") && !fs.existsSync(options.dbPath)) { + if (!options.dbPath.includes("memory") && !safeExistsSync(options.dbPath)) { try { - fs.mkdirSync(options.dbPath, { recursive: true }); + safeMkdirSync(options.dbPath, { recursive: true }); } catch (e) { // ignore } } const dirPath = options._[0] || "."; const bomJsonFile = options.input; - if (!fs.existsSync(bomJsonFile)) { + if (!safeExistsSync(bomJsonFile)) { console.log( "Bom file doesn't exist. Check if cdxgen was invoked with the correct type argument.", ); @@ -102,7 +104,7 @@ export async function catalogMavenDeps( options = {}, ) { let jarNSMapping = undefined; - if (fs.existsSync(path.join(dirPath, "bom.json.map"))) { + if (safeExistsSync(path.join(dirPath, "bom.json.map"))) { try { const mapData = JSON.parse( fs.readFileSync(path.join(dirPath, "bom.json.map"), "utf-8"), @@ -190,7 +192,7 @@ export async function createAndStoreSlice( ) { const retMap = createSlice(purl, purlsJars[purl], "usages", options); let sliceData = undefined; - if (retMap?.slicesFile && fs.existsSync(retMap.slicesFile)) { + if (retMap?.slicesFile && safeExistsSync(retMap.slicesFile)) { sliceData = await Usages.findOrCreate({ where: { purl }, defaults: { @@ -245,7 +247,7 @@ export async function createSlice( ); if (options?.output) { sliceOutputDir = - fs.existsSync(options.output) && + safeExistsSync(options.output) && fs.lstatSync(options.output).isDirectory() ? path.basename(options.output) : path.dirname(options.output); @@ -290,7 +292,7 @@ export async function createSlice( args.push(path.resolve(filePath)); const result = executeAtom(filePath, args); - if (!result || !fs.existsSync(slicesFile)) { + if (!result || !safeExistsSync(slicesFile)) { console.warn( `Unable to generate ${sliceType} slice using atom. Check if this is a supported language.`, ); @@ -378,7 +380,7 @@ export function initFromSbom(components, language) { } function usableSlicesFile(slicesFile) { - if (!slicesFile || !fs.existsSync(slicesFile)) { + if (!slicesFile || !safeExistsSync(slicesFile)) { return false; } const stats = fs.statSync(slicesFile); @@ -432,7 +434,7 @@ export async function analyzeProject(dbObjMap, options) { ); } else { retMap = await createSlice(language, dirPath, "reachables", options); - if (retMap?.slicesFile && fs.existsSync(retMap.slicesFile)) { + if (retMap?.slicesFile && safeExistsSync(retMap.slicesFile)) { reachablesSlicesFile = retMap.slicesFile; reachablesSlice = JSON.parse( fs.readFileSync(retMap.slicesFile, "utf-8"), @@ -453,7 +455,7 @@ export async function analyzeProject(dbObjMap, options) { } else { // Generate our own slices retMap = await createSlice(language, dirPath, "usages", options); - if (retMap?.slicesFile && fs.existsSync(retMap.slicesFile)) { + if (retMap?.slicesFile && safeExistsSync(retMap.slicesFile)) { usageSlice = JSON.parse(fs.readFileSync(retMap.slicesFile, "utf-8")); usagesSlicesFile = retMap.slicesFile; } @@ -463,7 +465,7 @@ export async function analyzeProject(dbObjMap, options) { // Reuse existing semantics slices if ( options.semanticsSlicesFile && - fs.existsSync(options.semanticsSlicesFile) + safeExistsSync(options.semanticsSlicesFile) ) { semanticsSlice = JSON.parse( fs.readFileSync(options.semanticsSlicesFile, "utf-8"), @@ -472,7 +474,7 @@ export async function analyzeProject(dbObjMap, options) { } else { // Generate our own slices retMap = await createSlice(language, dirPath, "semantics", options); - if (retMap?.slicesFile && fs.existsSync(retMap.slicesFile)) { + if (retMap?.slicesFile && safeExistsSync(retMap.slicesFile)) { semanticsSlice = JSON.parse( fs.readFileSync(retMap.slicesFile, "utf-8"), ); @@ -507,7 +509,7 @@ export async function analyzeProject(dbObjMap, options) { if (options.withDataFlow) { if ( options.dataFlowSlicesFile && - fs.existsSync(options.dataFlowSlicesFile) + safeExistsSync(options.dataFlowSlicesFile) ) { dataFlowSlicesFile = options.dataFlowSlicesFile; dataFlowSlice = JSON.parse( @@ -515,7 +517,7 @@ export async function analyzeProject(dbObjMap, options) { ); } else { retMap = await createSlice(language, dirPath, "data-flow", options); - if (retMap?.slicesFile && fs.existsSync(retMap.slicesFile)) { + if (retMap?.slicesFile && safeExistsSync(retMap.slicesFile)) { dataFlowSlicesFile = retMap.slicesFile; dataFlowSlice = JSON.parse(fs.readFileSync(retMap.slicesFile, "utf-8")); } @@ -1359,7 +1361,7 @@ export function createEvinseFile(sliceArtefacts, options) { bomJson.dependencies = newDependencies; } if (options.annotate) { - if (usagesSlicesFile && fs.existsSync(usagesSlicesFile)) { + if (usagesSlicesFile && safeExistsSync(usagesSlicesFile)) { bomJson.annotations.push({ subjects: [bomJson.serialNumber], annotator: { component: bomJson.metadata.tools.components[0] }, @@ -1367,7 +1369,7 @@ export function createEvinseFile(sliceArtefacts, options) { text: fs.readFileSync(usagesSlicesFile, "utf8"), }); } - if (dataFlowSlicesFile && fs.existsSync(dataFlowSlicesFile)) { + if (dataFlowSlicesFile && safeExistsSync(dataFlowSlicesFile)) { bomJson.annotations.push({ subjects: [bomJson.serialNumber], annotator: { component: bomJson.metadata.tools.components[0] }, @@ -1375,7 +1377,7 @@ export function createEvinseFile(sliceArtefacts, options) { text: fs.readFileSync(dataFlowSlicesFile, "utf8"), }); } - if (reachablesSlicesFile && fs.existsSync(reachablesSlicesFile)) { + if (reachablesSlicesFile && safeExistsSync(reachablesSlicesFile)) { bomJson.annotations.push({ subjects: [bomJson.serialNumber], annotator: { component: bomJson.metadata.tools.components[0] }, diff --git a/lib/helpers/envcontext.js b/lib/helpers/envcontext.js index 5434e571d..9ab8a252a 100644 --- a/lib/helpers/envcontext.js +++ b/lib/helpers/envcontext.js @@ -1,6 +1,5 @@ import { Buffer } from "node:buffer"; import { spawnSync } from "node:child_process"; -import { existsSync } from "node:fs"; import { arch, homedir } from "node:os"; import { delimiter, dirname, join } from "node:path"; import process from "node:process"; @@ -23,6 +22,7 @@ import { getTmpDir, isMac, isWin, + safeExistsSync, } from "./utils.js"; export const GIT_COMMAND = process.env.GIT_CMD || "git"; @@ -421,9 +421,9 @@ const getCommandOutput = (cmd, dir, args) => { export function isSdkmanAvailable() { let isSdkmanSetup = ["SDKMAN_DIR", "SDKMAN_CANDIDATES_DIR"].filter( - (v) => process.env[v] && existsSync(process.env[v]), + (v) => process.env[v] && safeExistsSync(process.env[v]), ).length >= 1; - if (!isSdkmanSetup && existsSync(join(homedir(), ".sdkman", "bin"))) { + if (!isSdkmanSetup && safeExistsSync(join(homedir(), ".sdkman", "bin"))) { process.env.SDKMAN_DIR = join(homedir(), ".sdkman"); process.env.SDKMAN_CANDIDATES_DIR = join( homedir(), @@ -462,12 +462,12 @@ export function isSdkmanToolAvailable(toolType, toolName) { toolName = getSdkmanToolFullname(toolName); let isToolAvailable = process.env.SDKMAN_CANDIDATES_DIR && - existsSync( + safeExistsSync( join(process.env.SDKMAN_CANDIDATES_DIR, toolType, toolName, "bin"), ); if ( !isToolAvailable && - existsSync( + safeExistsSync( join(homedir(), ".sdkman", "candidates", toolType, toolName, "bin"), ) ) { @@ -549,7 +549,7 @@ export function installSdkmanTool(toolType, toolName) { ); } else if ( process.env.SDKMAN_CANDIDATES_DIR && - existsSync(join(process.env.SDKMAN_CANDIDATES_DIR, toolType, toolName)) + safeExistsSync(join(process.env.SDKMAN_CANDIDATES_DIR, toolType, toolName)) ) { process.env[`${toolUpper}_HOME`] = join( process.env.SDKMAN_CANDIDATES_DIR, @@ -740,7 +740,7 @@ export function bundleInstallWithDocker(rubyVersion, cdxgenGemHome, filePath) { if (result.error || result.status !== 0) { return false; } - if (existsSync(join(filePath, "Gemfile.lock"))) { + if (safeExistsSync(join(filePath, "Gemfile.lock"))) { console.log( "Gemfile.lock was generated successfully. Thank you for trying this feature!", ); @@ -763,7 +763,7 @@ export function installRubyVersion(rubyVersion, filePath) { return { fullToolBinDir: undefined, status: true }; } const fullToolBinDir = rubyVersionDir(rubyVersion); - if (existsSync(fullToolBinDir)) { + if (safeExistsSync(fullToolBinDir)) { const result = spawnSync( process.env.RBENV_CMD || "rbenv", ["local", rubyVersion], @@ -861,7 +861,7 @@ export function installRubyBundler(rubyVersion, bundlerVersion) { bundlerWarningShown = true; } const fullToolBinDir = rubyVersionDir(rubyVersion); - if (existsSync(fullToolBinDir)) { + if (safeExistsSync(fullToolBinDir)) { const gemInstallArgs = ["install", "bundler"]; if (bundlerVersion) { gemInstallArgs.push("-v"); @@ -1038,7 +1038,7 @@ export function performBundleInstall( "This project requires a specific version of RubyGems. To do this, the existing version must be uninstalled followed by installing the required version. `sudo gem uninstall rubygems-update -v ` and then `sudo gem install rubygems-update -v `.", ); rubyVersionWarningShown = true; - if (existsSync(gemFileLock)) { + if (safeExistsSync(gemFileLock)) { console.log("Run `bundle install` command to troubleshoot the build."); } else { console.log( diff --git a/lib/helpers/utils.js b/lib/helpers/utils.js index 5dcfd7361..97b9115d0 100644 --- a/lib/helpers/utils.js +++ b/lib/helpers/utils.js @@ -75,6 +75,43 @@ if (isWin) { ATOM_DB = join(homedir(), "Library", "Application Support", ".atomdb"); } +/** + * Safely check if a file path exists without crashing due to a lack of permissions + * + * @param {String} filePath File path + * @Boolean True if the path exists. False otherwise + */ +export function safeExistsSync(filePath) { + if (isSecureMode && process.permission) { + if (!process.permission.has("fs.read", join(filePath, "", "*"))) { + if (DEBUG_MODE) { + console.log(`cdxgen lacks read permission for: ${filePath}`); + } + return false; + } + } + return existsSync(filePath); +} + +/** + * Safely create a directory without crashing due to a lack of permissions + * + * @param {String} filePath File path + * @param options {Options} mkdir options + * @Boolean True if the path exists. False otherwise + */ +export function safeMkdirSync(filePath, options) { + if (isSecureMode && process.permission) { + if (!process.permission.has("fs.write", join(filePath, "", "*"))) { + if (DEBUG_MODE) { + console.log(`cdxgen lacks write permission for: ${filePath}`); + } + return undefined; + } + } + return mkdirSync(filePath, options); +} + const licenseMapping = JSON.parse( readFileSync(join(dirNameStr, "data", "lic-mapping.json"), "utf-8"), ); @@ -186,8 +223,8 @@ export function getJavaCommand() { javaCmd = process.env.JAVA_CMD; } else if ( process.env.JAVA_HOME && - existsSync(process.env.JAVA_HOME) && - existsSync(join(process.env.JAVA_HOME, "bin", "java")) + safeExistsSync(process.env.JAVA_HOME) && + safeExistsSync(join(process.env.JAVA_HOME, "bin", "java")) ) { javaCmd = join(process.env.JAVA_HOME, "bin", "java"); } @@ -641,8 +678,11 @@ export function getTimestamp() { } export function getTmpDir() { - if (process.env.CDXGEN_TEMP_DIR && !existsSync(process.env.CDXGEN_TEMP_DIR)) { - mkdirSync(process.env.CDXGEN_TEMP_DIR, { recursive: true }); + if ( + process.env.CDXGEN_TEMP_DIR && + !safeExistsSync(process.env.CDXGEN_TEMP_DIR) + ) { + safeMkdirSync(process.env.CDXGEN_TEMP_DIR, { recursive: true }); } return process.env.CDXGEN_TEMP_DIR || tmpdir(); } @@ -862,7 +902,7 @@ export function addLicenseText(pkg, l, licenseContent) { licenseContentTypes, )) { const licenseFilepath = `${pkg.realPath}/${licenseFilename}${licenseName}${fileExtension}`; - if (existsSync(licenseFilepath)) { + if (safeExistsSync(licenseFilepath)) { licenseContent.text = readLicenseText( licenseFilepath, licenseContentType, @@ -977,7 +1017,7 @@ export async function getNpmMetadata(pkgList) { */ export async function parsePkgJson(pkgJsonFile, simple = false) { const pkgList = []; - if (existsSync(pkgJsonFile)) { + if (safeExistsSync(pkgJsonFile)) { try { const pkgData = JSON.parse(readFileSync(pkgJsonFile, "utf8")); const pkgIdentifier = parsePackageJsonName(pkgData.name); @@ -1070,7 +1110,7 @@ export async function parsePkgLock(pkgLockFile, options = {}) { options = {}; } const pkgSpecVersionCache = {}; - if (!existsSync(pkgLockFile)) { + if (!safeExistsSync(pkgLockFile)) { return { pkgList, dependenciesList, @@ -1491,7 +1531,7 @@ export async function parsePkgLock(pkgLockFile, options = {}) { let tree = undefined; try { const rootNodeModulesDir = join(path.dirname(pkgLockFile), "node_modules"); - if (existsSync(rootNodeModulesDir)) { + if (safeExistsSync(rootNodeModulesDir)) { if (options.deep) { console.log( `Constructing the actual dependency hierarchy from ${rootNodeModulesDir}.`, @@ -1656,7 +1696,7 @@ export async function parseYarnLock(yarnLockFile) { let pkgList = []; const dependenciesList = []; const depKeys = {}; - if (existsSync(yarnLockFile)) { + if (safeExistsSync(yarnLockFile)) { const lockData = readFileSync(yarnLockFile, "utf8"); let name = ""; let name_aliases = []; @@ -1885,7 +1925,7 @@ export async function parseYarnLock(yarnLockFile) { */ export async function parseNodeShrinkwrap(swFile) { const pkgList = []; - if (existsSync(swFile)) { + if (safeExistsSync(swFile)) { const lockData = JSON.parse(readFileSync(swFile, "utf8")); const pkgKeys = Object.keys(lockData); for (const k in pkgKeys) { @@ -2037,17 +2077,17 @@ async function getVersionNumPnpm(depPkg, relativePath) { const relativePkgJson = relativePath ? join(relativePath, version, "package.json") : join(version.replaceAll("../", "packages/"), "package.json"); - if (existsSync(relativePkgJson)) { + if (safeExistsSync(relativePkgJson)) { const importedComponentObj = await parsePkgJson(relativePkgJson, true); version = importedComponentObj[0].version; - } else if (existsSync(join(version, "package.json"))) { + } else if (safeExistsSync(join(version, "package.json"))) { const importedComponentObj = await parsePkgJson( join(version, "package.json"), true, ); version = importedComponentObj[0].version; } else if ( - existsSync(join(version.replaceAll("../", ""), "package.json")) + safeExistsSync(join(version.replaceAll("../", ""), "package.json")) ) { const importedComponentObj = await parsePkgJson( join(version.replaceAll("../", ""), "package.json"), @@ -2138,7 +2178,7 @@ export async function parsePnpmLock( null, ).toString(); } - if (existsSync(pnpmLock)) { + if (safeExistsSync(pnpmLock)) { const lockData = readFileSync(pnpmLock, "utf8"); const yamlObj = _load(lockData); if (!yamlObj) { @@ -2230,7 +2270,7 @@ export async function parsePnpmLock( let compPurl = undefined; let pkgSrcFile = undefined; let fallbackMode = true; - if (existsSync(join(importedComponentName, "package.json"))) { + if (safeExistsSync(join(importedComponentName, "package.json"))) { pkgSrcFile = join(importedComponentName, "package.json"); const importedComponentObj = await parsePkgJson(pkgSrcFile, true); if (importedComponentObj.length) { @@ -2855,7 +2895,7 @@ export async function parsePnpmLock( */ export async function parseBowerJson(bowerJsonFile) { const pkgList = []; - if (existsSync(bowerJsonFile)) { + if (safeExistsSync(bowerJsonFile)) { try { const pkgData = JSON.parse(readFileSync(bowerJsonFile, "utf8")); const pkgIdentifier = parsePackageJsonName(pkgData.name); @@ -2907,7 +2947,7 @@ export async function parseBowerJson(bowerJsonFile) { */ export async function parseMinJs(minJsFile) { const pkgList = []; - if (existsSync(minJsFile)) { + if (safeExistsSync(minJsFile)) { try { const rawData = readFileSync(minJsFile, { encoding: "utf-8" }); const tmpA = rawData.split("\n"); @@ -4761,7 +4801,7 @@ export async function parsePyLockData(lockData, lockFile, pyProjectFile) { // See if there is a pyproject.toml in the same directory pyProjectFile = join(dirname(lockFile), "pyproject.toml"); } - if (pyProjectFile && existsSync(pyProjectFile)) { + if (pyProjectFile && safeExistsSync(pyProjectFile)) { if (DEBUG_MODE) { console.log( `Parsing ${pyProjectFile} for dependencies and groups information.`, @@ -5365,7 +5405,7 @@ export async function getPyModules(src, epkgList, options) { options.depsSlicesFile || options.usagesSlicesFile, ); // Issue: 615 fix. Reuse existing slices file - if (slicesFile && existsSync(slicesFile)) { + if (slicesFile && safeExistsSync(slicesFile)) { const slicesData = JSON.parse(readFileSync(slicesFile, "utf-8")); if (slicesData && Object.keys(slicesData) && slicesData.modules) { modList = slicesData.modules; @@ -7459,7 +7499,7 @@ export async function parseCargoTomlData( } }; - if (!cargoTomlFile || !existsSync(cargoTomlFile)) { + if (!cargoTomlFile || !safeExistsSync(cargoTomlFile)) { return pkgList; } const cargoData = readFileSync(cargoTomlFile, { encoding: "utf-8" }); @@ -10008,7 +10048,7 @@ export function parseComposerLock(pkgLockFile, rootRequires) { rootRequiresMap[rr] = true; } } - if (existsSync(pkgLockFile)) { + if (safeExistsSync(pkgLockFile)) { let lockData = {}; try { lockData = JSON.parse(readFileSync(pkgLockFile, { encoding: "utf-8" })); @@ -10281,7 +10321,7 @@ export function parseSbtTree(sbtTreeFile) { */ export function parseSbtLock(pkgLockFile) { const pkgList = []; - if (existsSync(pkgLockFile)) { + if (safeExistsSync(pkgLockFile)) { const lockData = JSON.parse( readFileSync(pkgLockFile, { encoding: "utf-8" }), ); @@ -10704,7 +10744,7 @@ export function parseSwiftJsonTree(rawOutput, pkgFile) { */ export function parseSwiftResolved(resolvedFile) { const pkgList = []; - if (existsSync(resolvedFile)) { + if (safeExistsSync(resolvedFile)) { try { const pkgData = JSON.parse( readFileSync(resolvedFile, { encoding: "utf-8" }), @@ -10893,7 +10933,7 @@ export async function collectJarNS(jarPath, pomPathMap = {}) { let pomData = undefined; let purl = undefined; // In some cases, the pom name might be slightly different to the jar name - if (!existsSync(pomname)) { + if (!safeExistsSync(pomname)) { let searchDir = dirname(jf); // in case of gradle, there would be hash directory that is different for jar vs pom // so we need to start search from a level up @@ -10905,7 +10945,7 @@ export async function collectJarNS(jarPath, pomPathMap = {}) { pomname = pomSearch[0]; } } - if (existsSync(pomname)) { + if (safeExistsSync(pomname)) { // TODO: Replace with parsePom which contains pomPurl pomData = parsePomXml(readFileSync(pomname, { encoding: "utf-8" })); if (pomData) { @@ -11174,7 +11214,7 @@ export function encodeForPurl(s) { */ export function getPomPropertiesFromMavenDir(mavenDir) { let pomProperties = {}; - if (existsSync(mavenDir) && lstatSync(mavenDir).isDirectory()) { + if (safeExistsSync(mavenDir) && lstatSync(mavenDir).isDirectory()) { const pomPropertiesFiles = getAllFiles(mavenDir, "**/pom.properties"); if (pomPropertiesFiles?.length) { const pomPropertiesString = readFileSync(pomPropertiesFiles[0], { @@ -11227,14 +11267,14 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { } if ( pomname && - existsSync(pomname) && + safeExistsSync(pomname) && manifestname && - existsSync(manifestname) + safeExistsSync(manifestname) ) { tempDir = dirname(jarFile); } else if ( - !existsSync(join(tempDir, fname)) && - existsSync(jarFile) && + !safeExistsSync(join(tempDir, fname)) && + safeExistsSync(jarFile) && lstatSync(jarFile).isFile() ) { // Only copy if the file doesn't exist @@ -11255,7 +11295,7 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { jarFile.endsWith(".hpi") || jarFile.endsWith(".jar") ) { - if (existsSync(join(tempDir, fname))) { + if (safeExistsSync(join(tempDir, fname))) { try { const zip = new StreamZip.async({ file: join(tempDir, fname) }); await zip.extract(null, tempDir); @@ -11284,7 +11324,7 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { if (jarFiles?.length) { for (const jf of jarFiles) { // If the jar file doesn't exist at the point of use, skip it - if (!existsSync(jf)) { + if (!safeExistsSync(jf)) { if (DEBUG_MODE) { console.log(jf, jarFile, "is not a readable file."); } @@ -11308,7 +11348,7 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { let jarResult = { status: 1, }; - if (existsSync(pomname)) { + if (safeExistsSync(pomname)) { jarResult = { status: 0 }; } else { // Unzip natively @@ -11374,7 +11414,7 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { } } } - if ((!group || !name || !version) && existsSync(manifestFile)) { + if ((!group || !name || !version) && safeExistsSync(manifestFile)) { confidence = 0.8; const jarMetadata = parseJarManifest( readFileSync(manifestFile, { @@ -11496,7 +11536,7 @@ export async function extractJarArchive(jarFile, tempDir, jarNSMapping = {}) { } } try { - if (rmSync && existsSync(join(tempDir, "META-INF"))) { + if (rmSync && safeExistsSync(join(tempDir, "META-INF"))) { // Clean up META-INF rmSync(join(tempDir, "META-INF"), { recursive: true, @@ -11533,7 +11573,7 @@ export function determineSbtVersion(projectPath) { if (DEBUG_MODE) { console.log("Looking for", buildPropFile); } - if (existsSync(buildPropFile)) { + if (safeExistsSync(buildPropFile)) { const properties = propertiesReader(buildPropFile); const property = properties.get("sbt.version"); if (property != null && valid(property)) { @@ -11558,7 +11598,7 @@ export function determineSbtVersion(projectPath) { export function addPlugin(projectPath, plugin) { const pluginsFile = sbtPluginsPath(projectPath); let originalPluginsFile = null; - if (existsSync(pluginsFile)) { + if (safeExistsSync(pluginsFile)) { originalPluginsFile = `${pluginsFile}.cdxgen`; copyFileSync(pluginsFile, originalPluginsFile, constants.COPYFILE_FICLONE); } @@ -11576,11 +11616,11 @@ export function addPlugin(projectPath, plugin) { */ export function cleanupPlugin(projectPath, originalPluginsFile) { const pluginsFile = sbtPluginsPath(projectPath); - if (existsSync(pluginsFile)) { + if (safeExistsSync(pluginsFile)) { if (!originalPluginsFile) { // just remove the file, it was never there unlinkSync(pluginsFile); - return !existsSync(pluginsFile); + return !safeExistsSync(pluginsFile); } // Bring back the original file copyFileSync(originalPluginsFile, pluginsFile, constants.COPYFILE_FICLONE); @@ -11732,7 +11772,7 @@ export function getGradleCommand(srcPath, rootPath) { findGradleFile = "gradlew.bat"; } - if (existsSync(join(srcPath, findGradleFile))) { + if (safeExistsSync(join(srcPath, findGradleFile))) { // Use local gradle wrapper if available // Enable execute permission try { @@ -11741,7 +11781,7 @@ export function getGradleCommand(srcPath, rootPath) { // continue regardless of error } gradleCmd = resolve(join(srcPath, findGradleFile)); - } else if (rootPath && existsSync(join(rootPath, findGradleFile))) { + } else if (rootPath && safeExistsSync(join(rootPath, findGradleFile))) { // Check if the root directory has a wrapper script try { chmodSync(join(rootPath, findGradleFile), 0o775); @@ -11894,14 +11934,14 @@ export function getMavenCommand(srcPath, rootPath) { if (platform() === "win32") { findMavenFile = "mvnw.bat"; if ( - !existsSync(join(srcPath, findMavenFile)) && - existsSync(join(srcPath, "mvnw.cmd")) + !safeExistsSync(join(srcPath, findMavenFile)) && + safeExistsSync(join(srcPath, "mvnw.cmd")) ) { findMavenFile = "mvnw.cmd"; } } - if (existsSync(join(srcPath, findMavenFile))) { + if (safeExistsSync(join(srcPath, findMavenFile))) { // Use local maven wrapper if available // Enable execute permission try { @@ -11911,7 +11951,7 @@ export function getMavenCommand(srcPath, rootPath) { } mavenWrapperCmd = resolve(join(srcPath, findMavenFile)); isWrapperFound = true; - } else if (rootPath && existsSync(join(rootPath, findMavenFile))) { + } else if (rootPath && safeExistsSync(join(rootPath, findMavenFile))) { // Check if the root directory has a wrapper script try { chmodSync(join(rootPath, findMavenFile), 0o775); @@ -11972,7 +12012,7 @@ export function getAtomCommand() { "atom", "index.js", ); - if (existsSync(localAtom)) { + if (safeExistsSync(localAtom)) { return `${NODE_CMD} ${localAtom}`; } return "atom"; @@ -11980,7 +12020,7 @@ export function getAtomCommand() { export function executeAtom(src, args) { const cwd = - existsSync(src) && lstatSync(src).isDirectory() ? src : dirname(src); + safeExistsSync(src) && lstatSync(src).isDirectory() ? src : dirname(src); let ATOM_BIN = getAtomCommand(); let isSupported = true; if (ATOM_BIN.includes(" ")) { @@ -12109,7 +12149,7 @@ export function findAppModules( resolve(src), ]; executeAtom(src, args); - if (existsSync(slicesFile)) { + if (safeExistsSync(slicesFile)) { const slicesData = JSON.parse(readFileSync(slicesFile, "utf-8"), { encoding: "utf-8", }); @@ -12197,16 +12237,20 @@ function get_python_command_from_env(env) { let python_cmd_to_use = PYTHON_CMD; if (env.VIRTUAL_ENV) { const bin_dir = isWin ? "Scripts" : "bin"; - if (existsSync(join(env.VIRTUAL_ENV, bin_dir, python_exe_name))) { + if (safeExistsSync(join(env.VIRTUAL_ENV, bin_dir, python_exe_name))) { python_cmd_to_use = join(env.VIRTUAL_ENV, bin_dir, python_exe_name); - } else if (existsSync(join(env.VIRTUAL_ENV, bin_dir, python3_exe_name))) { + } else if ( + safeExistsSync(join(env.VIRTUAL_ENV, bin_dir, python3_exe_name)) + ) { python_cmd_to_use = join(env.VIRTUAL_ENV, bin_dir, python3_exe_name); } } else if (env.CONDA_PREFIX) { const bin_dir = isWin ? "" : "bin"; - if (existsSync(join(env.CONDA_PREFIX, bin_dir, python_exe_name))) { + if (safeExistsSync(join(env.CONDA_PREFIX, bin_dir, python_exe_name))) { python_cmd_to_use = join(env.CONDA_PREFIX, bin_dir, python_exe_name); - } else if (existsSync(join(env.CONDA_PREFIX, bin_dir, python3_exe_name))) { + } else if ( + safeExistsSync(join(env.CONDA_PREFIX, bin_dir, python3_exe_name)) + ) { python_cmd_to_use = join(env.CONDA_PREFIX, bin_dir, python3_exe_name); } } else if (env.CONDA_PYTHON_EXE) { @@ -13002,7 +13046,7 @@ export async function addEvidenceForImports( break; } } - if (localNodeModulesPath && existsSync(localNodeModulesPath)) { + if (localNodeModulesPath && safeExistsSync(localNodeModulesPath)) { const lnmPkgList = await parsePkgJson(localNodeModulesPath, true); if (lnmPkgList && lnmPkgList.length === 1) { const lnmMetadata = lnmPkgList[0]; @@ -13457,7 +13501,7 @@ export function getCppModules(src, options, osPkgsList, epkgList) { }); // Let's look for any vcpkg.json file to tell us about the directory we're scanning // users can use this file to give us a clue even if they do not use vcpkg library manager - if (existsSync(join(src, "vcpkg.json"))) { + if (safeExistsSync(join(src, "vcpkg.json"))) { const vcPkgData = JSON.parse( readFileSync(join(src, "vcpkg.json"), { encoding: "utf-8" }), ); @@ -13541,7 +13585,7 @@ export function getCppModules(src, options, osPkgsList, epkgList) { } } } // if - } else if (existsSync(join(src, "CMakeLists.txt"))) { + } else if (safeExistsSync(join(src, "CMakeLists.txt"))) { const retMap = parseCmakeLikeFile(join(src, "CMakeLists.txt"), pkgType); if (retMap.parentComponent && Object.keys(retMap.parentComponent).length) { parentComponent = retMap.parentComponent; @@ -13564,7 +13608,7 @@ export function getCppModules(src, options, osPkgsList, epkgList) { parentComponent.purl = parentPurl; parentComponent["bom-ref"] = decodeURIComponent(parentPurl); } - if (options.usagesSlicesFile && existsSync(options.usagesSlicesFile)) { + if (options.usagesSlicesFile && safeExistsSync(options.usagesSlicesFile)) { sliceData = JSON.parse( readFileSync(options.usagesSlicesFile, { encoding: "utf-8" }), ); @@ -13592,8 +13636,8 @@ export function getCppModules(src, options, osPkgsList, epkgList) { if ( group.startsWith(".") || group.startsWith(_sep) || - existsSync(resolve(afile)) || - existsSync(resolve(src, afile)) + safeExistsSync(resolve(afile)) || + safeExistsSync(resolve(src, afile)) ) { group = ""; } @@ -14017,7 +14061,7 @@ export function addEvidenceForDotnet(pkgList, slicesFile) { // We need two datastructures. // dll to purl mapping from the pkgList // purl to occurrences list using the slicesFile - if (!slicesFile || !existsSync(slicesFile)) { + if (!slicesFile || !safeExistsSync(slicesFile)) { return pkgList; } const pkgFilePurlMap = {}; diff --git a/lib/managers/binary.js b/lib/managers/binary.js index 6391b976d..83a05ed3b 100644 --- a/lib/managers/binary.js +++ b/lib/managers/binary.js @@ -3,7 +3,6 @@ import { spawnSync } from "node:child_process"; import { existsSync, lstatSync, - mkdirSync, mkdtempSync, readFileSync, rmSync, @@ -21,6 +20,7 @@ import { findLicenseId, getTmpDir, isSpdxLicenseExpression, + safeMkdirSync, } from "../helpers/utils.js"; import { URL } from "node:url"; @@ -364,8 +364,8 @@ export function getOSPackages(src) { let imageType = "image"; const trivyCacheDir = join(homedir(), ".cache", "trivy"); try { - mkdirSync(join(trivyCacheDir, "db"), { recursive: true }); - mkdirSync(join(trivyCacheDir, "java-db"), { recursive: true }); + safeMkdirSync(join(trivyCacheDir, "db"), { recursive: true }); + safeMkdirSync(join(trivyCacheDir, "java-db"), { recursive: true }); } catch (err) { // ignore errors } diff --git a/lib/managers/docker.js b/lib/managers/docker.js index fbaa3d630..abae8117d 100644 --- a/lib/managers/docker.js +++ b/lib/managers/docker.js @@ -2,9 +2,7 @@ import { Buffer } from "node:buffer"; import { spawnSync } from "node:child_process"; import { createReadStream, - existsSync, lstatSync, - mkdirSync, mkdtempSync, readFileSync, readdirSync, @@ -19,7 +17,13 @@ import { parse } from "node:url"; import { globSync } from "glob"; import got from "got"; import { x } from "tar"; -import { DEBUG_MODE, getAllFiles, getTmpDir } from "../helpers/utils.js"; +import { + DEBUG_MODE, + getAllFiles, + getTmpDir, + safeExistsSync, + safeMkdirSync, +} from "../helpers/utils.js"; export const isWin = _platform() === "win32"; export const DOCKER_HUB_REGISTRY = "docker.io"; @@ -48,7 +52,7 @@ if ( !process.env.DOCKER_HOST && (process.env.CONTAINERD_ADDRESS || (process.env.XDG_RUNTIME_DIR && - existsSync( + safeExistsSync( join(process.env.XDG_RUNTIME_DIR, "containerd-rootless", "api.sock"), ))) ) { @@ -98,7 +102,7 @@ export function detectRancherDesktop() { "limactl", ); // Is Rancher Desktop running - if (existsSync(limactl) || existsSync(limaHome)) { + if (safeExistsSync(limactl) || safeExistsSync(limaHome)) { const result = spawnSync("rdctl", ["list-settings"], { encoding: "utf-8", }); @@ -152,7 +156,7 @@ function flatten(lists) { } function getDirectories(srcpath) { - if (existsSync(srcpath)) { + if (safeExistsSync(srcpath)) { return readdirSync(srcpath) .map((file) => join(srcpath, file)) .filter((path) => { @@ -173,7 +177,7 @@ export const getOnlyDirs = (srcpath, dirName) => { getDirectories(srcpath) .map((p) => { try { - if (existsSync(p)) { + if (safeExistsSync(p)) { if (lstatSync(p).isDirectory()) { return getOnlyDirs(p, dirName); } @@ -236,7 +240,7 @@ const getDefaultOptions = (forRegistry) => { ), }; } - if (!authTokenSet && existsSync(join(DOCKER_CONFIG, "config.json"))) { + if (!authTokenSet && safeExistsSync(join(DOCKER_CONFIG, "config.json"))) { const configData = readFileSync( join(DOCKER_CONFIG, "config.json"), "utf-8", @@ -896,7 +900,7 @@ export const extractTar = async (fullImageName, dir, options) => { * Returns the location of the layers with additional packages related metadata */ export const exportArchive = async (fullImageName, options = {}) => { - if (!existsSync(fullImageName)) { + if (!safeExistsSync(fullImageName)) { console.log(`Unable to find container image archive ${fullImageName}`); return undefined; } @@ -904,12 +908,12 @@ export const exportArchive = async (fullImageName, options = {}) => { const tempDir = mkdtempSync(join(getTmpDir(), "docker-images-")); const allLayersExplodedDir = join(tempDir, "all-layers"); const blobsDir = join(tempDir, "blobs", "sha256"); - mkdirSync(allLayersExplodedDir); + safeMkdirSync(allLayersExplodedDir); const manifestFile = join(tempDir, "manifest.json"); try { await extractTar(fullImageName, tempDir, options); // podman use blobs dir - if (existsSync(blobsDir)) { + if (safeExistsSync(blobsDir)) { if (DEBUG_MODE) { console.log( `Image archive ${fullImageName} successfully exported to directory ${tempDir}`, @@ -934,7 +938,7 @@ export const exportArchive = async (fullImageName, options = {}) => { exportData.pkgPathList = getPkgPathList(exportData, lastWorkingDir); return exportData; } - if (existsSync(manifestFile)) { + if (safeExistsSync(manifestFile)) { // docker manifest file return await extractFromManifest( manifestFile, @@ -985,7 +989,7 @@ export const extractFromManifest = async ( } } const layers = manifest[manifest.length - 1]["Layers"] || []; - if (!layers.length && existsSync(tempDir)) { + if (!layers.length && safeExistsSync(tempDir)) { const blobFiles = readdirSync(join(tempDir, "blobs", "sha256")); if (blobFiles?.length) { for (const blobf of blobFiles) { @@ -1031,7 +1035,7 @@ export const extractFromManifest = async ( lastLayer.replace("layer.tar", "json"), ); } - if (lastLayerConfigFile && existsSync(lastLayerConfigFile)) { + if (lastLayerConfigFile && safeExistsSync(lastLayerConfigFile)) { try { lastLayerConfig = JSON.parse( readFileSync(lastLayerConfigFile, { @@ -1067,7 +1071,7 @@ export const exportImage = async (fullImageName, options) => { if ( !fullImageName || fullImageName === "." || - existsSync(resolve(fullImageName)) + safeExistsSync(resolve(fullImageName)) ) { return undefined; } @@ -1175,10 +1179,10 @@ export const exportImage = async (fullImageName, options) => { } } // Continue with extracting the layers - if (existsSync(tempDir)) { - if (existsSync(manifestFile)) { + if (safeExistsSync(tempDir)) { + if (safeExistsSync(manifestFile)) { // This is fine - } else if (existsSync(manifestIndexFile)) { + } else if (safeExistsSync(manifestIndexFile)) { manifestFile = manifestIndexFile; } else { console.log( @@ -1191,7 +1195,7 @@ export const exportImage = async (fullImageName, options) => { `Image ${fullImageName} successfully exported to directory ${tempDir}`, ); } - mkdirSync(allLayersExplodedDir); + safeMkdirSync(allLayersExplodedDir); return await extractFromManifest( manifestFile, localData, @@ -1237,16 +1241,16 @@ export const getPkgPathList = (exportData, lastWorkingDir) => { join(allLayersExplodedDir, "/var/lib"), ]; } - if (existsSync(join(allLayersDir, "Files"))) { + if (safeExistsSync(join(allLayersDir, "Files"))) { knownSysPaths.push(join(allLayersDir, "Files")); } /* // Too slow - if (fs.existsSync(path.join(allLayersDir, "Users"))) { + if (safeExistsSync(path.join(allLayersDir, "Users"))) { knownSysPaths.push(path.join(allLayersDir, "Users")); } */ - if (existsSync(join(allLayersDir, "ProgramData"))) { + if (safeExistsSync(join(allLayersDir, "ProgramData"))) { knownSysPaths.push(join(allLayersDir, "ProgramData")); } const pyInstalls = getDirs(allLayersDir, "Python*/", false, false); diff --git a/package.json b/package.json index 062dec70f..e32664db1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "11.1.6", + "version": "11.1.7", "description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image", "homepage": "http://github.com/cyclonedx/cdxgen", "author": "Prabhu Subramanian ", @@ -89,7 +89,7 @@ "packageurl-js": "1.0.2", "prettify-xml": "^1.2.0", "properties-reader": "^2.3.0", - "semver": "^7.6.3", + "semver": "^7.7.0", "ssri": "^12.0.0", "table": "^6.9.0", "tar": "^7.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e4969703..1a5c218e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,8 +73,8 @@ importers: specifier: ^2.3.0 version: 2.3.0 semver: - specifier: ^7.6.3 - version: 7.6.3 + specifier: ^7.7.0 + version: 7.7.0 ssri: specifier: ^12.0.0 version: 12.0.0 @@ -102,7 +102,7 @@ importers: version: 1.9.4 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.10.10) + version: 29.7.0(@types/node@22.13.0) typescript: specifier: ^5.7.2 version: 5.7.3 @@ -591,8 +591,8 @@ packages: resolution: {integrity: sha512-3pPbese0fbCiFJ/7/X1GBgxAKYFE8sxBddA7GtuRmOgNseH4YbGsXJ807Ig3AEwNITjDUISHglvy89cyDJnAwA==} engines: {node: ^18.17.0 || >=20.5.0} - '@npmcli/redact@3.0.0': - resolution: {integrity: sha512-/1uFzjVcfzqrgCeGW7+SZ4hv0qLWmKXVzFahZGJ6QuJBj6Myt9s17+JL86i76NV9YSnJRcGXJYQbAU0rn1YTCQ==} + '@npmcli/redact@3.1.1': + resolution: {integrity: sha512-3Hc2KGIkrvJWJqTbvueXzBeZlmvoOxc2jyX00yzr3+sNFquJg0N8hH4SAPLPVrkWIRQICVpVgjrss971awXVnA==} engines: {node: ^18.17.0 || >=20.5.0} '@npmcli/run-script@9.0.2': @@ -684,8 +684,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@22.10.10': - resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==} + '@types/node@22.13.0': + resolution: {integrity: sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -883,8 +883,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001695: - resolution: {integrity: sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw==} + caniuse-lite@1.0.30001696: + resolution: {integrity: sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -916,8 +916,8 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cjs-module-lexer@1.4.1: - resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} @@ -1104,8 +1104,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.88: - resolution: {integrity: sha512-K3C2qf1o+bGzbilTDCTBhTQcMS9KW60yTAaTeeXsfvQuTDDwlokLam/AdqlqcSy9u4UainDgsHV23ksXAOgamw==} + electron-to-chromium@1.5.90: + resolution: {integrity: sha512-C3PN4aydfW91Natdyd449Kw+BzhLmof6tzy5W1pFC5SpQxVXT+oyiyOG9AgYYSN9OdA/ik3YkCrpwqI8ug5Tug==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -1837,8 +1837,8 @@ packages: engines: {node: '>=10'} hasBin: true - moment-timezone@0.5.46: - resolution: {integrity: sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw==} + moment-timezone@0.5.47: + resolution: {integrity: sha512-UbNt/JAWS0m/NJOebR0QMRHBk0hu03r5dx9GK8Cs0AS3I81yDcOc9k+DytPItgVvBP7J6Mf6U2n3BPAacAV9oA==} moment@2.30.1: resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} @@ -1859,8 +1859,8 @@ packages: resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} engines: {node: '>= 0.6'} - node-abi@3.73.0: - resolution: {integrity: sha512-z8iYzQGBu35ZkTQ9mtR8RqugJZ9RCLn8fv3d7LsgDBzOijGQP3RdKTX4LA7LXw03ZhU5z0l4xfhIMgSES31+cg==} + node-abi@3.74.0: + resolution: {integrity: sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==} engines: {node: '>=10'} node-addon-api@7.1.1: @@ -2220,8 +2220,8 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + semver@7.7.0: + resolution: {integrity: sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==} engines: {node: '>=10'} hasBin: true @@ -2963,7 +2963,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2976,14 +2976,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.10) + jest-config: 29.7.0(@types/node@22.13.0) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -3008,7 +3008,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -3026,7 +3026,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.10.10 + '@types/node': 22.13.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3048,7 +3048,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3118,7 +3118,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.10.10 + '@types/node': 22.13.0 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -3170,7 +3170,7 @@ snapshots: '@npmcli/node-gyp': 4.0.0 '@npmcli/package-json': 6.1.1 '@npmcli/query': 4.0.0 - '@npmcli/redact': 3.0.0 + '@npmcli/redact': 3.1.1 '@npmcli/run-script': 9.0.2 bin-links: 5.0.0 cacache: 19.0.1 @@ -3191,7 +3191,7 @@ snapshots: promise-all-reject-late: 1.0.1 promise-call-limit: 3.0.2 read-package-json-fast: 4.0.0 - semver: 7.6.3 + semver: 7.7.0 ssri: 12.0.0 treeverse: 3.0.0 walk-up-path: 4.0.0 @@ -3201,11 +3201,11 @@ snapshots: '@npmcli/fs@3.1.1': dependencies: - semver: 7.6.3 + semver: 7.7.0 '@npmcli/fs@4.0.0': dependencies: - semver: 7.6.3 + semver: 7.7.0 '@npmcli/git@6.0.1': dependencies: @@ -3216,7 +3216,7 @@ snapshots: proc-log: 5.0.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.6.3 + semver: 7.7.0 which: 5.0.0 transitivePeerDependencies: - bluebird @@ -3241,7 +3241,7 @@ snapshots: json-parse-even-better-errors: 4.0.0 pacote: 20.0.0 proc-log: 5.0.0 - semver: 7.6.3 + semver: 7.7.0 transitivePeerDependencies: - bluebird - supports-color @@ -3257,7 +3257,7 @@ snapshots: hosted-git-info: 8.0.2 json-parse-even-better-errors: 4.0.0 proc-log: 5.0.0 - semver: 7.6.3 + semver: 7.7.0 validate-npm-package-license: 3.0.4 transitivePeerDependencies: - bluebird @@ -3270,7 +3270,7 @@ snapshots: dependencies: postcss-selector-parser: 6.1.2 - '@npmcli/redact@3.0.0': {} + '@npmcli/redact@3.1.1': {} '@npmcli/run-script@9.0.2': dependencies: @@ -3369,7 +3369,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.13.0 '@types/http-cache-semantics@4.0.4': {} @@ -3386,7 +3386,7 @@ snapshots: '@types/ms@2.1.0': optional: true - '@types/node@22.10.10': + '@types/node@22.13.0': dependencies: undici-types: 6.20.0 @@ -3567,8 +3567,8 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001695 - electron-to-chromium: 1.5.88 + caniuse-lite: 1.0.30001696 + electron-to-chromium: 1.5.90 node-releases: 2.0.19 update-browserslist-db: 1.1.2(browserslist@4.24.4) @@ -3649,7 +3649,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001695: {} + caniuse-lite@1.0.30001696: {} chalk@4.1.2: dependencies: @@ -3690,7 +3690,7 @@ snapshots: ci-info@3.9.0: {} - cjs-module-lexer@1.4.1: {} + cjs-module-lexer@1.4.3: {} clean-stack@2.2.0: {} @@ -3749,13 +3749,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.10.10): + create-jest@29.7.0(@types/node@22.13.0): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.10) + jest-config: 29.7.0(@types/node@22.13.0) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3875,7 +3875,7 @@ snapshots: ee-first@1.1.1: optional: true - electron-to-chromium@1.5.88: {} + electron-to-chromium@1.5.90: {} emittery@0.13.1: {} @@ -4075,7 +4075,7 @@ snapshots: es6-error: 4.1.1 matcher: 3.0.0 roarr: 2.15.4 - semver: 7.6.3 + semver: 7.7.0 serialize-error: 7.0.1 globals@11.12.0: {} @@ -4242,7 +4242,7 @@ snapshots: '@babel/parser': 7.26.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.3 + semver: 7.7.0 transitivePeerDependencies: - supports-color @@ -4281,7 +4281,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4301,16 +4301,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.10.10): + jest-cli@29.7.0(@types/node@22.13.0): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.10) + create-jest: 29.7.0(@types/node@22.13.0) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.10) + jest-config: 29.7.0(@types/node@22.13.0) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4320,7 +4320,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.10.10): + jest-config@29.7.0(@types/node@22.13.0): dependencies: '@babel/core': 7.26.7 '@jest/test-sequencer': 29.7.0 @@ -4345,7 +4345,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.10 + '@types/node': 22.13.0 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4374,7 +4374,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4384,7 +4384,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.10.10 + '@types/node': 22.13.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4423,7 +4423,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4458,7 +4458,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4486,9 +4486,9 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 - cjs-module-lexer: 1.4.1 + cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 glob: 11.0.1 graceful-fs: 4.2.11 @@ -4525,14 +4525,14 @@ snapshots: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.3 + semver: 7.7.0 transitivePeerDependencies: - supports-color jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4551,7 +4551,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.10 + '@types/node': 22.13.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4560,17 +4560,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.10.10 + '@types/node': 22.13.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.10.10): + jest@29.7.0(@types/node@22.13.0): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.10) + jest-cli: 29.7.0(@types/node@22.13.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4661,7 +4661,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.6.3 + semver: 7.7.0 make-fetch-happen@13.0.1: dependencies: @@ -4806,7 +4806,7 @@ snapshots: mkdirp@3.0.1: {} - moment-timezone@0.5.46: + moment-timezone@0.5.47: dependencies: moment: 2.30.1 optional: true @@ -4826,9 +4826,9 @@ snapshots: negotiator@0.6.4: {} - node-abi@3.73.0: + node-abi@3.74.0: dependencies: - semver: 7.6.3 + semver: 7.7.0 optional: true node-addon-api@7.1.1: @@ -4843,7 +4843,7 @@ snapshots: make-fetch-happen: 13.0.1 nopt: 7.2.1 proc-log: 4.2.0 - semver: 7.6.3 + semver: 7.7.0 tar: 6.2.1 which: 4.0.0 transitivePeerDependencies: @@ -4873,7 +4873,7 @@ snapshots: npm-install-checks@7.1.1: dependencies: - semver: 7.6.3 + semver: 7.7.0 npm-normalize-package-bin@4.0.0: {} @@ -4881,7 +4881,7 @@ snapshots: dependencies: hosted-git-info: 8.0.2 proc-log: 5.0.0 - semver: 7.6.3 + semver: 7.7.0 validate-npm-package-name: 6.0.0 npm-packlist@9.0.0: @@ -4893,11 +4893,11 @@ snapshots: npm-install-checks: 7.1.1 npm-normalize-package-bin: 4.0.0 npm-package-arg: 12.0.1 - semver: 7.6.3 + semver: 7.7.0 npm-registry-fetch@18.0.2: dependencies: - '@npmcli/redact': 3.0.0 + '@npmcli/redact': 3.1.1 jsonparse: 1.3.1 make-fetch-happen: 14.0.3 minipass: 7.1.2 @@ -5068,7 +5068,7 @@ snapshots: minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 2.0.0 - node-abi: 3.73.0 + node-abi: 3.74.0 pump: 3.0.2 rc: 1.2.8 simple-get: 4.0.1 @@ -5209,7 +5209,7 @@ snapshots: semver@6.3.1: {} - semver@7.6.3: {} + semver@7.7.0: {} sequelize-pool@7.1.0: optional: true @@ -5223,10 +5223,10 @@ snapshots: inflection: 1.13.4 lodash: 4.17.21 moment: 2.30.1 - moment-timezone: 0.5.46 + moment-timezone: 0.5.47 pg-connection-string: 2.7.0 retry-as-promised: 7.0.4 - semver: 7.6.3 + semver: 7.7.0 sequelize-pool: 7.1.0 toposort-class: 1.0.1 uuid: 8.3.2 @@ -5617,7 +5617,7 @@ snapshots: wkx@0.5.0: dependencies: - '@types/node': 22.10.10 + '@types/node': 22.13.0 optional: true wrap-ansi@7.0.0: diff --git a/types/lib/cli/index.d.ts.map b/types/lib/cli/index.d.ts.map index fa492a9e2..ef4a20ec4 100644 --- a/types/lib/cli/index.d.ts.map +++ b/types/lib/cli/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AAsxBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAuXD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAs7BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAusBhB;AAED;;;;;;;;;;GAUG;AACH,+DAsEC;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA+dhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BA+YhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAkEhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,8BAqDhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BA6FhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAmUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAiJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqNhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAkahB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;AAED;;;;;;GAMG;AACH,yDA+FC;AAED;;;;;;;;;GASG;AACH,2GA6BC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,EAAE,8BA2iBlB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAgUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBA8OhB;AAED;;;;;;GAMG;AACH,wDAFY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CAwHxE"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/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GASG;AACH,2GA6BC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,EAAE,8BA2iBlB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAiUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBA8OhB;AAED;;;;;;GAMG;AACH,wDAFY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CAwHxE"} \ No newline at end of file diff --git a/types/lib/helpers/utils.d.ts b/types/lib/helpers/utils.d.ts index f44b18a30..05edbfadb 100644 --- a/types/lib/helpers/utils.d.ts +++ b/types/lib/helpers/utils.d.ts @@ -1,3 +1,18 @@ +/** + * Safely check if a file path exists without crashing due to a lack of permissions + * + * @param {String} filePath File path + * @Boolean True if the path exists. False otherwise + */ +export function safeExistsSync(filePath: string): boolean; +/** + * Safely create a directory without crashing due to a lack of permissions + * + * @param {String} filePath File path + * @param options {Options} mkdir options + * @Boolean True if the path exists. False otherwise + */ +export function safeMkdirSync(filePath: string, options: Options): string; export function shouldFetchLicense(): boolean; export function shouldFetchVCS(): boolean; export function getJavaCommand(): string; diff --git a/types/lib/helpers/utils.d.ts.map b/types/lib/helpers/utils.d.ts.map index 520ed888e..e366532a3 100644 --- a/types/lib/helpers/utils.d.ts.map +++ b/types/lib/helpers/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/helpers/utils.js"],"names":[],"mappings":"AAsJA,8CAKC;AAED,0CAIC;AAqBD,yCAYC;AAED,2CAQC;AAoND;;;;;;;GAOG;AACH,4EAiBC;AAED;;;;;;GAMG;AACH,mGA2EC;AAED;;;;;;;;GAQG;AACH,yGASC;AAgBD;;;;;;GAMG;AACH,qCAJW,MAAM,WACN,MAAM,2BA8BhB;AAED;;;;;;GAMG;AACH,+CAJW,MAAM,WACN,MAAM,+BAoBhB;AAYD;;;;GAIG;AACH,gCA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;AAGnE,gCACsE;AAGtE,8BAA+B;AAK/B,4CAEmE;AAGnE,6CAEE;AAgBF,oCAAkD;AAGlD,uCAEuD;AAYvD,8BAAyC;AAczC,gCAA6C;AAU7C,8BAAiC;AAIjC,4BAA6B;AAI7B,2BAA2B;AAI3B,4BAA6B;AAI7B,2BAA2B;AAI3B,6BAA+B;AAI/B,0BAAyB;AAIzB,6BAA+B;AAM/B,2BAA2B;AAK3B,4BAA6B;AAK7B,mCAAoC;AAOpC,gDAC2D;AAE3D,2BAAuD;AAGvD,kDAWE;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqIE;;;;AA8IF,8BAQG;AA8xLH,8CAUE"} \ No newline at end of file +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/helpers/utils.js"],"names":[],"mappings":"AA6EA;;;;;GAKG;AACH,0DAUC;AAED;;;;;;GAMG;AACH,yDAHmB,OAAO,UAazB;AA2ED,8CAKC;AAED,0CAIC;AAqBD,yCAYC;AAED,2CAQC;AAoND;;;;;;;GAOG;AACH,4EAiBC;AAED;;;;;;GAMG;AACH,mGA2EC;AAED;;;;;;;;GAQG;AACH,yGASC;AAgBD;;;;;;GAMG;AACH,qCAJW,MAAM,WACN,MAAM,2BA8BhB;AAED;;;;;;GAMG;AACH,+CAJW,MAAM,WACN,MAAM,+BAoBhB;AAYD;;;;GAIG;AACH,gCAFa,MAAM,CAIlB;AAED,iCAQC;AAED;;;;;;IAMI;AACJ,iDAJW,MAAM,GACJ,OAAO,CAWnB;AAED;;;;;;;;;GASG;AACH,iEA2BC;AAED;;;;;GAKG;AACH,6CAqDC;AAED;;;;;;GAMG;AACH,sEA0DC;AAED;;;;GAIG;AACH,4EAoCC;AAED;;;GAGG;AACH;;EAUC;AAED,sEA0BC;AAED;;;;GAIG;AACH,+DA4CC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,WACN,OAAO,kBAkFjB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,YACN,MAAM;;;GA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;;;;;EAqIE;;;;AA8IF,8BAQG;AAiyLH,8CAUE"} \ No newline at end of file diff --git a/types/lib/managers/docker.d.ts.map b/types/lib/managers/docker.d.ts.map index 6090d2909..7bd70d29a 100644 --- a/types/lib/managers/docker.d.ts.map +++ b/types/lib/managers/docker.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AA2EA;;GAEG;AACH,4CA6CC;AApGD,4BAA6C;AAC7C,kCAAmC,WAAW,CAAC;AAkCxC,kDAeN;AA6DM,iCAHI,MAAM,WACN,MAAM,iDAehB;AAqBM,6DAmBN;AAgLM,4EAsGN;AAEM,oFAwBN;AAUM;;;;;;;;EAwEN;AAsBM,2DA6KN;AAgBM,yFA2GN;AAMM;;;;;;;;;;;;;GAwDN;AAEM;;;;;;;GAuGN;AAMM,4EA4IN;AAKM,4EAmGN;AAEM,+EAMN;AAEM,4EAyCN;AAEM,iFA0BN"} \ No newline at end of file +{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AA+EA;;GAEG;AACH,4CA6CC;AApGD,4BAA6C;AAC7C,kCAAmC,WAAW,CAAC;AAkCxC,kDAeN;AA6DM,iCAHI,MAAM,WACN,MAAM,iDAehB;AAqBM,6DAmBN;AAgLM,4EAsGN;AAEM,oFAwBN;AAUM;;;;;;;;EAwEN;AAsBM,2DA6KN;AAgBM,yFA2GN;AAMM;;;;;;;;;;;;;GAwDN;AAEM;;;;;;;GAuGN;AAMM,4EA4IN;AAKM,4EAmGN;AAEM,+EAMN;AAEM,4EAyCN;AAEM,iFA0BN"} \ No newline at end of file