@intentius/chant 0.41.20 → 0.44.1

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 (144) hide show
  1. package/dist/build.d.ts +15 -1
  2. package/dist/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.d.ts.map +1 -1
  4. package/dist/cli/commands/carve-apply.d.ts +9 -0
  5. package/dist/cli/commands/carve-apply.d.ts.map +1 -1
  6. package/dist/cli/commands/carve-bridge.d.ts +7 -0
  7. package/dist/cli/commands/carve-bridge.d.ts.map +1 -1
  8. package/dist/cli/commands/carve-emit.d.ts +7 -0
  9. package/dist/cli/commands/carve-emit.d.ts.map +1 -1
  10. package/dist/cli/commands/init.d.ts +2 -0
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/handlers/carve-apply.d.ts.map +1 -1
  13. package/dist/cli/handlers/components.d.ts.map +1 -1
  14. package/dist/cli/handlers/explain.d.ts +11 -0
  15. package/dist/cli/handlers/explain.d.ts.map +1 -0
  16. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  17. package/dist/cli/main.d.ts.map +1 -1
  18. package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
  19. package/dist/cli/plugins.d.ts +8 -0
  20. package/dist/cli/plugins.d.ts.map +1 -1
  21. package/dist/cli/registry.d.ts +2 -0
  22. package/dist/cli/registry.d.ts.map +1 -1
  23. package/dist/codegen/docs-rule-scanning.d.ts +11 -0
  24. package/dist/codegen/docs-rule-scanning.d.ts.map +1 -1
  25. package/dist/codegen/okf-lexicon.d.ts +36 -0
  26. package/dist/codegen/okf-lexicon.d.ts.map +1 -0
  27. package/dist/codegen/package.d.ts +2 -1
  28. package/dist/codegen/package.d.ts.map +1 -1
  29. package/dist/components/deploy-units.d.ts.map +1 -1
  30. package/dist/components/verbs/sbom.d.ts +1 -1
  31. package/dist/components/verbs/sbom.d.ts.map +1 -1
  32. package/dist/components/verbs/vuln-gate.d.ts +15 -4
  33. package/dist/components/verbs/vuln-gate.d.ts.map +1 -1
  34. package/dist/components/verbs/vuln-scan.d.ts +18 -6
  35. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  36. package/dist/config.d.ts +12 -0
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/deep-observation.d.ts +13 -0
  39. package/dist/deep-observation.d.ts.map +1 -1
  40. package/dist/lexicon.d.ts +47 -0
  41. package/dist/lexicon.d.ts.map +1 -1
  42. package/dist/lifecycle/observe.d.ts.map +1 -1
  43. package/dist/lifecycle/snapshot.d.ts.map +1 -1
  44. package/dist/okf.d.ts +57 -0
  45. package/dist/okf.d.ts.map +1 -0
  46. package/dist/terraform/__fixtures__/build-graph.d.ts +13 -0
  47. package/dist/terraform/__fixtures__/build-graph.d.ts.map +1 -0
  48. package/dist/terraform/adopt-state.d.ts +33 -1
  49. package/dist/terraform/adopt-state.d.ts.map +1 -1
  50. package/dist/terraform/aws-resources.d.ts.map +1 -1
  51. package/dist/terraform/bridge.d.ts +7 -1
  52. package/dist/terraform/bridge.d.ts.map +1 -1
  53. package/dist/terraform/carve.d.ts +12 -0
  54. package/dist/terraform/carve.d.ts.map +1 -1
  55. package/dist/terraform/excise.d.ts +31 -0
  56. package/dist/terraform/excise.d.ts.map +1 -0
  57. package/dist/terraform/graduate.d.ts +12 -0
  58. package/dist/terraform/graduate.d.ts.map +1 -1
  59. package/dist/terraform/graph.d.ts +35 -5
  60. package/dist/terraform/graph.d.ts.map +1 -1
  61. package/dist/terraform/manifest.d.ts +89 -0
  62. package/dist/terraform/manifest.d.ts.map +1 -0
  63. package/dist/terraform/parse.d.ts +9 -4
  64. package/dist/terraform/parse.d.ts.map +1 -1
  65. package/dist/terraform/tier-map.d.ts +4 -3
  66. package/dist/terraform/tier-map.d.ts.map +1 -1
  67. package/dist/terraform/types.d.ts +7 -0
  68. package/dist/terraform/types.d.ts.map +1 -1
  69. package/dist/terraform/unified-diff.d.ts +11 -0
  70. package/dist/terraform/unified-diff.d.ts.map +1 -0
  71. package/package.json +1 -1
  72. package/src/__snapshots__/okf.test.ts.snap +381 -0
  73. package/src/audit/rules-doc.ts +1 -1
  74. package/src/build.test.ts +95 -0
  75. package/src/build.ts +46 -1
  76. package/src/cli/commands/build.ts +9 -1
  77. package/src/cli/commands/carve-apply.test.ts +94 -2
  78. package/src/cli/commands/carve-apply.ts +62 -11
  79. package/src/cli/commands/carve-bridge.test.ts +82 -4
  80. package/src/cli/commands/carve-bridge.ts +79 -11
  81. package/src/cli/commands/carve-emit-state.test.ts +110 -1
  82. package/src/cli/commands/carve-emit.ts +184 -8
  83. package/src/cli/commands/init.ts +1 -1
  84. package/src/cli/handlers/carve-apply.ts +1 -0
  85. package/src/cli/handlers/components.ts +4 -2
  86. package/src/cli/handlers/explain.test.ts +93 -0
  87. package/src/cli/handlers/explain.ts +60 -0
  88. package/src/cli/handlers/lifecycle.ts +16 -9
  89. package/src/cli/main.ts +21 -5
  90. package/src/cli/mcp/server.test.ts +17 -0
  91. package/src/cli/mcp/tools/explain.ts +15 -3
  92. package/src/cli/plugins.ts +17 -0
  93. package/src/cli/registry.ts +2 -0
  94. package/src/codegen/__snapshots__/okf-lexicon.test.ts.snap +170 -0
  95. package/src/codegen/docs-rule-scanning.ts +35 -14
  96. package/src/codegen/okf-lexicon.test.ts +248 -0
  97. package/src/codegen/okf-lexicon.ts +303 -0
  98. package/src/codegen/package.ts +29 -4
  99. package/src/components/config-defaults.test.ts +30 -0
  100. package/src/components/deploy-units.test.ts +13 -0
  101. package/src/components/deploy-units.ts +5 -0
  102. package/src/components/verbs/__fixtures__/grype-with-kev-epss.json +1 -0
  103. package/src/components/verbs/__fixtures__/trivy-with-kev-epss.json +631 -0
  104. package/src/components/verbs/exploitability-roundtrip.test.ts +190 -0
  105. package/src/components/verbs/sbom.ts +1 -1
  106. package/src/components/verbs/vuln-gate.test.ts +144 -1
  107. package/src/components/verbs/vuln-gate.ts +61 -10
  108. package/src/components/verbs/vuln-scan.test.ts +94 -0
  109. package/src/components/verbs/vuln-scan.ts +44 -9
  110. package/src/config.test.ts +21 -0
  111. package/src/config.ts +18 -0
  112. package/src/deep-observation.test.ts +19 -0
  113. package/src/deep-observation.ts +32 -13
  114. package/src/lexicon.ts +50 -0
  115. package/src/lifecycle/observe.test.ts +18 -0
  116. package/src/lifecycle/observe.ts +10 -3
  117. package/src/lifecycle/snapshot.ts +5 -4
  118. package/src/okf.test.ts +169 -0
  119. package/src/okf.ts +308 -0
  120. package/src/terraform/__fixtures__/build-graph.ts +25 -0
  121. package/src/terraform/adopt-state.test.ts +34 -1
  122. package/src/terraform/adopt-state.ts +69 -2
  123. package/src/terraform/aws-resources.test.ts +52 -2
  124. package/src/terraform/aws-resources.ts +95 -4
  125. package/src/terraform/bridge.test.ts +38 -14
  126. package/src/terraform/bridge.ts +48 -14
  127. package/src/terraform/carve.test.ts +9 -7
  128. package/src/terraform/carve.ts +0 -0
  129. package/src/terraform/excise.test.ts +92 -0
  130. package/src/terraform/excise.ts +139 -0
  131. package/src/terraform/graduate.test.ts +73 -6
  132. package/src/terraform/graduate.ts +49 -0
  133. package/src/terraform/graph.test.ts +73 -10
  134. package/src/terraform/graph.ts +124 -47
  135. package/src/terraform/manifest.test.ts +105 -0
  136. package/src/terraform/manifest.ts +162 -0
  137. package/src/terraform/parse.test.ts +39 -1
  138. package/src/terraform/parse.ts +36 -9
  139. package/src/terraform/score.test.ts +8 -8
  140. package/src/terraform/state.test.ts +4 -4
  141. package/src/terraform/tier-map.ts +60 -8
  142. package/src/terraform/types.ts +7 -0
  143. package/src/terraform/unified-diff.test.ts +77 -0
  144. package/src/terraform/unified-diff.ts +146 -0
