@cejel/cejel 0.6.4 → 0.6.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/README.md +14 -12
- package/dist/calibration/llm-detector.js +3 -3
- package/dist/{chunk-M6YYPJSN.js → chunk-5PFYOIOS.js} +1 -1
- package/dist/{chunk-HC2WASRS.js → chunk-BG4ZRBQ5.js} +1 -1
- package/dist/{chunk-4YK23CST.js → chunk-JNTTFAHQ.js} +1333 -101
- package/dist/{chunk-63XQDYQ5.js → chunk-VGBFZBZQ.js} +5 -2
- package/dist/index.js +18 -13
- package/dist/mcp/index.js +3 -3
- package/dist/packs/d-series/index.js +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
// src/witan/git-exec.ts
|
|
9
9
|
init_esm_shims();
|
|
10
10
|
import { execFileSync } from "child_process";
|
|
11
|
-
import {
|
|
11
|
+
import { realpathSync } from "fs";
|
|
12
|
+
import { dirname, resolve } from "path";
|
|
12
13
|
var GIT_EXEC_MAX_BUFFER_BYTES = 8 * 1024 * 1024;
|
|
13
14
|
var GIT_EXEC_TIMEOUT_MS = 3e4;
|
|
14
15
|
var HARDENED_GIT_ARGUMENTS = [
|
|
@@ -52,6 +53,7 @@ var HARDENED_GIT_ARGUMENTS = [
|
|
|
52
53
|
"-c",
|
|
53
54
|
"protocol.ssh.allow=never"
|
|
54
55
|
];
|
|
56
|
+
var discoveryCeiling;
|
|
55
57
|
function hardenedGitEnvironment(cwd) {
|
|
56
58
|
const environment = {};
|
|
57
59
|
for (const key of ["PATH", "HOME", "TZ"]) {
|
|
@@ -78,7 +80,8 @@ function hardenedGitEnvironment(cwd) {
|
|
|
78
80
|
// still excluded below.
|
|
79
81
|
GIT_CONFIG_COUNT: "1",
|
|
80
82
|
GIT_CONFIG_KEY_0: "safe.directory",
|
|
81
|
-
GIT_CONFIG_VALUE_0: cwd
|
|
83
|
+
GIT_CONFIG_VALUE_0: cwd,
|
|
84
|
+
...discoveryCeiling === void 0 ? {} : { GIT_CEILING_DIRECTORIES: discoveryCeiling }
|
|
82
85
|
};
|
|
83
86
|
}
|
|
84
87
|
function errorField(error, key) {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __cejelCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
serveCejelMcpOverStdio
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BG4ZRBQ5.js";
|
|
7
7
|
import {
|
|
8
8
|
CALLER_CONTEXT_PRODUCT_IDENTITY_NOTICE,
|
|
9
9
|
CERTIFICATE_GLOSSARY,
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
runCejelScan,
|
|
30
30
|
serializeWitanReport,
|
|
31
31
|
verifyWitanAttestationBinding
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-JNTTFAHQ.js";
|
|
33
|
+
import "./chunk-VGBFZBZQ.js";
|
|
34
34
|
import {
|
|
35
35
|
external_exports
|
|
36
36
|
} from "./chunk-FSMZV3Y6.js";
|
|
@@ -601,19 +601,22 @@ function renderMinScoreCoverageFailure(coverage, minScore) {
|
|
|
601
601
|
return `Cejel: cannot evaluate the required minimum ${minScore.toFixed(1)}/4.0 because fewer than half of the applicable dimensions were measured in at least one score (${formatCoverageSummary(coverage)}). Resolve the reported evidence gaps and re-scan.
|
|
602
602
|
`;
|
|
603
603
|
}
|
|
604
|
+
function stripTerminalControls(text) {
|
|
605
|
+
return text.replace(/[\t\n]/g, " ").replace(/[\u0000-\u001f\u007f-\u009f]/g, "");
|
|
606
|
+
}
|
|
604
607
|
function renderTerminalCertificate(summary, report) {
|
|
605
608
|
const abstained = summary.verdict === "Insufficient source" || summary.verdict === "Insufficient evidence";
|
|
606
609
|
if (!abstained && (summary.overallScore === null || summary.codeTrustScore === null || summary.processTrustScore === null)) {
|
|
607
610
|
throw new Error("A scored Cejel summary must carry numeric headline scores.");
|
|
608
611
|
}
|
|
609
612
|
const lines = abstained ? [
|
|
610
|
-
`Cejel Trust Certificate \u2014 ${summary.productDisplayName}`,
|
|
613
|
+
`Cejel Trust Certificate \u2014 ${stripTerminalControls(summary.productDisplayName)}`,
|
|
611
614
|
"",
|
|
612
615
|
`${summary.verdict} to certify.`,
|
|
613
|
-
` ${summary.insufficientSourceReason
|
|
616
|
+
` ${summary.insufficientSourceReason === void 0 ? "No ratable source or measurable evidence was found." : stripTerminalControls(summary.insufficientSourceReason)}`,
|
|
614
617
|
""
|
|
615
618
|
] : [
|
|
616
|
-
`Cejel Trust Certificate \u2014 ${summary.productDisplayName}`,
|
|
619
|
+
`Cejel Trust Certificate \u2014 ${stripTerminalControls(summary.productDisplayName)}`,
|
|
617
620
|
"",
|
|
618
621
|
`Overall: ${formatScore(summary.overallScore)}/4.0 (${summary.verdict})`,
|
|
619
622
|
` Code trust: ${formatScore(summary.codeTrustScore)}/4.0`,
|
|
@@ -629,7 +632,7 @@ function renderTerminalCertificate(summary, report) {
|
|
|
629
632
|
2,
|
|
630
633
|
0,
|
|
631
634
|
`Scope: ${relyingPartySummary.scope}`,
|
|
632
|
-
`What was examined: ${relyingPartySummary.examined}`,
|
|
635
|
+
`What was examined: ${stripTerminalControls(relyingPartySummary.examined)}`,
|
|
633
636
|
`What was established: ${relyingPartySummary.established}`,
|
|
634
637
|
`What was not established: ${relyingPartySummary.notEstablished}`,
|
|
635
638
|
`What to do next: ${relyingPartySummary.next}`,
|
|
@@ -639,14 +642,14 @@ function renderTerminalCertificate(summary, report) {
|
|
|
639
642
|
if (summary.scanLimitations.length > 0) {
|
|
640
643
|
lines.push(
|
|
641
644
|
"LIMITED EVIDENCE \u2014 the score and verdict are qualified by scan limitations:",
|
|
642
|
-
...summary.scanLimitations.map((limitation) => ` - ${limitation}`),
|
|
645
|
+
...summary.scanLimitations.map((limitation) => ` - ${stripTerminalControls(limitation)}`),
|
|
643
646
|
""
|
|
644
647
|
);
|
|
645
648
|
}
|
|
646
649
|
if (summary.historyLimitations?.length) {
|
|
647
650
|
lines.push(
|
|
648
651
|
"HISTORY LIMITATION \u2014 scored as usual, but some criteria read truncated history:",
|
|
649
|
-
...summary.historyLimitations.map((limitation) => ` - ${limitation}`),
|
|
652
|
+
...summary.historyLimitations.map((limitation) => ` - ${stripTerminalControls(limitation)}`),
|
|
650
653
|
""
|
|
651
654
|
);
|
|
652
655
|
}
|
|
@@ -664,9 +667,11 @@ function renderTerminalCertificate(summary, report) {
|
|
|
664
667
|
lines.push("");
|
|
665
668
|
}
|
|
666
669
|
if (summary.contributingSources.length > 0) {
|
|
667
|
-
lines.push(
|
|
670
|
+
lines.push(
|
|
671
|
+
`Incorporates findings from: ${summary.contributingSources.map(stripTerminalControls).join(", ")}`
|
|
672
|
+
);
|
|
668
673
|
for (const source of summary.externalSources) {
|
|
669
|
-
lines.push(` ${formatExternalSourceLine(source)}`);
|
|
674
|
+
lines.push(` ${stripTerminalControls(formatExternalSourceLine(source))}`);
|
|
670
675
|
}
|
|
671
676
|
lines.push("");
|
|
672
677
|
}
|
|
@@ -697,7 +702,7 @@ function renderTerminalCertificate(summary, report) {
|
|
|
697
702
|
);
|
|
698
703
|
for (const finding of summary.topFindings) {
|
|
699
704
|
lines.push(
|
|
700
|
-
` [finding severity: ${finding.severity}] ${finding.criterionId} [dimension band: ${finding.dimensionBand}]: ${finding.displaySummary ?? finding.summary}`
|
|
705
|
+
` [finding severity: ${finding.severity}] ${finding.criterionId} [dimension band: ${finding.dimensionBand}]: ${stripTerminalControls(finding.displaySummary ?? finding.summary)}`
|
|
701
706
|
);
|
|
702
707
|
}
|
|
703
708
|
const remaining = summary.findingCount - summary.topFindings.length;
|
|
@@ -714,7 +719,7 @@ function renderTerminalCertificate(summary, report) {
|
|
|
714
719
|
);
|
|
715
720
|
for (const finding of summary.topExternalFindings) {
|
|
716
721
|
lines.push(
|
|
717
|
-
` [${finding.severity}] ${finding.label} \u2192 ${finding.dimension}: ${finding.ruleId} \u2014 ${finding.message}${finding.location ? ` (${finding.location})` : ""}`
|
|
722
|
+
` [${finding.severity}] ${stripTerminalControls(finding.label)} \u2192 ${finding.dimension}: ${stripTerminalControls(finding.ruleId)} \u2014 ${stripTerminalControls(finding.message)}${finding.location ? ` (${stripTerminalControls(finding.location)})` : ""}`
|
|
718
723
|
);
|
|
719
724
|
}
|
|
720
725
|
const remaining = summary.externalFindingCount - summary.topExternalFindings.length;
|
package/dist/mcp/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __cejelCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
serveCejelMcpOverStdio
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-BG4ZRBQ5.js";
|
|
7
|
+
import "../chunk-JNTTFAHQ.js";
|
|
8
|
+
import "../chunk-VGBFZBZQ.js";
|
|
9
9
|
import "../chunk-FSMZV3Y6.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esm_shims
|
|
@@ -3,10 +3,10 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __cejelCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
listCejelLlmPackFiles
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-5PFYOIOS.js";
|
|
7
7
|
import {
|
|
8
8
|
execGit
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-VGBFZBZQ.js";
|
|
10
10
|
import {
|
|
11
11
|
require_typescript
|
|
12
12
|
} from "../../chunk-RH6FKREX.js";
|