@prodgator/report 3.4.0 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +11 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6931,6 +6931,7 @@ function parseAttestationsInput(value, workspace) {
|
|
|
6931
6931
|
});
|
|
6932
6932
|
}
|
|
6933
6933
|
var SCAN_FILE_FORMATS = ["sarif", "cyclonedx", "spdx", "grype-json", "trivy-json", "other"];
|
|
6934
|
+
var SCAN_MODE_WARNING = 'data.mode must be "full" or "diff"; ignored';
|
|
6934
6935
|
var MAX_SARIF_BYTES = 50 * 1024 * 1024;
|
|
6935
6936
|
function contentTypeForScanFile(format, path) {
|
|
6936
6937
|
if (format === "sarif") return "application/sarif+json";
|
|
@@ -6972,7 +6973,13 @@ async function resolveAttestationFiles(attestations, workspace, deps = {}) {
|
|
|
6972
6973
|
const files = [];
|
|
6973
6974
|
const warnings = [];
|
|
6974
6975
|
const out = [];
|
|
6975
|
-
for (const
|
|
6976
|
+
for (const input of attestations) {
|
|
6977
|
+
let a = input;
|
|
6978
|
+
if (a.kind === "scan" && "mode" in a.data && a.data.mode !== "full" && a.data.mode !== "diff") {
|
|
6979
|
+
const { mode: _ignored, ...rest } = a.data;
|
|
6980
|
+
a = { ...a, data: rest };
|
|
6981
|
+
warnings.push(SCAN_MODE_WARNING);
|
|
6982
|
+
}
|
|
6976
6983
|
const file = a.file;
|
|
6977
6984
|
if (a.kind !== "scan" && a.kind !== "sbom" || typeof file !== "string" || !file.trim()) {
|
|
6978
6985
|
out.push(a);
|
|
@@ -7520,7 +7527,7 @@ async function run(deps = {}) {
|
|
|
7520
7527
|
const argv = deps.argv ?? process.argv.slice(2);
|
|
7521
7528
|
const log = deps.log ?? { info: (m) => console.log(m), warn: (m) => console.log(`Warning: ${m}`), error: (m) => console.error(m) };
|
|
7522
7529
|
if (argv.includes("--version")) {
|
|
7523
|
-
log.info("3.
|
|
7530
|
+
log.info("3.19.0");
|
|
7524
7531
|
return 0;
|
|
7525
7532
|
}
|
|
7526
7533
|
let failOnError = false;
|
|
@@ -7538,7 +7545,7 @@ async function run(deps = {}) {
|
|
|
7538
7545
|
const problem = tokenProblem(token, opts.audience, ci.provider, variable, (deps.nowMs ?? Date.now)());
|
|
7539
7546
|
if (problem) throw new CliError(problem);
|
|
7540
7547
|
if (opts.gate) {
|
|
7541
|
-
const client2 = { getToken: async () => token, fetch: deps.fetch, sleep: deps.sleep, fixedToken: true, userAgent: `prodgator-report/${"3.
|
|
7548
|
+
const client2 = { getToken: async () => token, fetch: deps.fetch, sleep: deps.sleep, fixedToken: true, userAgent: `prodgator-report/${"3.19.0"} (${ci.provider}; gate)` };
|
|
7542
7549
|
return await runGate(ci, { prodgatorUrl: opts.prodgatorUrl, audience: opts.audience, timeoutMinutes: opts.gateTimeoutMinutes }, client2, {
|
|
7543
7550
|
sleep: deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms))),
|
|
7544
7551
|
nowMs: deps.nowMs ?? Date.now,
|
|
@@ -7561,7 +7568,7 @@ async function run(deps = {}) {
|
|
|
7561
7568
|
fetch: deps.fetch,
|
|
7562
7569
|
sleep: deps.sleep,
|
|
7563
7570
|
fixedToken: true,
|
|
7564
|
-
userAgent: `prodgator-report/${"3.
|
|
7571
|
+
userAgent: `prodgator-report/${"3.19.0"} (${ci.provider})`
|
|
7565
7572
|
};
|
|
7566
7573
|
const request = buildIngestRequest({ job: { name: opts.jobName ?? ci.jobName, matrix: opts.matrix, runner: ci.runner }, name: opts.name, summary, attestations, files });
|
|
7567
7574
|
const res = await sendReport(opts.prodgatorUrl, ci.provider, request, opts.audience, client, ci.azure);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prodgator/report",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"description": "Send CI job summaries, test results, attestations and artifacts to Prodgator, authenticated with the CI system's OIDC token",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.prodgator.io/pipelines/run-reports",
|