tamperward 2.29.4 → 2.29.5
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/index.js +12 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10801,14 +10801,14 @@ function renderText(input, opts) {
|
|
|
10801
10801
|
const isBlock = f.severity === "block";
|
|
10802
10802
|
const mark = paint(isBlock ? "BLOCK" : "warn ", isBlock ? BOLD + RED : YELLOW, c);
|
|
10803
10803
|
const loc = f.file ? `${stripControl(escapeControl(f.file))}${f.line ? `:${f.line}` : ""}` : "(command)";
|
|
10804
|
-
out3.push(` ${mark} ${paint(stripControl(f.rule), BOLD, c)} ${paint(loc,
|
|
10804
|
+
out3.push(` ${mark} ${paint(stripControl(f.rule), BOLD, c)} ${paint(loc, CYAN, c)}`);
|
|
10805
10805
|
for (const l of wrap(f.message, opts.width - 4)) out3.push(` ${l}`);
|
|
10806
10806
|
const row = (key2, lines) => {
|
|
10807
10807
|
lines.forEach((l, i) => out3.push(` ${paint(pad(i === 0 ? key2 : ""), DIM, c)} ${l}`));
|
|
10808
10808
|
};
|
|
10809
10809
|
row("evidence", [paint(clip(f.evidence, body), DIM, c)]);
|
|
10810
10810
|
row("instead", wrap(f.remediation, body));
|
|
10811
|
-
if (f.signoff.required) row("sign-off", [stripControl(f.signoff.command)]);
|
|
10811
|
+
if (f.signoff.required) row("sign-off", [paint(stripControl(f.signoff.command), YELLOW, c)]);
|
|
10812
10812
|
out3.push("");
|
|
10813
10813
|
}
|
|
10814
10814
|
if (blocks2.length > 0) {
|
|
@@ -10818,7 +10818,7 @@ function renderText(input, opts) {
|
|
|
10818
10818
|
}
|
|
10819
10819
|
return out3.join("\n").replace(/\n+$/, "") + "\n";
|
|
10820
10820
|
}
|
|
10821
|
-
var ESC, RESET, BOLD, DIM, RED, YELLOW, GREEN, SIGNOFF_NOTE;
|
|
10821
|
+
var ESC, RESET, BOLD, DIM, truecolour, RED, YELLOW, GREEN, CYAN, SIGNOFF_NOTE;
|
|
10822
10822
|
var init_text = __esm({
|
|
10823
10823
|
"src/cli/render/text.ts"() {
|
|
10824
10824
|
"use strict";
|
|
@@ -10827,9 +10827,11 @@ var init_text = __esm({
|
|
|
10827
10827
|
RESET = `${ESC}[0m`;
|
|
10828
10828
|
BOLD = `${ESC}[1m`;
|
|
10829
10829
|
DIM = `${ESC}[2m`;
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10830
|
+
truecolour = (r, g, b) => `${ESC}[38;2;${r};${g};${b}m`;
|
|
10831
|
+
RED = truecolour(255, 107, 107);
|
|
10832
|
+
YELLOW = truecolour(227, 179, 65);
|
|
10833
|
+
GREEN = truecolour(63, 185, 80);
|
|
10834
|
+
CYAN = truecolour(86, 212, 221);
|
|
10833
10835
|
SIGNOFF_NOTE = "A blocking finding clears only with a human sign-off. In CI that sign-off is out-of-band \u2014 a PR label applied by a reviewer \u2014 never a file committed on the branch under review. See SPEC \xA75.4.";
|
|
10834
10836
|
}
|
|
10835
10837
|
});
|
|
@@ -18194,7 +18196,7 @@ async function runOnboard(opts, io = {}) {
|
|
|
18194
18196
|
if (kind === "ok") return GREEN2;
|
|
18195
18197
|
if (kind === "warn") return YELLOW2;
|
|
18196
18198
|
if (kind === "bad") return RED2;
|
|
18197
|
-
if (kind === "info") return
|
|
18199
|
+
if (kind === "info") return CYAN2;
|
|
18198
18200
|
return DIM2;
|
|
18199
18201
|
};
|
|
18200
18202
|
const status = (label, text, kind = "info") => {
|
|
@@ -18251,7 +18253,7 @@ async function runOnboard(opts, io = {}) {
|
|
|
18251
18253
|
const section = (n) => {
|
|
18252
18254
|
sectionNo = n;
|
|
18253
18255
|
out3("");
|
|
18254
|
-
out3(paint2(n + "/" + SECTIONS.length + " " + SECTIONS[n - 1], BOLD2 +
|
|
18256
|
+
out3(paint2(n + "/" + SECTIONS.length + " " + SECTIONS[n - 1], BOLD2 + CYAN2, colour));
|
|
18255
18257
|
};
|
|
18256
18258
|
const wrote = [];
|
|
18257
18259
|
let verifyCommand;
|
|
@@ -18593,7 +18595,7 @@ function runDemo(cwd, head, runners, out3) {
|
|
|
18593
18595
|
out3("changed it while the demo ran; inspect with `git status`.");
|
|
18594
18596
|
}
|
|
18595
18597
|
}
|
|
18596
|
-
var Aborted, SECTIONS, MANUAL_CONTROLS, ESC2, RESET2, BOLD2, DIM2, RED2, YELLOW2, GREEN2,
|
|
18598
|
+
var Aborted, SECTIONS, MANUAL_CONTROLS, ESC2, RESET2, BOLD2, DIM2, RED2, YELLOW2, GREEN2, CYAN2, JS_TEST_PATH, JS_TEST_BLOCK;
|
|
18597
18599
|
var init_onboard = __esm({
|
|
18598
18600
|
"src/cli/onboard.ts"() {
|
|
18599
18601
|
"use strict";
|
|
@@ -18630,7 +18632,7 @@ var init_onboard = __esm({
|
|
|
18630
18632
|
RED2 = `${ESC2}[31m`;
|
|
18631
18633
|
YELLOW2 = `${ESC2}[33m`;
|
|
18632
18634
|
GREEN2 = `${ESC2}[32m`;
|
|
18633
|
-
|
|
18635
|
+
CYAN2 = `${ESC2}[36m`;
|
|
18634
18636
|
JS_TEST_PATH = /(?:^|\/)(?:[^/]+\.(?:test|spec)\.[cm]?[jt]sx?|__tests__\/[^/]+\.[cm]?[jt]sx?)$/;
|
|
18635
18637
|
JS_TEST_BLOCK = /^(\s*)(it|test|describe)(\s*\()/m;
|
|
18636
18638
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamperward",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.5",
|
|
4
4
|
"description": "The deterministic agent-integrity gate. One ruleset, evaluated on the actual diff/commands as a verdict, enforced everywhere a change can be made.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "hexrift",
|