@agenticcli/shipguard 0.8.0 → 0.9.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/README.md +12 -0
- package/dist/checksum-manifest.json +5 -5
- package/dist/{chunk-VJBU6FNW.js → chunk-6XMYOF3N.js} +65 -50
- package/dist/chunk-E4Z2MZ5J.js +904 -0
- package/dist/chunk-NC5RELTG.js +40 -0
- package/dist/cli-facts.json +8 -5
- package/dist/cli.js +469 -457
- package/dist/{config-generator-4MK6PGY5.js → config-generator-S5KFHKGQ.js} +2 -1
- package/dist/{pro-scanner-5GYWJ7AS.js → pro-scanner-TPNDJ6L6.js} +2 -1
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/chunk-MVYY4QWT.js +0 -176
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/utils/logger.ts
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
var logger = {
|
|
4
|
+
info: (msg) => console.error(chalk.blue("\u2139"), msg),
|
|
5
|
+
success: (msg) => console.error(chalk.green("\u2713"), msg),
|
|
6
|
+
warn: (msg) => console.error(chalk.yellow("\u26A0"), msg),
|
|
7
|
+
error: (msg) => console.error(chalk.red("\u2717"), msg),
|
|
8
|
+
// Diagnostics that are true and worth being able to inspect, but too detailed for a
|
|
9
|
+
// normal run — e.g. "this legacy finding was superseded by a governed corpus rule on
|
|
10
|
+
// the same line". Deliberately NOT a silent drop: the information is always produced
|
|
11
|
+
// and one env var makes it visible. Stderr only, like every other logger method.
|
|
12
|
+
debug: (msg) => {
|
|
13
|
+
if (process.env.SHIPGUARD_DEBUG) console.error(chalk.gray("\xB7"), msg);
|
|
14
|
+
},
|
|
15
|
+
finding: (severity, msg) => {
|
|
16
|
+
const colors = {
|
|
17
|
+
critical: chalk.bgRed.white,
|
|
18
|
+
high: chalk.red,
|
|
19
|
+
medium: chalk.yellow,
|
|
20
|
+
low: chalk.blue,
|
|
21
|
+
info: chalk.gray
|
|
22
|
+
};
|
|
23
|
+
const colorFn = colors[severity] || chalk.white;
|
|
24
|
+
const label = severity.toUpperCase().padEnd(8);
|
|
25
|
+
console.error(` ${colorFn(label)} ${msg}`);
|
|
26
|
+
},
|
|
27
|
+
score: (score, recommendation) => {
|
|
28
|
+
const color = score <= 20 ? chalk.green : score <= 50 ? chalk.yellow : chalk.red;
|
|
29
|
+
const icon = score <= 20 ? "\u2713" : score <= 50 ? "\u26A0" : "\u2717";
|
|
30
|
+
console.error("");
|
|
31
|
+
console.error(chalk.bold("ShipGuard Scan Result"));
|
|
32
|
+
console.error(`Risk Score: ${color(`${score}/100`)}`);
|
|
33
|
+
console.error(`Status: ${color(`${icon} ${recommendation.replace(/_/g, " ")}`)}`);
|
|
34
|
+
},
|
|
35
|
+
divider: () => console.error(chalk.gray("\u2500".repeat(50)))
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
logger
|
|
40
|
+
};
|
package/dist/cli-facts.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.9.0",
|
|
3
3
|
"packageName": "@agenticcli/shipguard",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"licenseDisplay": "ELv2",
|
|
@@ -109,9 +109,10 @@
|
|
|
109
109
|
"regressionCheckSkippedReason",
|
|
110
110
|
"regressions",
|
|
111
111
|
"coverageChanged",
|
|
112
|
-
"scanIdReused"
|
|
112
|
+
"scanIdReused",
|
|
113
|
+
"coverage"
|
|
113
114
|
],
|
|
114
|
-
"schemaVersion": "0.
|
|
115
|
+
"schemaVersion": "0.9",
|
|
115
116
|
"degradeCodes": [
|
|
116
117
|
"FILE_TOO_LARGE",
|
|
117
118
|
"OUTPUT_TRUNCATED",
|
|
@@ -120,7 +121,9 @@
|
|
|
120
121
|
"INVALID_UTF8",
|
|
121
122
|
"UNREADABLE_FILE",
|
|
122
123
|
"COMPILE_FAILURE",
|
|
123
|
-
"SYMLINK_SKIPPED"
|
|
124
|
+
"SYMLINK_SKIPPED",
|
|
125
|
+
"UNSCANNED_UNKNOWN_BINARY",
|
|
126
|
+
"NO_FILES_SCANNED"
|
|
124
127
|
],
|
|
125
128
|
"severities": [
|
|
126
129
|
"info",
|
|
@@ -142,5 +145,5 @@
|
|
|
142
145
|
],
|
|
143
146
|
"installSnippet": "npx @agenticcli/shipguard scan --changed --strict --json",
|
|
144
147
|
"re2Engine": true,
|
|
145
|
-
"generatedAt": "2026-
|
|
148
|
+
"generatedAt": "2026-11-02T17:53:37.189Z"
|
|
146
149
|
}
|