@@ -0,0 +1,303 @@
1
+ /**
2
+ * Lexicon OKF knowledge bundle (#1060, epic #1057) — projects a packaged
3
+ * lexicon's resource-type registry and lint rules into an Open Knowledge
4
+ * Format v0.2 bundle, emitted alongside the other build artifacts
5
+ * (`dist/meta.json`, `dist/types/`) as `dist/okf/`.
6
+ *
7
+ * Vocabulary, resolved against the project bundle (#1058, ../okf.ts): there a
8
+ * concept's `type` IS the entity's resource type; here `type` is the concept
9
+ * *category* — `resource-type`, `lint-rule`, `post-synth-check` — and the
10
+ * resource type string rides in `resource_type`. A consumer tells the two
11
+ * bundle kinds apart by exactly that.
12
+ *
13
+ * Cross-links run both directions: a resource concept lists the rules that
14
+ * govern it under "Governed by", a rule concept lists the types it applies to
15
+ * under "Applies to". The association is derived from the rule's source text
16
+ * (rules match on identifiers, not declared type lists), so it is a textual
17
+ * over-approximation — acceptable for knowledge, wrong for enforcement.
18
+ */
19
+
20
+ import * as ts from "typescript";
21
+ import { frontmatter, slug, OKF_VERSION, type OkfFile } from "../okf";
22
+ import type { ScannedRule } from "./docs-rule-scanning";
23
+
24
+ export interface LexiconOkfInput {
25
+ /** Lexicon name as the manifest states it, e.g. "aws". */
26
+ name: string;
27
+ /** The registry JSON — the exact content of `dist/meta.json`. */
28
+ registry: string;
29
+ /** The generated declarations — the content of `dist/types/index.d.ts`. */
30
+ typesDTS: string;
31
+ /** Scanned rules with their sources, for metadata and type association. */
32
+ rules: ScannedRule[];
33
+ }
34
+
35
+ interface RegistryEntry {
36
+ resourceType?: unknown;
37
+ kind?: unknown;
38
+ description?: unknown;
39
+ properties?: Record<string, { type?: string; description?: string }>;
40
+ attrs?: Record<string, string>;
41
+ }
42
+
43
+ interface ConceptProperty {
44
+ name: string;
45
+ type?: string;
46
+ required?: boolean;
47
+ description?: string;
48
+ }
49
+
50
+ interface TypeConcept {
51
+ className: string;
52
+ resourceType: string;
53
+ description?: string;
54
+ properties: ConceptProperty[];
55
+ attributes: string[];
56
+ path: string;
57
+ }
58
+
59
+ /** Collapse whitespace so a description fits a frontmatter scalar or a list line. */
60
+ function oneLine(text: string): string {
61
+ return text.replace(/\s+/g, " ").trim();
62
+ }
63
+
64
+ function truncate(text: string, max: number): string {
65
+ return text.length <= max ? text : `${text.slice(0, max - 3).trimEnd()}...`;
66
+ }
67
+
68
+ /**
69
+ * Per-class constructor property docs, parsed out of the generated
70
+ * declarations. This is where CloudFormation- and OpenAPI-derived lexicons
71
+ * carry their spec-sourced property descriptions (the registry carries them
72
+ * only for hand-authored lexicons like docker).
73
+ */
74
+ function parseDtsProperties(typesDTS: string): Map<string, ConceptProperty[]> {
75
+ const out = new Map<string, ConceptProperty[]>();
76
+ if (!typesDTS.includes("constructor")) return out;
77
+ const sf = ts.createSourceFile("types.d.ts", typesDTS, ts.ScriptTarget.Latest, false, ts.ScriptKind.TS);
78
+ for (const stmt of sf.statements) {
79
+ if (!ts.isClassDeclaration(stmt) || !stmt.name) continue;
80
+ const ctor = stmt.members.find(ts.isConstructorDeclaration);
81
+ const param = ctor?.parameters[0];
82
+ if (!param?.type || !ts.isTypeLiteralNode(param.type)) continue;
83
+ const props: ConceptProperty[] = [];
84
+ for (const member of param.type.members) {
85
+ if (!ts.isPropertySignature(member) || !member.name) continue;
86
+ const name =
87
+ ts.isIdentifier(member.name) || ts.isStringLiteral(member.name)
88
+ ? member.name.text
89
+ : member.name.getText(sf);
90
+ const raw = (member as unknown as { jsDoc?: ts.JSDoc[] }).jsDoc?.[0]?.comment;
91
+ const doc = typeof raw === "string" ? raw : raw ? ts.getTextOfJSDocComment(raw) : undefined;
92
+ props.push({
93
+ name,
94
+ type: member.type?.getText(sf),
95
+ required: member.questionToken === undefined,
96
+ // Undo the `*\/` escaping generate-typescript applies inside JSDoc.
97
+ description: doc?.replace(/\*\\\//g, "*/"),
98
+ });
99
+ }
100
+ if (props.length > 0) out.set(stmt.name.text, props);
101
+ }
102
+ return out;
103
+ }
104
+
105
+ /**
106
+ * The resource types a rule's source mentions — by class name as a whole
107
+ * word, or by the resource type string anywhere.
108
+ */
109
+ function ruleAppliesTo(source: string, concepts: TypeConcept[]): TypeConcept[] {
110
+ const words = new Set(source.match(/[A-Za-z0-9_$]+/g) ?? []);
111
+ return concepts.filter((c) => words.has(c.className) || source.includes(c.resourceType));
112
+ }
113
+
114
+ function propertyLine(prop: ConceptProperty): string {
115
+ const facts: string[] = [];
116
+ if (prop.type) facts.push(`\`${oneLine(prop.type)}\``);
117
+ if (prop.required === true) facts.push("required");
118
+ if (prop.required === false) facts.push("optional");
119
+ const head = facts.length > 0 ? `- \`${prop.name}\` (${facts.join(", ")})` : `- \`${prop.name}\``;
120
+ return prop.description ? `${head}: ${oneLine(prop.description)}` : head;
121
+ }
122
+
123
+ /**
124
+ * Build the OKF bundle for a packaged lexicon. Pure and deterministic: the
125
+ * same registry, declarations, and rules yield byte-identical files.
126
+ */
127
+ export function buildLexiconOkfBundle(input: LexiconOkfInput): OkfFile[] {
128
+ let registry: Record<string, RegistryEntry>;
129
+ try {
130
+ registry = JSON.parse(input.registry) as Record<string, RegistryEntry>;
131
+ } catch {
132
+ registry = {};
133
+ }
134
+ const dtsProps = parseDtsProperties(input.typesDTS);
135
+
136
+ // One concept per resource type: alias entries share a resourceType, the
137
+ // first class name in sorted order names the concept.
138
+ const byType = new Map<string, { className: string; entry: RegistryEntry }>();
139
+ for (const className of Object.keys(registry).sort((a, b) => a.localeCompare(b))) {
140
+ const entry = registry[className];
141
+ if (entry?.kind !== "resource" || typeof entry.resourceType !== "string") continue;
142
+ if (!byType.has(entry.resourceType)) byType.set(entry.resourceType, { className, entry });
143
+ }
144
+
145
+ const concepts: TypeConcept[] = [];
146
+ const takenPaths = new Set<string>();
147
+ for (const { className, entry } of [...byType.values()].sort((a, b) => a.className.localeCompare(b.className))) {
148
+ const base = `types/${slug(className)}`;
149
+ let path = `${base}.md`;
150
+ for (let n = 2; takenPaths.has(path); n++) path = `${base}-${n}.md`;
151
+ takenPaths.add(path);
152
+
153
+ // Registry-carried property docs (hand-authored lexicons) win; the
154
+ // generated declarations fill in for spec-derived lexicons.
155
+ let properties: ConceptProperty[];
156
+ if (entry.properties && Object.keys(entry.properties).length > 0) {
157
+ properties = Object.entries(entry.properties).map(([name, p]) => ({
158
+ name,
159
+ type: p.type,
160
+ description: p.description,
161
+ }));
162
+ } else {
163
+ properties = dtsProps.get(className) ?? [];
164
+ }
165
+
166
+ concepts.push({
167
+ className,
168
+ resourceType: entry.resourceType as string,
169
+ description: typeof entry.description === "string" ? entry.description : undefined,
170
+ properties,
171
+ attributes: entry.attrs ? Object.values(entry.attrs).sort((a, b) => a.localeCompare(b)) : [],
172
+ path,
173
+ });
174
+ }
175
+
176
+ // One concept per rule id, first scan wins.
177
+ const rulesById = new Map<string, ScannedRule>();
178
+ for (const rule of input.rules) {
179
+ if (!rulesById.has(rule.meta.id)) rulesById.set(rule.meta.id, rule);
180
+ }
181
+ const rules = [...rulesById.values()].sort((a, b) => a.meta.id.localeCompare(b.meta.id));
182
+ const rulePath = (id: string): string => `rules/${slug(id)}.md`;
183
+
184
+ // Association, both directions.
185
+ const governedBy = new Map<string, ScannedRule[]>();
186
+ const appliesTo = new Map<string, TypeConcept[]>();
187
+ for (const rule of rules) {
188
+ const targets = ruleAppliesTo(rule.source, concepts);
189
+ appliesTo.set(rule.meta.id, targets);
190
+ for (const target of targets) {
191
+ if (!governedBy.has(target.resourceType)) governedBy.set(target.resourceType, []);
192
+ governedBy.get(target.resourceType)!.push(rule);
193
+ }
194
+ }
195
+
196
+ const docsUrl = `https://intentius.io/chant/lexicons/${input.name}/rules/`;
197
+ const files: OkfFile[] = [];
198
+
199
+ for (const concept of concepts) {
200
+ const head = frontmatter({
201
+ type: "resource-type",
202
+ title: concept.className,
203
+ description: truncate(
204
+ oneLine(concept.description ?? `${input.name} resource type ${concept.resourceType}`),
205
+ 200,
206
+ ),
207
+ name: concept.className,
208
+ lexicon: input.name,
209
+ resource_type: concept.resourceType,
210
+ });
211
+
212
+ const body: string[] = [""];
213
+ body.push(
214
+ concept.description
215
+ ? oneLine(concept.description)
216
+ : `\`${concept.resourceType}\`, a resource type of the ${input.name} lexicon.`,
217
+ );
218
+
219
+ if (concept.properties.length > 0) {
220
+ body.push("", "## Properties", "");
221
+ for (const prop of concept.properties) body.push(propertyLine(prop));
222
+ }
223
+
224
+ if (concept.attributes.length > 0) {
225
+ body.push("", "## Attributes", "");
226
+ for (const attr of concept.attributes) body.push(`- \`${attr}\``);
227
+ }
228
+
229
+ const governing = governedBy.get(concept.resourceType) ?? [];
230
+ if (governing.length > 0) {
231
+ body.push("", "## Governed by", "");
232
+ for (const rule of governing) {
233
+ body.push(`- [${rule.meta.id}](/${rulePath(rule.meta.id)}): ${oneLine(rule.meta.description)}`);
234
+ }
235
+ }
236
+
237
+ body.push("");
238
+ files.push({ path: concept.path, content: head + body.join("\n") });
239
+ }
240
+
241
+ for (const rule of rules) {
242
+ const head = frontmatter({
243
+ type: rule.meta.type === "post-synth" ? "post-synth-check" : "lint-rule",
244
+ title: rule.meta.id,
245
+ description: truncate(oneLine(rule.meta.description), 200),
246
+ id: rule.meta.id,
247
+ severity: rule.meta.severity,
248
+ category: rule.meta.category,
249
+ lexicon: input.name,
250
+ docs: docsUrl,
251
+ });
252
+
253
+ const body: string[] = ["", oneLine(rule.meta.description)];
254
+ const targets = appliesTo.get(rule.meta.id) ?? [];
255
+ if (targets.length > 0) {
256
+ body.push("", "## Applies to", "");
257
+ for (const target of targets) {
258
+ body.push(`- [${target.className}](/${target.path})`);
259
+ }
260
+ }
261
+ body.push("");
262
+ files.push({ path: rulePath(rule.meta.id), content: head + body.join("\n") });
263
+ }
264
+
265
+ files.push({ path: "index.md", content: buildIndex(input.name, concepts, rules, rulePath) });
266
+ files.sort((a, b) => a.path.localeCompare(b.path));
267
+ return files;
268
+ }
269
+
270
+ /**
271
+ * The bundle-root `index.md`: resource types and rules as sections of linked
272
+ * entries, `okf_version` its only frontmatter (spec §12).
273
+ */
274
+ function buildIndex(
275
+ name: string,
276
+ concepts: TypeConcept[],
277
+ rules: ScannedRule[],
278
+ rulePath: (id: string) => string,
279
+ ): string {
280
+ const lines: string[] = ["---", `okf_version: '${OKF_VERSION}'`, "---", ""];
281
+
282
+ if (concepts.length > 0) {
283
+ lines.push("# Resource types", "");
284
+ for (const concept of concepts) {
285
+ lines.push(`* [${concept.className}](/${concept.path}) - ${concept.resourceType}`);
286
+ }
287
+ lines.push("");
288
+ }
289
+
290
+ if (rules.length > 0) {
291
+ lines.push("# Rules", "");
292
+ for (const rule of rules) {
293
+ lines.push(`* [${rule.meta.id}](/${rulePath(rule.meta.id)}) - ${truncate(oneLine(rule.meta.description), 160)}`);
294
+ }
295
+ lines.push("");
296
+ }
297
+
298
+ if (concepts.length === 0 && rules.length === 0) {
299
+ lines.push(`The ${name} lexicon declares no resource types or rules.`, "");
300
+ }
301
+
302
+ return lines.join("\n");
303
+ }
@@ -5,11 +5,13 @@
5
5
  * assemble BundleSpec → compute integrity → attach metadata.
6
6
  */
7
7
 
8
- import { readFileSync, readdirSync, writeFileSync, mkdirSync } from "fs";
9
- import { join } from "path";
8
+ import { readFileSync, readdirSync, writeFileSync, mkdirSync, rmSync } from "fs";
9
+ import { dirname, join } from "path";
10
10
  import type { BundleSpec, LexiconManifest } from "../lexicon";
11
11
  import { computeIntegrity } from "../lexicon-integrity";
12
12
  import type { GenerateResult } from "./generate";
13
+ import { scanRulesWithSources } from "./docs-rule-scanning";
14
+ import { buildLexiconOkfBundle } from "./okf-lexicon";
13
15
 
14
16
  // ── Types ──────────────────────────────────────────────────────────
15
17
 
@@ -73,13 +75,24 @@ export async function packagePipeline(
73
75
  log("Collecting skills...");
74
76
  const skills = config.collectSkills();
75
77
 
76
- // Step 5: Assemble BundleSpec
78
+ // Step 5: Assemble BundleSpec, with the OKF knowledge bundle over the same
79
+ // artifacts (#1060) — derived here so it cannot drift from the registry and
80
+ // rules it describes.
81
+ log("Building OKF knowledge bundle...");
82
+ const okf = buildLexiconOkfBundle({
83
+ name: manifest.name,
84
+ registry: result.lexiconJSON,
85
+ typesDTS: result.typesDTS,
86
+ rules: scanRulesWithSources(config.srcDir),
87
+ });
88
+
77
89
  const spec: BundleSpec = {
78
90
  manifest,
79
91
  registry: result.lexiconJSON,
80
92
  typesDTS: result.typesDTS,
81
93
  rules,
82
94
  skills,
95
+ okf,
83
96
  };
84
97
 
85
98
  // Step 6: Compute integrity
@@ -151,7 +164,8 @@ export function collectRules(
151
164
  * Write a BundleSpec to the given dist directory.
152
165
  *
153
166
  * Creates the directory structure and writes all artifacts:
154
- * manifest.json, meta.json, types/index.d.ts, rules/*, skills/*, integrity.json.
167
+ * manifest.json, meta.json, types/index.d.ts, rules/*, skills/*, okf/*,
168
+ * integrity.json.
155
169
  */
156
170
  export function writeBundleSpec(spec: BundleSpec, distDir: string): void {
157
171
  mkdirSync(join(distDir, "types"), { recursive: true });
@@ -169,6 +183,17 @@ export function writeBundleSpec(spec: BundleSpec, distDir: string): void {
169
183
  writeFileSync(join(distDir, "skills", name), content);
170
184
  }
171
185
 
186
+ if (spec.okf) {
187
+ // Replace rather than merge — a concept whose resource type was removed
188
+ // upstream must not survive as a stale file.
189
+ rmSync(join(distDir, "okf"), { recursive: true, force: true });
190
+ for (const file of spec.okf) {
191
+ const target = join(distDir, "okf", file.path);
192
+ mkdirSync(dirname(target), { recursive: true });
193
+ writeFileSync(target, file.content);
194
+ }
195
+ }
196
+
172
197
  if (spec.integrity) {
173
198
  writeFileSync(join(distDir, "integrity.json"), JSON.stringify(spec.integrity, null, 2));
174
199
  }
@@ -200,6 +200,36 @@ describe("applyConfigDefaults", () => {
200
200
  expect(step.policy?.warnSeverity).toBe("medium");
201
201
  });
202
202
 
203
+ test("vuln-gate: exploitability fields (#1466) reach a step with no per-step policy written", () => {
204
+ const config: ChantConfig = { vulnPolicy: { failOnKev: true, failEpssAtOrAbove: 0.1, warnEpssAtOrAbove: 0.01, exploitabilityFixableOnly: false } };
205
+ const comp = component([
206
+ { phase: "Gate", steps: [{ kind: "vuln-gate", sbom: { bytes: "", mediaType: "", packageCount: 0, generator: "x", format: "spdx" } }] },
207
+ ]);
208
+
209
+ const result = applyConfigDefaults(comp, config);
210
+ const step = result.deploy[0]!.steps[0] as { policy?: { failOnKev?: boolean; failEpssAtOrAbove?: number; warnEpssAtOrAbove?: number; exploitabilityFixableOnly?: boolean } };
211
+ expect(step.policy).toEqual({ failOnKev: true, failEpssAtOrAbove: 0.1, warnEpssAtOrAbove: 0.01, exploitabilityFixableOnly: false });
212
+ });
213
+
214
+ test("vuln-gate: a per-step failOnKev: false beats a config-level true, field-by-field", () => {
215
+ const config: ChantConfig = { vulnPolicy: { failOnKev: true, failEpssAtOrAbove: 0.1 } };
216
+ const comp = component([
217
+ {
218
+ phase: "Gate",
219
+ steps: [{
220
+ kind: "vuln-gate",
221
+ sbom: { bytes: "", mediaType: "", packageCount: 0, generator: "x", format: "spdx" },
222
+ policy: { failOnKev: false },
223
+ }],
224
+ },
225
+ ]);
226
+
227
+ const result = applyConfigDefaults(comp, config);
228
+ const step = result.deploy[0]!.steps[0] as { policy?: { failOnKev?: boolean; failEpssAtOrAbove?: number } };
229
+ expect(step.policy?.failOnKev).toBe(false);
230
+ expect(step.policy?.failEpssAtOrAbove).toBe(0.1);
231
+ });
232
+
203
233
  test("recurses into nested fan-out phases and onFailure compensation phases", () => {
204
234
  const config: ChantConfig = { sbom: { format: "cyclonedx" } };
205
235
  const comp = component([
@@ -23,6 +23,19 @@ describe("deployUnits (#1495 piece 1)", () => {
23
23
  ]);
24
24
  });
25
25
 
26
+ test("resolves the GitOps verbs to their stack — the CR is the unit (#1549 piece 2)", () => {
27
+ const deploy = [
28
+ phase("Apply", [
29
+ { kind: "argo-app", manifest: "argo/app.yaml", stack: "gitops-argo" },
30
+ { kind: "flux-reconcile", manifest: "flux/", stack: "gitops-flux" },
31
+ ]),
32
+ ];
33
+ expect(deployUnits(deploy)).toEqual([
34
+ { unit: "gitops-argo", lexicon: "k8s" },
35
+ { unit: "gitops-flux", lexicon: "k8s" },
36
+ ]);
37
+ });
38
+
26
39
  test("walks nested phases, dedupes per lexicon, and skips unitless steps", () => {
27
40
  const deploy = [
28
41
  phase("Outer", [
@@ -40,6 +40,11 @@ export const DEPLOY_UNIT_RULES: readonly DeployUnitRule[] = [
40
40
  // kustomize renders, then applies through the same stack-labelled pipeline —
41
41
  // so its unit is observed by the identical label sweep (#1548).
42
42
  { kind: "kustomize-apply", field: "stack", lexicon: "k8s" },
43
+ // GitOps verbs apply the controller's CR through that same pipeline — the
44
+ // unit is the CR itself under its stack label, observed by the identical
45
+ // label sweep (#1549 piece 2).
46
+ { kind: "argo-app", field: "stack", lexicon: "k8s" },
47
+ { kind: "flux-reconcile", field: "stack", lexicon: "k8s" },
43
48
  { kind: "helm-upgrade", field: "release", lexicon: "helm" },
44
49
  ];
45
50
 
@@ -0,0 +1 @@
1
+ {"matches":[{"vulnerability":{"id":"GHSA-jfh8-c2jp-5v3q","dataSource":"https://github.com/advisories/GHSA-jfh8-c2jp-5v3q","namespace":"github:language:java","severity":"Critical","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-44228","https://github.com/apache/logging-log4j2/pull/608","https://github.com/tangxiaofeng7/apache-log4j-poc","https://logging.apache.org/log4j/2.x/changes-report.html#a2.15.0","https://logging.apache.org/log4j/2.x/manual/lookups.html#JndiLookup","https://issues.apache.org/jira/browse/LOG4J2-3198","https://issues.apache.org/jira/browse/LOG4J2-3201","https://logging.apache.org/log4j/2.x/manual/migration.html","https://logging.apache.org/log4j/2.x/security.html","http://packetstormsecurity.com/files/165225/Apache-Log4j2-2.14.1-Remote-Code-Execution.html","http://www.openwall.com/lists/oss-security/2021/12/10/1","http://www.openwall.com/lists/oss-security/2021/12/10/2","http://www.openwall.com/lists/oss-security/2021/12/10/3","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://issues.apache.org/jira/browse/LOG4J2-3214","https://www.oracle.com/security-alerts/alert-cve-2021-44228.html","http://www.openwall.com/lists/oss-security/2021/12/13/1","http://www.openwall.com/lists/oss-security/2021/12/13/2","https://issues.apache.org/jira/browse/LOG4J2-3221","https://github.com/advisories/GHSA-7rjr-3q55-vv33","https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdf","https://lists.debian.org/debian-lts-announce/2021/12/msg00007.html","https://twitter.com/kurtseifried/status/1469345530182455296","https://www.debian.org/security/2021/dsa-5020","http://packetstormsecurity.com/files/165260/VMware-Security-Advisory-2021-0028.html","http://packetstormsecurity.com/files/165261/Apache-Log4j2-2.14.1-Information-Disclosure.html","http://packetstormsecurity.com/files/165270/Apache-Log4j2-2.14.1-Remote-Code-Execution.html","http://www.openwall.com/lists/oss-security/2021/12/14/4","https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.html","https://www.kb.cert.org/vuls/id/930724","http://packetstormsecurity.com/files/165281/Log4j2-Log4Shell-Regexes.html","http://packetstormsecurity.com/files/165282/Log4j-Payload-Generator.html","http://packetstormsecurity.com/files/165306/L4sh-Log4j-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165307/Log4j-Remote-Code-Execution-Word-Bypassing.html","http://packetstormsecurity.com/files/165311/log4j-scan-Extensive-Scanner.html","http://www.openwall.com/lists/oss-security/2021/12/15/3","https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-397453.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","http://packetstormsecurity.com/files/165371/VMware-Security-Advisory-2021-0028.4.html","http://packetstormsecurity.com/files/165532/Log4Shell-HTTP-Header-Injection.html","https://github.com/cisagov/log4j-affected-db/blob/develop/SOFTWARE-LIST.md","http://packetstormsecurity.com/files/165642/VMware-vCenter-Server-Unauthenticated-Log4Shell-JNDI-Injection-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165673/UniFi-Network-Application-Unauthenticated-Log4Shell-Remote-Code-Execution.html","https://www.oracle.com/security-alerts/cpujan2022.html","https://github.com/cisagov/log4j-affected-db","https://support.apple.com/kb/HT213189","https://www.bentley.com/en/common-vulnerability-exposure/be-2022-0001","https://www.oracle.com/security-alerts/cpuapr2022.html","https://github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-44228","https://www.nu11secur1ty.com/2021/12/cve-2021-44228.html","http://packetstormsecurity.com/files/167794/Open-Xchange-App-Suite-7.10.x-Cross-Site-Scripting-Command-Injection.html","http://packetstormsecurity.com/files/167917/MobileIron-Log4Shell-Remote-Command-Execution.html","http://packetstormsecurity.com/files/171626/AD-Manager-Plus-7122-Remote-Code-Execution.html","https://msrc-blog.microsoft.com/2021/12/11/microsofts-response-to-cve-2021-44228-apache-log4j2","https://security.netapp.com/advisory/ntap-20211210-0007","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/M5CSVUNV4HWZZXGOKNSK6L7RPM7BOKIB","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VU57UJDCFIASIO35GC55JMKSRXJMCDFM","https://github.com/github/advisory-database/pull/5501","https://packetstormsecurity.com/files/165673/UniFi-Network-Application-Unauthenticated-Log4Shell-Remote-Code-Execution.html","https://packetstormsecurity.com/files/167794/Open-Xchange-App-Suite-7.10.x-Cross-Site-Scripting-Command-Injection.html","https://packetstormsecurity.com/files/167917/MobileIron-Log4Shell-Remote-Command-Execution.html","https://packetstormsecurity.com/files/171626/AD-Manager-Plus-7122-Remote-Code-Execution.html","https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://seclists.org/fulldisclosure/2022/Dec/2","https://seclists.org/fulldisclosure/2022/Jul/11","https://seclists.org/fulldisclosure/2022/Mar/23","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-44228","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M5CSVUNV4HWZZXGOKNSK6L7RPM7BOKIB","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VU57UJDCFIASIO35GC55JMKSRXJMCDFM","http://seclists.org/fulldisclosure/2022/Dec/2","http://seclists.org/fulldisclosure/2022/Jul/11","http://seclists.org/fulldisclosure/2022/Mar/23"],"description":"Remote code injection in Log4j","cvss":[{"type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:H","metrics":{"baseScore":10,"exploitabilityScore":3.9,"impactScore":6.1},"vendorMetadata":{}}],"knownExploited":[{"cve":"CVE-2021-44228","vendorProject":"Apache","product":"Log4j2","dateAdded":"2021-12-10","requiredAction":"For all affected software assets for which updates exist, the only acceptable remediation actions are: 1) Apply updates; OR 2) remove affected assets from agency networks. Temporary mitigations using one of the measures provided at https://www.cisa.gov/uscert/ed-22-02-apache-log4j-recommended-mitigation-measures are only acceptable until updates are available.","dueDate":"2021-12-24","knownRansomwareCampaignUse":"known","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-44228"],"cwes":["CWE-20","CWE-400","CWE-502"]}],"epss":[{"cve":"CVE-2021-44228","epss":0.99999,"percentile":1,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-44228","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-400","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-502","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-917","source":"nvd@nist.gov","type":"Secondary"}],"fix":{"versions":["2.15.0"],"state":"fixed","available":[{"version":"2.15.0","date":"2021-12-10","kind":"first-observed"}]},"advisories":[],"risk":100},"relatedVulnerabilities":[{"id":"CVE-2021-44228","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2021-44228","namespace":"nvd:cpe","severity":"Critical","urls":["http://packetstormsecurity.com/files/165225/Apache-Log4j2-2.14.1-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165260/VMware-Security-Advisory-2021-0028.html","http://packetstormsecurity.com/files/165261/Apache-Log4j2-2.14.1-Information-Disclosure.html","http://packetstormsecurity.com/files/165270/Apache-Log4j2-2.14.1-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165281/Log4j2-Log4Shell-Regexes.html","http://packetstormsecurity.com/files/165282/Log4j-Payload-Generator.html","http://packetstormsecurity.com/files/165306/L4sh-Log4j-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165307/Log4j-Remote-Code-Execution-Word-Bypassing.html","http://packetstormsecurity.com/files/165311/log4j-scan-Extensive-Scanner.html","http://packetstormsecurity.com/files/165371/VMware-Security-Advisory-2021-0028.4.html","http://packetstormsecurity.com/files/165532/Log4Shell-HTTP-Header-Injection.html","http://packetstormsecurity.com/files/165642/VMware-vCenter-Server-Unauthenticated-Log4Shell-JNDI-Injection-Remote-Code-Execution.html","http://packetstormsecurity.com/files/165673/UniFi-Network-Application-Unauthenticated-Log4Shell-Remote-Code-Execution.html","http://packetstormsecurity.com/files/167794/Open-Xchange-App-Suite-7.10.x-Cross-Site-Scripting-Command-Injection.html","http://packetstormsecurity.com/files/167917/MobileIron-Log4Shell-Remote-Command-Execution.html","http://packetstormsecurity.com/files/171626/AD-Manager-Plus-7122-Remote-Code-Execution.html","http://seclists.org/fulldisclosure/2022/Dec/2","http://seclists.org/fulldisclosure/2022/Jul/11","http://seclists.org/fulldisclosure/2022/Mar/23","http://www.openwall.com/lists/oss-security/2021/12/10/1","http://www.openwall.com/lists/oss-security/2021/12/10/2","http://www.openwall.com/lists/oss-security/2021/12/10/3","http://www.openwall.com/lists/oss-security/2021/12/13/1","http://www.openwall.com/lists/oss-security/2021/12/13/2","http://www.openwall.com/lists/oss-security/2021/12/14/4","http://www.openwall.com/lists/oss-security/2021/12/15/3","https://cert-portal.siemens.com/productcert/pdf/ssa-397453.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf","https://github.com/cisagov/log4j-affected-db","https://github.com/cisagov/log4j-affected-db/blob/develop/SOFTWARE-LIST.md","https://github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-44228","https://lists.debian.org/debian-lts-announce/2021/12/msg00007.html","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M5CSVUNV4HWZZXGOKNSK6L7RPM7BOKIB/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VU57UJDCFIASIO35GC55JMKSRXJMCDFM/","https://logging.apache.org/log4j/2.x/security.html","https://msrc-blog.microsoft.com/2021/12/11/microsofts-response-to-cve-2021-44228-apache-log4j2/","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://security.netapp.com/advisory/ntap-20211210-0007/","https://support.apple.com/kb/HT213189","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://twitter.com/kurtseifried/status/1469345530182455296","https://www.bentley.com/en/common-vulnerability-exposure/be-2022-0001","https://www.debian.org/security/2021/dsa-5020","https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.html","https://www.kb.cert.org/vuls/id/930724","https://www.nu11secur1ty.com/2021/12/cve-2021-44228.html","https://www.oracle.com/security-alerts/alert-cve-2021-44228.html","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-44228"],"description":"Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","metrics":{"baseScore":10,"exploitabilityScore":3.9,"impactScore":6.1},"vendorMetadata":{}},{"source":"nvd@nist.gov","type":"Primary","version":"2.0","vector":"AV:N/AC:M/Au:N/C:C/I:C/A:C","metrics":{"baseScore":9.3,"exploitabilityScore":8.6,"impactScore":10.1},"vendorMetadata":{}},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","metrics":{"baseScore":10,"exploitabilityScore":3.9,"impactScore":6.1},"vendorMetadata":{}}],"knownExploited":[{"cve":"CVE-2021-44228","vendorProject":"Apache","product":"Log4j2","dateAdded":"2021-12-10","requiredAction":"For all affected software assets for which updates exist, the only acceptable remediation actions are: 1) Apply updates; OR 2) remove affected assets from agency networks. Temporary mitigations using one of the measures provided at https://www.cisa.gov/uscert/ed-22-02-apache-log4j-recommended-mitigation-measures are only acceptable until updates are available.","dueDate":"2021-12-24","knownRansomwareCampaignUse":"known","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-44228"],"cwes":["CWE-20","CWE-400","CWE-502"]}],"epss":[{"cve":"CVE-2021-44228","epss":0.99999,"percentile":1,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-44228","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-400","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-502","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44228","cwe":"CWE-917","source":"nvd@nist.gov","type":"Secondary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-jfh8-c2jp-5v3q","versionConstraint":">=2.13.0,<2.15.0 (unknown)"},"fix":{"suggestedVersion":"2.15.0"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-7rjr-3q55-vv33","dataSource":"https://github.com/advisories/GHSA-7rjr-3q55-vv33","namespace":"github:language:java","severity":"Critical","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-45046","https://github.com/advisories/GHSA-jfh8-c2jp-5v3q","https://logging.apache.org/log4j/2.x/security.html","https://www.openwall.com/lists/oss-security/2021/12/14/4","https://www.cve.org/CVERecord?id=CVE-2021-44228","http://www.openwall.com/lists/oss-security/2021/12/14/4","https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.html","http://www.openwall.com/lists/oss-security/2021/12/15/3","https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf","https://www.kb.cert.org/vuls/id/930724","https://www.debian.org/security/2021/dsa-5022","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://www.oracle.com/security-alerts/alert-cve-2021-44228.html","http://www.openwall.com/lists/oss-security/2021/12/18/1","https://cert-portal.siemens.com/productcert/pdf/ssa-397453.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujul2022.html","https://security.gentoo.org/glsa/202310-16","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY","https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-45046","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY"],"description":"Incomplete fix for Apache Log4j vulnerability","cvss":[{"type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H/E:H","metrics":{"baseScore":9,"exploitabilityScore":2.3,"impactScore":6.1},"vendorMetadata":{}}],"knownExploited":[{"cve":"CVE-2021-45046","vendorProject":"Apache","product":"Log4j2","dateAdded":"2023-05-01","requiredAction":"Apply updates per vendor instructions.","dueDate":"2023-05-22","knownRansomwareCampaignUse":"known","urls":["https://logging.apache.org/log4j/2.x/security.html","https://nvd.nist.gov/vuln/detail/CVE-2021-45046"],"cwes":["CWE-917"]}],"epss":[{"cve":"CVE-2021-45046","epss":0.99977,"percentile":0.9998,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-45046","cwe":"CWE-917","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45046","cwe":"CWE-917","source":"nvd@nist.gov","type":"Primary"}],"fix":{"versions":["2.16.0"],"state":"fixed","available":[{"version":"2.16.0","date":"2021-12-15","kind":"first-observed"}]},"advisories":[],"risk":99.00000000000001},"relatedVulnerabilities":[{"id":"CVE-2021-45046","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2021-45046","namespace":"nvd:cpe","severity":"Critical","urls":["http://www.openwall.com/lists/oss-security/2021/12/14/4","http://www.openwall.com/lists/oss-security/2021/12/15/3","http://www.openwall.com/lists/oss-security/2021/12/18/1","https://cert-portal.siemens.com/productcert/pdf/ssa-397453.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ/","https://logging.apache.org/log4j/2.x/security.html","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://security.gentoo.org/glsa/202310-16","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://www.cve.org/CVERecord?id=CVE-2021-44228","https://www.debian.org/security/2021/dsa-5022","https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.html","https://www.kb.cert.org/vuls/id/930724","https://www.oracle.com/security-alerts/alert-cve-2021-44228.html","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpujul2022.html","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-45046"],"description":"It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in an information leak and remote code execution in some environments and local code execution in all environments. Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) fix this issue by removing support for message lookup patterns and disabling JNDI functionality by default.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","metrics":{"baseScore":9,"exploitabilityScore":2.3,"impactScore":6.1},"vendorMetadata":{}},{"source":"nvd@nist.gov","type":"Primary","version":"2.0","vector":"AV:N/AC:H/Au:N/C:P/I:P/A:P","metrics":{"baseScore":5.1,"exploitabilityScore":5,"impactScore":6.5},"vendorMetadata":{}},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","metrics":{"baseScore":9,"exploitabilityScore":2.3,"impactScore":6.1},"vendorMetadata":{}}],"knownExploited":[{"cve":"CVE-2021-45046","vendorProject":"Apache","product":"Log4j2","dateAdded":"2023-05-01","requiredAction":"Apply updates per vendor instructions.","dueDate":"2023-05-22","knownRansomwareCampaignUse":"known","urls":["https://logging.apache.org/log4j/2.x/security.html","https://nvd.nist.gov/vuln/detail/CVE-2021-45046"],"cwes":["CWE-917"]}],"epss":[{"cve":"CVE-2021-45046","epss":0.99977,"percentile":0.9998,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-45046","cwe":"CWE-917","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45046","cwe":"CWE-917","source":"nvd@nist.gov","type":"Primary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-7rjr-3q55-vv33","versionConstraint":">=2.13.0,<2.16.0 (unknown)"},"fix":{"suggestedVersion":"2.16.0"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-p6xc-xr62-6r2g","dataSource":"https://github.com/advisories/GHSA-p6xc-xr62-6r2g","namespace":"github:language:java","severity":"High","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-45105","https://logging.apache.org/log4j/2.x/security.html","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf","https://lists.debian.org/debian-lts-announce/2021/12/msg00017.html","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://www.debian.org/security/2021/dsa-5024","https://www.kb.cert.org/vuls/id/930724","http://www.openwall.com/lists/oss-security/2021/12/19/1","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujul2022.html","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ","https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://security.netapp.com/advisory/ntap-20211218-0001","https://www.zerodayinitiative.com/advisories/ZDI-21-1541","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd"],"description":"Apache Log4j2 vulnerable to Improper Input Validation and Uncontrolled Recursion","cvss":[{"type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H","metrics":{"baseScore":8.6,"exploitabilityScore":3.9,"impactScore":4},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2021-45105","epss":0.99999,"percentile":0.9999,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-45105","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45105","cwe":"CWE-674","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45105","cwe":"CWE-20","source":"nvd@nist.gov","type":"Primary"},{"cve":"CVE-2021-45105","cwe":"CWE-674","source":"nvd@nist.gov","type":"Primary"}],"fix":{"versions":["2.17.0"],"state":"fixed","available":[{"version":"2.17.0","date":"2021-12-19","kind":"first-observed"}]},"advisories":[],"risk":80.499195},"relatedVulnerabilities":[{"id":"CVE-2021-45105","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2021-45105","namespace":"nvd:cpe","severity":"Medium","urls":["http://www.openwall.com/lists/oss-security/2021/12/19/1","https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf","https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf","https://logging.apache.org/log4j/2.x/security.html","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032","https://security.netapp.com/advisory/ntap-20211218-0001/","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://www.debian.org/security/2021/dsa-5024","https://www.kb.cert.org/vuls/id/930724","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpujul2022.html","https://www.zerodayinitiative.com/advisories/ZDI-21-1541/"],"description":"Apache Log4j2 versions 2.0-alpha1 through 2.16.0 (excluding 2.12.3 and 2.3.1) did not protect from uncontrolled recursion from self-referential lookups. This allows an attacker with control over Thread Context Map data to cause a denial of service when a crafted string is interpreted. This issue was fixed in Log4j 2.17.0, 2.12.3, and 2.3.1.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","metrics":{"baseScore":5.9,"exploitabilityScore":2.3,"impactScore":3.6},"vendorMetadata":{}},{"source":"nvd@nist.gov","type":"Primary","version":"2.0","vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","metrics":{"baseScore":4.3,"exploitabilityScore":8.6,"impactScore":2.9},"vendorMetadata":{}},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","metrics":{"baseScore":5.9,"exploitabilityScore":2.3,"impactScore":3.6},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2021-45105","epss":0.99999,"percentile":0.9999,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-45105","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45105","cwe":"CWE-674","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-45105","cwe":"CWE-20","source":"nvd@nist.gov","type":"Primary"},{"cve":"CVE-2021-45105","cwe":"CWE-674","source":"nvd@nist.gov","type":"Primary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-p6xc-xr62-6r2g","versionConstraint":">=2.13.0,<2.17.0 (unknown)"},"fix":{"suggestedVersion":"2.17.0"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-8489-44mv-ggj8","dataSource":"https://github.com/advisories/GHSA-8489-44mv-ggj8","namespace":"github:language:java","severity":"Medium","urls":["https://nvd.nist.gov/vuln/detail/CVE-2021-44832","https://issues.apache.org/jira/browse/LOG4J2-3293","https://lists.apache.org/thread/s1o5vlo78ypqxnzn6p8zf6t9shtq5143","https://cert-portal.siemens.com/productcert/pdf/ssa-784507.pdf","https://lists.debian.org/debian-lts-announce/2021/12/msg00036.html","http://www.openwall.com/lists/oss-security/2021/12/28/1","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujul2022.html","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EVV25FXL4FU5X6X5BSL7RLQ7T6F65MRA","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/T57MPJUW3MA6QGWZRTMCHHMMPQNVKGFC","https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://security.netapp.com/advisory/ntap-20220104-0001","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EVV25FXL4FU5X6X5BSL7RLQ7T6F65MRA","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/T57MPJUW3MA6QGWZRTMCHHMMPQNVKGFC","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd"],"description":"Improper Input Validation and Injection in Apache Log4j2","cvss":[{"type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","metrics":{"baseScore":6.6,"exploitabilityScore":0.8,"impactScore":5.9},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2021-44832","epss":0.97906,"percentile":0.99903,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-44832","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44832","cwe":"CWE-74","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44832","cwe":"CWE-20","source":"nvd@nist.gov","type":"Primary"}],"fix":{"versions":["2.17.1"],"state":"fixed","available":[{"version":"2.17.1","date":"2022-01-05","kind":"first-observed"}]},"advisories":[],"risk":56.78548},"relatedVulnerabilities":[{"id":"CVE-2021-44832","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2021-44832","namespace":"nvd:cpe","severity":"Medium","urls":["http://www.openwall.com/lists/oss-security/2021/12/28/1","https://cert-portal.siemens.com/productcert/pdf/ssa-784507.pdf","https://issues.apache.org/jira/browse/LOG4J2-3293","https://lists.apache.org/thread/s1o5vlo78ypqxnzn6p8zf6t9shtq5143","https://lists.debian.org/debian-lts-announce/2021/12/msg00036.html","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EVV25FXL4FU5X6X5BSL7RLQ7T6F65MRA/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/T57MPJUW3MA6QGWZRTMCHHMMPQNVKGFC/","https://security.netapp.com/advisory/ntap-20220104-0001/","https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd","https://www.oracle.com/security-alerts/cpuapr2022.html","https://www.oracle.com/security-alerts/cpujan2022.html","https://www.oracle.com/security-alerts/cpujul2022.html"],"description":"Apache Log4j2 versions 2.0-beta7 through 2.17.0 (excluding security fix releases 2.3.2 and 2.12.4) are vulnerable to a remote code execution (RCE) attack when a configuration uses a JDBC Appender with a JNDI LDAP data source URI when an attacker has control of the target LDAP server. This issue is fixed by limiting JNDI data source names to the java protocol in Log4j2 versions 2.17.1, 2.12.4, and 2.3.2.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","metrics":{"baseScore":6.6,"exploitabilityScore":0.8,"impactScore":5.9},"vendorMetadata":{}},{"source":"nvd@nist.gov","type":"Primary","version":"2.0","vector":"AV:N/AC:M/Au:S/C:C/I:C/A:C","metrics":{"baseScore":8.5,"exploitabilityScore":6.9,"impactScore":10.1},"vendorMetadata":{}},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","metrics":{"baseScore":6.6,"exploitabilityScore":0.8,"impactScore":5.9},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2021-44832","epss":0.97906,"percentile":0.99903,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2021-44832","cwe":"CWE-20","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44832","cwe":"CWE-74","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2021-44832","cwe":"CWE-20","source":"nvd@nist.gov","type":"Primary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-8489-44mv-ggj8","versionConstraint":">=2.13.0,<2.17.1 (unknown)"},"fix":{"suggestedVersion":"2.17.1"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-3pxv-7cmr-fjr4","dataSource":"https://github.com/advisories/GHSA-3pxv-7cmr-fjr4","namespace":"github:language:java","severity":"Medium","urls":["https://nvd.nist.gov/vuln/detail/CVE-2026-34480","https://github.com/apache/logging-log4j2/pull/4077","https://lists.apache.org/thread/5x0hcnng0chhghp6jgjdp3qmbbhfjzhb","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout","https://logging.apache.org/security.html#CVE-2026-34480","http://www.openwall.com/lists/oss-security/2026/04/10/9"],"description":"Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters","cvss":[{"type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","metrics":{"baseScore":6.9},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2026-34480","epss":0.0086,"percentile":0.55043,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2026-34480","cwe":"CWE-116","source":"security@apache.org","type":"Secondary"}],"fix":{"versions":["2.25.4"],"state":"fixed","available":[{"version":"2.25.4","date":"2026-04-11","kind":"first-observed"}]},"advisories":[],"risk":0.5117},"relatedVulnerabilities":[{"id":"CVE-2026-34480","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2026-34480","namespace":"nvd:cpe","severity":"High","urls":["https://github.com/apache/logging-log4j2/pull/4077","https://lists.apache.org/thread/5x0hcnng0chhghp6jgjdp3qmbbhfjzhb","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout","https://logging.apache.org/security.html#CVE-2026-34480","http://www.openwall.com/lists/oss-security/2026/04/10/9"],"description":"Apache Log4j Core's XmlLayout https://logging.apache.org/log4j/2.x/manual/layouts.html#XmlLayout , in versions up to and including 2.25.3, fails to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets producing invalid XML output whenever a log message or MDC value contains such characters.\n\nThe impact depends on the StAX implementation in use:\n\n * JRE built-in StAX: Forbidden characters are silently written to the output, producing malformed XML. Conforming parsers must reject such documents with a fatal error, which may cause downstream log-processing systems to drop the affected records.\n * Alternative StAX implementations (e.g., Woodstox https://github.com/FasterXML/woodstox , a transitive dependency of the Jackson XML Dataformat module): An exception is thrown during the logging call, and the log event is never delivered to its intended appender, only to Log4j's internal status logger.\n\n\nUsers are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue by sanitizing forbidden characters before XML output.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","metrics":{"baseScore":7.5,"exploitabilityScore":3.9,"impactScore":3.6},"vendorMetadata":{}},{"source":"security@apache.org","type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","metrics":{"baseScore":6.9},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2026-34480","epss":0.0086,"percentile":0.55043,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2026-34480","cwe":"CWE-116","source":"security@apache.org","type":"Secondary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-3pxv-7cmr-fjr4","versionConstraint":">=2.0-alpha1,<2.25.4 (unknown)"},"fix":{"suggestedVersion":"2.25.4"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-vc5p-v9hr-52mj","dataSource":"https://github.com/advisories/GHSA-vc5p-v9hr-52mj","namespace":"github:language:java","severity":"Medium","urls":["https://nvd.nist.gov/vuln/detail/CVE-2025-68161","https://github.com/apache/logging-log4j2/pull/4002","https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvx","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName","https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName","https://logging.apache.org/security.html#CVE-2025-68161","https://github.com/apache/logging-log4j2/commit/3b93748497e1adbbd027fda8a5e7268ec5d0d578","http://www.openwall.com/lists/oss-security/2025/12/18/1"],"description":"Apache Log4j does not verify the TLS hostname in its Socket Appender","cvss":[{"type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N","metrics":{"baseScore":6.3},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2025-68161","epss":0.00756,"percentile":0.51685,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2025-68161","cwe":"CWE-297","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2025-68161","cwe":"CWE-295","source":"nvd@nist.gov","type":"Primary"}],"fix":{"versions":["2.25.3"],"state":"fixed","available":[{"version":"2.25.3","date":"2025-12-20","kind":"first-observed"}]},"advisories":[],"risk":0.42713999999999996},"relatedVulnerabilities":[{"id":"CVE-2025-68161","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2025-68161","namespace":"nvd:cpe","severity":"Medium","urls":["https://github.com/apache/logging-log4j2/pull/4002","https://lists.apache.org/thread/xr33kyxq3sl67lwb61ggvm1fzc8k7dvx","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName","https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName","https://logging.apache.org/security.html#CVE-2025-68161","http://www.openwall.com/lists/oss-security/2025/12/18/1","https://lists.debian.org/debian-lts-announce/2026/01/msg00015.html"],"description":"The Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 does not perform TLS hostname verification of the peer certificate, even when the verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName configuration attribute or the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName system property is set to true.\n\nThis issue may allow a man-in-the-middle attacker to intercept or redirect log traffic under the following conditions:\n\n * The attacker is able to intercept or redirect network traffic between the client and the log receiver.\n * The attacker can present a server certificate issued by a certification authority trusted by the Socket Appender’s configured trust store (or by the default Java trust store if no custom trust store is configured).\n\n\nUsers are advised to upgrade to Apache Log4j Core version 2.25.3, which addresses this issue.\n\nAs an alternative mitigation, the Socket Appender may be configured to use a private or restricted trust root to limit the set of trusted certificates.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","metrics":{"baseScore":4.8,"exploitabilityScore":2.3,"impactScore":2.6},"vendorMetadata":{}},{"source":"security@apache.org","type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","metrics":{"baseScore":6.3},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2025-68161","epss":0.00756,"percentile":0.51685,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2025-68161","cwe":"CWE-297","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2025-68161","cwe":"CWE-295","source":"nvd@nist.gov","type":"Primary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-vc5p-v9hr-52mj","versionConstraint":">=2.0-beta9,<2.25.3 (unknown)"},"fix":{"suggestedVersion":"2.25.3"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}},{"vulnerability":{"id":"GHSA-6hg6-v5c8-fphq","dataSource":"https://github.com/advisories/GHSA-6hg6-v5c8-fphq","namespace":"github:language:java","severity":"Medium","urls":["https://nvd.nist.gov/vuln/detail/CVE-2026-34477","https://github.com/apache/logging-log4j2/pull/4075","https://lists.apache.org/thread/lkx8cl46t2bvkcwfcb2pd43ygc097lq4","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName","https://logging.apache.org/security.html#CVE-2026-34477"],"description":"Apache Log4j Core: `verifyHostName` attribute silently ignored in TLS configuration","cvss":[{"type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N","metrics":{"baseScore":6.3},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2026-34477","epss":0.0041,"percentile":0.33733,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2026-34477","cwe":"CWE-297","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2026-34477","cwe":"CWE-295","source":"nvd@nist.gov","type":"Primary"}],"fix":{"versions":["2.25.4"],"state":"fixed","available":[{"version":"2.25.4","date":"2026-04-14","kind":"first-observed"}]},"advisories":[],"risk":0.23165},"relatedVulnerabilities":[{"id":"CVE-2026-34477","dataSource":"https://nvd.nist.gov/vuln/detail/CVE-2026-34477","namespace":"nvd:cpe","severity":"Medium","urls":["https://github.com/apache/logging-log4j2/pull/4075","https://lists.apache.org/thread/lkx8cl46t2bvkcwfcb2pd43ygc097lq4","https://logging.apache.org/cyclonedx/vdr.xml","https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName","https://logging.apache.org/security.html#CVE-2026-34477"],"description":"The fix for CVE-2025-68161 https://logging.apache.org/security.html#CVE-2025-68161 was incomplete: it addressed hostname verification only when enabled via the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.sslVerifyHostName system property, but not when configured through the verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-attr-verifyHostName attribute of the <Ssl> element.\n\nAlthough the verifyHostName configuration attribute was introduced in Log4j Core 2.12.0, it was silently ignored in all versions through 2.25.3, leaving TLS connections vulnerable to interception regardless of the configured value.\n\nA network-based attacker may be able to perform a man-in-the-middle attack when all of the following conditions are met:\n\n * An SMTP, Socket, or Syslog appender is in use.\n * TLS is configured via a nested <Ssl> element.\n * The attacker can present a certificate issued by a CA trusted by the appender's configured trust store, or by the default Java trust store if none is configured.\nThis issue does not affect users of the HTTP appender, which uses a separate verifyHostname https://logging.apache.org/log4j/2.x/manual/appenders/network.html#HttpAppender-attr-verifyHostName attribute that was not subject to this bug and verifies host names by default.\n\nUsers are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.","cvss":[{"source":"nvd@nist.gov","type":"Primary","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","metrics":{"baseScore":5.9,"exploitabilityScore":2.3,"impactScore":3.6},"vendorMetadata":{}},{"source":"security@apache.org","type":"Secondary","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","metrics":{"baseScore":6.3},"vendorMetadata":{}}],"epss":[{"cve":"CVE-2026-34477","epss":0.0041,"percentile":0.33733,"date":"2026-08-06"}],"cwes":[{"cve":"CVE-2026-34477","cwe":"CWE-297","source":"security@apache.org","type":"Secondary"},{"cve":"CVE-2026-34477","cwe":"CWE-295","source":"nvd@nist.gov","type":"Primary"}]}],"matchDetails":[{"type":"exact-direct-match","matcher":"java-matcher","searchedBy":{"language":"java","namespace":"github:language:java","package":{"name":"org.apache.logging.log4j:log4j-core","version":"2.14.1"}},"found":{"vulnerabilityID":"GHSA-6hg6-v5c8-fphq","versionConstraint":">=2.12.0,<2.25.4 (unknown)"},"fix":{"suggestedVersion":"2.25.4"}}],"artifact":{"id":"14c1fd57de411ba0","name":"log4j-core","version":"2.14.1","type":"java-archive","locations":null,"language":"java","licenses":[],"cpes":[],"purl":"pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1","upstreams":[],"metadataType":"JavaMetadata","metadata":{"virtualPath":"","pomArtifactID":"log4j-core","pomGroupID":"org.apache.logging.log4j","manifestName":"","archiveDigests":null}}}],"source":{"type":"sbom-file","target":"/private/tmp/claude-501/-Users-alex-Documents-checkouts-intentius-chant/406f2906-e1f1-488c-a98a-e79ee1f2e062/scratchpad/log4j.cdx.json"},"distro":{"name":"","version":"","idLike":null},"descriptor":{"name":"grype","version":"0.116.1","configuration":{"output":["json"],"file":"","pretty":false,"distro":"","add-cpes-if-none":false,"output-template-file":"","check-for-app-update":true,"only-fixed":false,"only-notfixed":false,"ignore-wontfix":"","platform":"","search":{"scope":"squashed","unindexed-archives":false,"indexed-archives":true},"ignore":[{"vulnerability":"","include-aliases":false,"reason":"","namespace":"","fix-state":"","package":{"name":"kernel-headers","version":"","language":"","type":"rpm","location":"","upstream-name":"kernel"},"vex-status":"","vex-justification":"","match-type":"exact-indirect-match"},{"vulnerability":"","include-aliases":false,"reason":"","namespace":"","fix-state":"","package":{"name":"linux(-.*)?-headers-.*","version":"","language":"","type":"deb","location":"","upstream-name":"linux.*"},"vex-status":"","vex-justification":"","match-type":"exact-indirect-match"},{"vulnerability":"","include-aliases":false,"reason":"","namespace":"","fix-state":"","package":{"name":"linux-libc-dev","version":"","language":"","type":"deb","location":"","upstream-name":"linux"},"vex-status":"","vex-justification":"","match-type":"exact-indirect-match"},{"vulnerability":"","include-aliases":false,"reason":"","namespace":"","fix-state":"","package":{"name":"linux-kbuild-.*","version":"","language":"","type":"deb","location":"","upstream-name":"linux.*"},"vex-status":"","vex-justification":"","match-type":"exact-indirect-match"}],"exclude":[],"externalSources":{"enable":false,"maven":{"searchUpstreamBySha1":true,"baseUrl":"https://search.maven.org/solrsearch/select","rateLimit":300000000}},"match":{"java":{"using-cpes":false},"jvm":{"using-cpes":true},"dotnet":{"using-cpes":false},"golang":{"using-cpes":false,"always-use-cpe-for-stdlib":false,"allow-main-module-pseudo-version-comparison":false},"javascript":{"using-cpes":false},"python":{"using-cpes":false},"ruby":{"using-cpes":false},"rust":{"using-cpes":false},"hex":{"using-cpes":false},"stock":{"using-cpes":true},"dpkg":{"using-cpes":false,"missing-epoch-strategy":"zero","use-cpes-for-eol":false},"rpm":{"using-cpes":false,"missing-epoch-strategy":"auto","use-cpes-for-eol":false}},"fail-on-severity":"","registry":{"insecure-skip-tls-verify":false,"insecure-use-http":false,"ca-cert":""},"show-suppressed":false,"by-cve":false,"SortBy":{"sort-by":"risk"},"name":"","default-image-pull-source":"","from":null,"vex-documents":[],"vex-add":[],"match-upstream-kernel-headers":false,"fix-channel":{"redhat-eus":{"apply":"auto","versions":">= 8.0"},"ubuntu-esm":{"apply":"auto","versions":""}},"timestamp":true,"alerts":{"enable-eol-distro-warnings":true},"db":{"cache-dir":"/Users/alex/Library/Caches/grype/db","update-url":"https://grype.anchore.io/databases","ca-cert":"","auto-update":true,"validate-by-hash-on-start":true,"validate-age":true,"max-allowed-built-age":432000000000000,"require-update-check":false,"update-available-timeout":30000000000,"update-download-timeout":300000000000,"max-update-check-frequency":7200000000000},"exp":{},"dev":{"db":{"debug":false}}},"db":{"status":{"schemaVersion":"v6.1.9","from":"https://grype.anchore.io/databases/v6/vulnerability-db_v6.1.9_2026-08-07T01:17:58Z_1786084371.tar.zst?checksum=sha256%3Ac567db13cde70e1caa677a4d8423b693c427ebc7c2a37f2946629a93d3fdb2c2","built":"2026-08-07T06:32:51Z","path":"/Users/alex/Library/Caches/grype/db/6/vulnerability.db","valid":true},"providers":{"alma":{"captured":"2026-08-07T01:18:09Z","input":"xxh64:128887b63e83640f"},"alpine":{"captured":"2026-08-07T01:18:10Z","input":"xxh64:2ecc1b561b86cb8d"},"amazon":{"captured":"2026-08-07T01:18:10Z","input":"xxh64:d668a591ee2bca06"},"arch":{"captured":"2026-08-07T01:18:06Z","input":"xxh64:8ecb0e8f71b0e571"},"bitnami":{"captured":"2026-08-07T01:18:13Z","input":"xxh64:ea999419043c798f"},"chainguard":{"captured":"2026-08-07T01:18:23Z","input":"xxh64:fa982cab855cc7f0"},"chainguard-libraries":{"captured":"2026-08-07T01:18:04Z","input":"xxh64:711ae24c8069918f"},"debian":{"captured":"2026-08-07T01:18:18Z","input":"xxh64:edc35605319da5c5"},"echo":{"captured":"2026-08-07T01:18:02Z","input":"xxh64:f6933304d0f51f96"},"eol":{"captured":"2026-08-07T01:18:01Z","input":"xxh64:bc5253144321b368"},"epss":{"captured":"2026-08-07T01:18:07Z","input":"xxh64:a91a128d39c4daab"},"fedora":{"captured":"2026-08-07T01:18:09Z","input":"xxh64:08cfefa858eef2c5"},"github":{"captured":"2026-08-07T01:19:06Z","input":"xxh64:79f81b2cffd8dbed"},"govulndb":{"captured":"2026-08-07T01:18:11Z","input":"xxh64:4218e3d3f068a1d8"},"hummingbird":{"captured":"2026-08-07T01:19:55Z","input":"xxh64:676c8a7b3706f91c"},"kev":{"captured":"2026-08-07T01:18:05Z","input":"xxh64:ef8fdafbe562fe4a"},"mariner":{"captured":"2026-08-07T01:17:58Z","input":"xxh64:c4749ffcfca6418c"},"minimos":{"captured":"2026-08-07T01:17:59Z","input":"xxh64:93b585ed0e5b9c48"},"nvd":{"captured":"2026-08-07T01:18:56Z","input":"xxh64:8fc444b55cb56507"},"oracle":{"captured":"2026-08-07T01:18:06Z","input":"xxh64:07641ba05ea34e54"},"photon":{"captured":"2026-08-07T01:18:00Z","input":"xxh64:b24ef819de3e090e"},"rhel":{"captured":"2026-08-07T01:19:15Z","input":"xxh64:be9e16181b7af424"},"secureos":{"captured":"2026-08-07T01:18:37Z","input":"xxh64:aa64dac440292218"},"sles":{"captured":"2026-08-07T01:18:39Z","input":"xxh64:5a56de1d28b9e0f2"},"ubuntu":{"captured":"2026-08-07T01:20:25Z","input":"xxh64:3f045d2e0bb1444f"},"wolfi":{"captured":"2026-08-07T01:18:19Z","input":"xxh64:a40627b8fcd62074"}}},"timestamp":"2026-08-07T15:43:35.78149-06:00"}}