@calltelemetry/ct-lab-mcp 0.8.105 → 0.8.107

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.
Files changed (63) hide show
  1. package/assets/stig/SHA256SUMS +15 -1
  2. package/assets/stig/guest/collect-fips-state.sh +6 -0
  3. package/assets/stig/guest/collect-hardware.sh +3 -0
  4. package/assets/stig/guest/collect-host-checks.sh +3 -0
  5. package/assets/stig/guest/collect-network-services.sh +15 -0
  6. package/assets/stig/guest/collect-repolist.sh +3 -0
  7. package/assets/stig/guest/collect-rpm-inventory.sh +3 -0
  8. package/assets/stig/guest/collect-rpm-nevra.sh +3 -0
  9. package/assets/stig/guest/collect-rpmlist.sh +3 -0
  10. package/assets/stig/guest/collect-updateinfo-all.sh +3 -0
  11. package/assets/stig/guest/collect-updateinfo-security.sh +3 -0
  12. package/assets/stig/guest/collect-updateinfo-summary.sh +3 -0
  13. package/assets/stig/guest/oval-eval.sh +11 -0
  14. package/assets/stig/guest/oval-prep.sh +4 -0
  15. package/assets/stig/guest/verify-root.sh +13 -0
  16. package/assets/stig/image/verify-image.sh +28 -0
  17. package/dist/src/generated-version.d.ts +1 -1
  18. package/dist/src/generated-version.js +1 -1
  19. package/dist/src/stig/dist.d.ts +121 -0
  20. package/dist/src/stig/dist.d.ts.map +1 -0
  21. package/dist/src/stig/dist.js +234 -0
  22. package/dist/src/stig/dist.js.map +1 -0
  23. package/dist/src/stig/distribution.d.ts +95 -0
  24. package/dist/src/stig/distribution.d.ts.map +1 -0
  25. package/dist/src/stig/distribution.js +398 -0
  26. package/dist/src/stig/distribution.js.map +1 -0
  27. package/dist/src/stig/evidence.d.ts +135 -0
  28. package/dist/src/stig/evidence.d.ts.map +1 -0
  29. package/dist/src/stig/evidence.js +637 -0
  30. package/dist/src/stig/evidence.js.map +1 -0
  31. package/dist/src/stig/live.d.ts +67 -4
  32. package/dist/src/stig/live.d.ts.map +1 -1
  33. package/dist/src/stig/live.js +226 -5
  34. package/dist/src/stig/live.js.map +1 -1
  35. package/dist/src/stig/markers.d.ts +6 -0
  36. package/dist/src/stig/markers.d.ts.map +1 -0
  37. package/dist/src/stig/markers.js +23 -0
  38. package/dist/src/stig/markers.js.map +1 -0
  39. package/dist/src/stig/model.d.ts +2 -1
  40. package/dist/src/stig/model.d.ts.map +1 -1
  41. package/dist/src/stig/model.js +7 -2
  42. package/dist/src/stig/model.js.map +1 -1
  43. package/dist/src/stig/nodes.d.ts +52 -12
  44. package/dist/src/stig/nodes.d.ts.map +1 -1
  45. package/dist/src/stig/nodes.js +90 -11
  46. package/dist/src/stig/nodes.js.map +1 -1
  47. package/dist/src/stig/ports.d.ts +81 -2
  48. package/dist/src/stig/ports.d.ts.map +1 -1
  49. package/dist/src/stig/pve.d.ts +22 -0
  50. package/dist/src/stig/pve.d.ts.map +1 -0
  51. package/dist/src/stig/pve.js +26 -0
  52. package/dist/src/stig/pve.js.map +1 -0
  53. package/dist/src/stig/runner.d.ts +36 -9
  54. package/dist/src/stig/runner.d.ts.map +1 -1
  55. package/dist/src/stig/runner.js +129 -96
  56. package/dist/src/stig/runner.js.map +1 -1
  57. package/dist/src/tools/quick-provision.d.ts +2 -2
  58. package/dist/src/tools/slot-tools.d.ts +4 -4
  59. package/dist/src/tools/stig-tools.d.ts +52 -8
  60. package/dist/src/tools/stig-tools.d.ts.map +1 -1
  61. package/dist/src/tools/stig-tools.js +105 -21
  62. package/dist/src/tools/stig-tools.js.map +1 -1
  63. package/package.json +1 -1
