@guardinstall/cli 0.1.5 → 0.1.6
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/index.js +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -1
- package/dist/ink-reporter.js +0 -49
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const program = new commander_1.Command();
|
|
|
39
39
|
program
|
|
40
40
|
.name('guardinstall')
|
|
41
41
|
.description('A kernel-level behavioral sandbox for npm/pnpm/bun install scripts')
|
|
42
|
-
.version('0.1.
|
|
42
|
+
.version('0.1.6');
|
|
43
43
|
program
|
|
44
44
|
.command('install')
|
|
45
45
|
.description('Run npm install with sandbox protection')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardinstall/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "CLI wrapper for guardinstall - intercepts and sandboxes install scripts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@guardinstall/policy-engine": "0.1.
|
|
17
|
-
"@guardinstall/sandbox": "0.1.
|
|
16
|
+
"@guardinstall/policy-engine": "0.1.6",
|
|
17
|
+
"@guardinstall/sandbox": "0.1.6",
|
|
18
18
|
"@npmcli/arborist": "7.5.4",
|
|
19
19
|
"chalk": "4.1.2",
|
|
20
20
|
"commander": "12.1.0"
|
package/src/index.ts
CHANGED
package/dist/ink-reporter.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InkReporter = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const ink_1 = require("ink");
|
|
9
|
-
function InkReporter({ results, verdicts }) {
|
|
10
|
-
const blocked = verdicts.filter(v => v.severity === 'CRITICAL' || v.severity === 'HIGH');
|
|
11
|
-
const warned = verdicts.filter(v => v.severity === 'WARN');
|
|
12
|
-
const clean = results.filter(r => r.events.length === 0);
|
|
13
|
-
return (<ink_1.Box flexDirection="column">
|
|
14
|
-
<ink_1.Box borderStyle="bold" borderColor="blue">
|
|
15
|
-
<ink_1.Text bold blue> guardinstall — Security Report </ink_1.Text>
|
|
16
|
-
</ink_1.Box>
|
|
17
|
-
|
|
18
|
-
<ink_1.Newline />
|
|
19
|
-
|
|
20
|
-
{blocked.length > 0 && (<ink_1.Box flexDirection="column">
|
|
21
|
-
<ink_1.Text bold color="red">🚨 BLOCKED ({blocked.length} packages):</ink_1.Text>
|
|
22
|
-
{blocked.map(v => (<ink_1.Box flexDirection="column" key={v.package}>
|
|
23
|
-
<ink_1.Text color="red"> ⚠ {v.package}</ink_1.Text>
|
|
24
|
-
{v.findings.map((f, i) => (<ink_1.Text key={i} color="red"> [{f.severity}] {f.message}</ink_1.Text>))}
|
|
25
|
-
</ink_1.Box>))}
|
|
26
|
-
<ink_1.Newline />
|
|
27
|
-
</ink_1.Box>)}
|
|
28
|
-
|
|
29
|
-
{warned.length > 0 && (<ink_1.Box flexDirection="column">
|
|
30
|
-
<ink_1.Text bold color="yellow">⚠️ WARNINGS ({warned.length} packages):</ink_1.Text>
|
|
31
|
-
{warned.map(v => (<ink_1.Box flexDirection="column" key={v.package}>
|
|
32
|
-
<ink_1.Text color="yellow"> {v.package}</ink_1.Text>
|
|
33
|
-
{v.findings.map((f, i) => (<ink_1.Text key={i} color="yellow"> [{f.severity}] {f.message}</ink_1.Text>))}
|
|
34
|
-
</ink_1.Box>))}
|
|
35
|
-
<ink_1.Newline />
|
|
36
|
-
</ink_1.Box>)}
|
|
37
|
-
|
|
38
|
-
{clean.length > 0 && (<ink_1.Box flexDirection="column">
|
|
39
|
-
<ink_1.Text bold color="green">✓ CLEAN ({clean.length} packages):</ink_1.Text>
|
|
40
|
-
{clean.map(r => (<ink_1.Text key={r.package} color="green"> ✓ {r.package}</ink_1.Text>))}
|
|
41
|
-
<ink_1.Newline />
|
|
42
|
-
</ink_1.Box>)}
|
|
43
|
-
|
|
44
|
-
<ink_1.Box borderStyle="bold" borderColor="blue">
|
|
45
|
-
<ink_1.Text bold blue> End of Report </ink_1.Text>
|
|
46
|
-
</ink_1.Box>
|
|
47
|
-
</ink_1.Box>);
|
|
48
|
-
}
|
|
49
|
-
exports.InkReporter = InkReporter;
|