chore: initialize from frontend template 4dc033c
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { mkdir } from "node:fs/promises";
|
||||
|
||||
import {
|
||||
supplyChainCoherenceReportSchema,
|
||||
verifyLocalSupplyChainEvidence,
|
||||
} from "./lib/local-release-evidence.ts";
|
||||
import { writeValidatedJsonArtifact } from "./lib/validated-json-artifact.ts";
|
||||
|
||||
const report = await verifyLocalSupplyChainEvidence();
|
||||
await mkdir("artifacts/security", { recursive: true });
|
||||
await writeValidatedJsonArtifact({
|
||||
path: "artifacts/security/supply-chain-coherence.json",
|
||||
schema: supplyChainCoherenceReportSchema,
|
||||
value: report,
|
||||
});
|
||||
if (report.status !== "PASS") {
|
||||
process.stderr.write(
|
||||
`Supply-chain artifact coherence failed:\n- ${report.failures.join("\n- ")}\n`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
process.stdout.write(
|
||||
`Supply-chain artifact coherence: PASS (${report.dependencyCount} dependencies)\n`,
|
||||
);
|
||||
Reference in New Issue
Block a user