@@ -0,0 +1,135 @@
1
+ import type { StigDeps } from "./ports.js";
2
+ export declare const SKILL_REL = "plugins/ct-lab/skills/rhel8-stig-template";
3
+ export declare const LEDGER_REL = "knowledge/rhel8-stig";
4
+ export declare const OVAL_FEED_URL = "https://security.access.redhat.com/data/oval/v2/RHEL8/rhel-8.oval.xml.bz2";
5
+ /** The stage order of evidence.sh (its STAGES array); the parity test compares `evidence.sh --list`. */
6
+ export declare const EVIDENCE_STAGES: readonly ["preflight", "scan", "oval", "keyhash", "collect", "verify", "receipt", "e1", "e7", "e3", "e6", "e8", "e5", "report", "e2", "e4", "e10", "docs", "distribution", "sign", "explorer", "resign", "verify-bundle", "tests"];
7
+ export type EvidenceStage = (typeof EVIDENCE_STAGES)[number];
8
+ /** Stages that read the clone (guest or hypervisor, read-only). */
9
+ export declare const CLONE_STAGES: readonly ["scan", "oval", "keyhash", "collect", "verify"];
10
+ /** Generator stages that are one python invocation. */
11
+ export declare const GENERATOR_STAGES: readonly ["e1", "e7", "e3", "e6", "e8", "e5", "report", "e2", "e4", "e10", "docs"];
12
+ declare const shq: (s: string) => string;
13
+ export interface EvidenceCtx {
14
+ /** ct-meta checkout (reads the skill's tools and pins). */
15
+ ctMeta: string;
16
+ template: string;
17
+ clone: string;
18
+ /** knowledge/rhel8-stig layout the generators write into. */
19
+ planRoot: string;
20
+ /** clone run state (evidence.sh `runs/clone-<name>`). */
21
+ state: string;
22
+ /** template build evidence (evidence.sh `runs/<template>`). */
23
+ runDir: string;
24
+ manualStigZip: string;
25
+ schemaDir: string;
26
+ ssgDatastream: string;
27
+ benchmarkZip?: string;
28
+ benchmarkXml?: string;
29
+ today: string;
30
+ claimUid: string;
31
+ python?: string;
32
+ }
33
+ export declare const skillDir: (ctMeta: string) => string;
34
+ export declare const pinsFile: (ctMeta: string) => string;
35
+ export declare const tailoringFile: (ctMeta: string) => string;
36
+ /**
37
+ * The argument list evidence.sh passes the generator of `stage` (null for stages that are not one python call).
38
+ * `receipt` yields the receipt gate; `verify-bundle` the bundle verification; `preflight` the pins check.
39
+ */
40
+ export declare function generatorCommand(stage: EvidenceStage, c: EvidenceCtx): string[] | null;
41
+ /**
42
+ * The plan root is written (and, when scratch, re-seeded) by the tool, so it must never be, contain or sit inside the ct-meta
43
+ * checkout or the ledger, except the ledger itself; a scratch root must be new, empty, or one this tool seeded.
44
+ */
45
+ export declare function assertSafePlanRoot(planRoot: string, ctMeta: string, ledger: string, baseDir: string): void;
46
+ export interface EvidenceInput {
47
+ cloneName?: string;
48
+ claimName?: string;
49
+ template: string;
50
+ node?: string;
51
+ /** ct-meta checkout that holds the skill (tools, pins) and the ledger layout. */
52
+ ctMetaPath: string;
53
+ /** Where the generators write (knowledge/rhel8-stig layout). Default: a scratch copy under the run directory; the ledger is never written unless this names it. */
54
+ planRoot?: string;
55
+ /** Template build evidence directory (contains evidence/stig-report): needed to write the receipt for this clone. */
56
+ templateRunDir?: string;
57
+ manualStigZip?: string;
58
+ schemaDir?: string;
59
+ ssgDatastream?: string;
60
+ benchmarkZip?: string;
61
+ benchmarkXml?: string;
62
+ /** Directory holding publish-<template>.json and sync-<template>-<node>.json (default: <run dir>/dist). */
63
+ distDir?: string;
64
+ today?: string;
65
+ from?: EvidenceStage;
66
+ only?: EvidenceStage;
67
+ force?: boolean;
68
+ noSign?: boolean;
69
+ skipTests?: boolean;
70
+ apply?: boolean;
71
+ planDigest?: string;
72
+ }
73
+ export interface EvidenceStageState {
74
+ stage: EvidenceStage;
75
+ kind: "clone-read" | "controller";
76
+ state: "pending" | "current" | "not-selected";
77
+ }
78
+ export interface EvidencePlan {
79
+ mode: "plan";
80
+ cloneName: string;
81
+ claim: string;
82
+ claimUid: string;
83
+ node: string;
84
+ template: string;
85
+ vmid: number;
86
+ planRoot: string;
87
+ ledger: boolean;
88
+ ctMeta: string;
89
+ receiptSource: "regenerate" | "ledger";
90
+ stages: EvidenceStageState[];
91
+ guards: string[];
92
+ planDigest: string;
93
+ }
94
+ export interface StageOutcome {
95
+ stage: EvidenceStage;
96
+ status: "ran" | "skipped-current" | "skipped";
97
+ detail?: string;
98
+ ms: number;
99
+ }
100
+ export declare class EvidenceError extends Error {
101
+ }
102
+ export declare class StigEvidence {
103
+ private readonly d;
104
+ constructor(d: StigDeps);
105
+ private log;
106
+ private resolveInputs;
107
+ /** Read-only checks plus the stage table. Throws when a guard refuses. */
108
+ plan(i: EvidenceInput): Promise<EvidencePlan>;
109
+ collect(i: EvidenceInput): Promise<any>;
110
+ private apply;
111
+ private runStage;
112
+ private genEnv;
113
+ private gen;
114
+ private preflight;
115
+ /** SBOM schemas pinned by sha256 (evidence-pins.json); downloaded when the cache is missing or stale. */
116
+ private fetchSchemas;
117
+ private oval;
118
+ /** Read-only host facts for E3/E6/E7/E8 (clone.sh `do_collect`). */
119
+ private collectHost;
120
+ /** receipt.sh (receipt.py plus the artifact copies) then the receipt gate; or the gate alone when the ledger holds the receipt. */
121
+ /**
122
+ * clone.sh `scan` stores an ARF over 5 MB as `.xz` with `.raw.sha256` and `.xz.sha256` beside it; validate_stig_claim leaves the
123
+ * raw file. Normalize to the shell recipe's form (idempotent), because receipt.sh and the E2 generator read the `.xz`.
124
+ */
125
+ private compressScanArtifacts;
126
+ private receipt;
127
+ private distribution;
128
+ /** A scratch plan root is a copy of the ledger without this template's evidence (and, when the receipt is regenerated, its receipt files). */
129
+ private seedPlanRoot;
130
+ private receiptOf;
131
+ }
132
+ /** [evidence file, guest script, add the rpm-inventory header]. Order = clone.sh `do_collect`. */
133
+ declare const COLLECT_FILES: ReadonlyArray<readonly [string, string, boolean]>;
134
+ export { COLLECT_FILES, shq };
135
+ //# sourceMappingURL=evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../../src/stig/evidence.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,SAAS,8CAA8C,CAAC;AACrE,eAAO,MAAM,UAAU,yBAAyB,CAAC;AACjD,eAAO,MAAM,aAAa,8EAA8E,CAAC;AAIzG,wGAAwG;AACxG,eAAO,MAAM,eAAe,oOAGlB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,mEAAmE;AACnE,eAAO,MAAM,YAAY,2DAA4D,CAAC;AACtF,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,oFAAqF,CAAC;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