From 6c79008c9241b0e19de782a9d6c4b56b8c18aa17 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Mon, 9 Nov 2026 17:29:43 +0100 Subject: [PATCH 1/2] new: [affected-code] Add affected-code object template --- objects/affected-code/definition.json | 76 +++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 objects/affected-code/definition.json diff --git a/objects/affected-code/definition.json b/objects/affected-code/definition.json new file mode 100644 index 00000000..a07f52b3 --- /dev/null +++ b/objects/affected-code/definition.json @@ -0,0 +1,76 @@ +{ + "attributes": { + "end-column": { + "description": "Last source column of the affected span, retaining the source numbering convention.", + "disable_correlation": true, + "misp-attribute": "integer", + "to_ids": false, + "ui-priority": 1 + }, + "end-line": { + "description": "Last source line of the affected span, retaining the source numbering convention.", + "disable_correlation": true, + "misp-attribute": "integer", + "to_ids": false, + "ui-priority": 1 + }, + "file-sha256": { + "description": "SHA-256 of the affected file, selected by the fingerprint algorithm; do not coerce another hash algorithm into this field.", + "disable_correlation": false, + "misp-attribute": "sha256", + "to_ids": false, + "ui-priority": 1 + }, + "filename": { + "description": "Path of the file containing the affected code; fall back to file.name when a path is unavailable.", + "disable_correlation": true, + "misp-attribute": "filename", + "to_ids": false, + "ui-priority": 1 + }, + "remediation": { + "description": "Recommended remediation for this code location.", + "disable_correlation": true, + "misp-attribute": "text", + "to_ids": false, + "ui-priority": 1 + }, + "rule-id": { + "description": "Identifier of the scanner rule that identified this span.", + "disable_correlation": true, + "misp-attribute": "text", + "to_ids": false, + "ui-priority": 1 + }, + "rule-name": { + "description": "Name of the scanner rule that identified this span.", + "disable_correlation": true, + "misp-attribute": "text", + "to_ids": false, + "ui-priority": 1 + }, + "start-column": { + "description": "First source column of the affected span, retaining the source numbering convention.", + "disable_correlation": true, + "misp-attribute": "integer", + "to_ids": false, + "ui-priority": 1 + }, + "start-line": { + "description": "First source line of the affected span, retaining the source numbering convention.", + "disable_correlation": true, + "misp-attribute": "integer", + "to_ids": false, + "ui-priority": 1 + } + }, + "description": "A vulnerable source-code location, with one file and an optional line and column range, associated rule and remediation. Based on OCSF 1.9.0: https://schema.ocsf.io/1.9.0/objects/affected_code.", + "meta-category": "vulnerability", + "name": "affected-code", + "requiredOneOf": [ + "filename", + "file-sha256" + ], + "uuid": "5c7ff3ec-750d-497b-9185-408c4aa3b7d3", + "version": 1 +} \ No newline at end of file From 94fab9466e8ab765f4d91afba6bbc36033f00400 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Mon, 9 Nov 2026 17:42:03 +0100 Subject: [PATCH 2/2] fix: [affected-code] Address Codex review feedback --- objects/affected-code/definition.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/objects/affected-code/definition.json b/objects/affected-code/definition.json index a07f52b3..81f9499a 100644 --- a/objects/affected-code/definition.json +++ b/objects/affected-code/definition.json @@ -3,14 +3,14 @@ "end-column": { "description": "Last source column of the affected span, retaining the source numbering convention.", "disable_correlation": true, - "misp-attribute": "integer", + "misp-attribute": "counter", "to_ids": false, "ui-priority": 1 }, "end-line": { "description": "Last source line of the affected span, retaining the source numbering convention.", "disable_correlation": true, - "misp-attribute": "integer", + "misp-attribute": "counter", "to_ids": false, "ui-priority": 1 }, @@ -52,14 +52,14 @@ "start-column": { "description": "First source column of the affected span, retaining the source numbering convention.", "disable_correlation": true, - "misp-attribute": "integer", + "misp-attribute": "counter", "to_ids": false, "ui-priority": 1 }, "start-line": { "description": "First source line of the affected span, retaining the source numbering convention.", "disable_correlation": true, - "misp-attribute": "integer", + "misp-attribute": "counter", "to_ids": false, "ui-priority": 1 } @@ -72,5 +72,5 @@ "file-sha256" ], "uuid": "5c7ff3ec-750d-497b-9185-408c4aa3b7d3", - "version": 1 + "version": 2 } \ No newline at end of file