Initial curated CertScope source from fe2bbe3ca5c98bf64be26a09c6c58ee805a7f87e
This commit is contained in:
commit
7348faf6c0
65 files changed
+12509
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { writeFile } from "node:fs/promises";
|
||||
|
||||
const npmArgs = [
|
||||
"sbom",
|
||||
"--package-lock-only",
|
||||
"--omit=dev",
|
||||
"--sbom-format=cyclonedx",
|
||||
"--sbom-type=application",
|
||||
];
|
||||
const command = process.platform === "win32" ? (process.env.ComSpec || "cmd.exe") : "npm";
|
||||
const commandArgs = process.platform === "win32" ? ["/d", "/s", "/c", "npm.cmd " + npmArgs.join(" ")] : npmArgs;
|
||||
const output = execFileSync(command, commandArgs, { encoding: "utf8", stdio: ["ignore", "pipe", "inherit"] });
|
||||
|
||||
await writeFile("certscope-sbom.cdx.json", output, "utf8");
|
||||
console.log("Wrote certscope-sbom.cdx.json");
|
||||
Reference in new issue
Block a user