From 2f879a10443b814ce0e260ffd94c23484f0118c5 Mon Sep 17 00:00:00 2001 From: RiccardoBiosas Date: Thu, 15 Oct 2026 18:48:25 +0700 Subject: [PATCH 1/2] fix(schema): restrict sources[].archive_url to Wayback Machine snapshots The schema accepted any http(s) URL as archive_url, so a hand-edited record could introduce an arbitrary host as an archive. It now requires https://web.archive.org/web/<14-digit timestamp>/. All 185 existing values already conform. The template example uses the timestamped form. New tests cover the accepted form and reject other hosts, plain http, a missing timestamp, look-alike domains, and javascript:/data: schemes. Co-Authored-By: Claude Opus 5.5 --- data/incidents/_TEMPLATE.yml | 2 +- schema/incident.schema.json | 4 +-- test/sources.test.mjs | 48 ++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 test/sources.test.mjs diff --git a/data/incidents/_TEMPLATE.yml b/data/incidents/_TEMPLATE.yml index 0e97d3a..d4e2b4c 100644 --- a/data/incidents/_TEMPLATE.yml +++ b/data/incidents/_TEMPLATE.yml @@ -163,7 +163,7 @@ sources: - title: "Placeholder source — replace with the real disclosure" url: "https://example.com/replace-me" # Optional: a Wayback/archive snapshot so the record survives link rot. - # archive_url: "https://web.archive.org/web/0/https://example.com/replace-me" + # archive_url: "https://web.archive.org/web/20260101000000/https://example.com/replace-me" publisher: "Example Publisher" type: other date: 2026-01-01 diff --git a/schema/incident.schema.json b/schema/incident.schema.json index 111f509..b4b84c2 100644 --- a/schema/incident.schema.json +++ b/schema/incident.schema.json @@ -309,8 +309,8 @@ "archive_url": { "type": "string", "format": "uri", - "pattern": "^https?://", - "description": "Optional archival snapshot (e.g. Wayback Machine) so the record survives link rot. Must resolve independently of url." + "pattern": "^https://web\\.archive\\.org/web/[0-9]{14}/", + "description": "Optional Wayback Machine snapshot (https://web.archive.org/web/<14-digit timestamp>/) so the record survives link rot. Restricted to Wayback snapshots so no other host can be introduced as an archive." }, "publisher": { "type": "string", "minLength": 1 }, "type": { diff --git a/test/sources.test.mjs b/test/sources.test.mjs new file mode 100644 index 0000000..b5b460d --- /dev/null +++ b/test/sources.test.mjs @@ -0,0 +1,48 @@ +// Hermetic tests for source URL rules: url must be http(s); archive_url must be +// a Wayback Machine snapshot, so no other host can be introduced as an archive. +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import Ajv2020 from 'ajv/dist/2020.js'; +import addFormats from 'ajv-formats'; +import { loadSchema } from '../scripts/lib.mjs'; + +const ajv = new Ajv2020({ allErrors: true, strict: true }); +addFormats(ajv); +const validate = ajv.compile(loadSchema()); + +const withSource = (src) => ({ + id: 'fixture-record', + name: 'Fixture', + summary: 'Fixture summary long enough to satisfy the schema minimum length.', + date_disclosed: '2026-01-01', + status: 'reported', + confidence: 'secondary', + category: 'ai-orchestrated-campaign', + severity: 'low', + models: [], + model_families: ['other'], + actor: 'Fixture actor', + actor_type: 'unknown', + sources: [{ title: 'Fixture source', url: 'https://fixture.invalid/a', publisher: 'Fixture Publisher', type: 'vendor-report', date: '2026-01-01', ...src }], +}); + +test('archive_url accepts a Wayback snapshot with a 14-digit timestamp', () => { + assert.equal(validate(withSource({ archive_url: 'https://web.archive.org/web/20261015120000/https://fixture.invalid/a' })), true, JSON.stringify(validate.errors)); +}); + +for (const bad of [ + 'https://evil.example/web/20261015120000/https://fixture.invalid/a', // another host + 'http://web.archive.org/web/20261015120000/https://fixture.invalid/a', // not https + 'https://web.archive.org/web/0/https://fixture.invalid/a', // no timestamp + 'https://web.archive.org.evil.example/web/20261015120000/x', // look-alike host + 'javascript:alert(1)', // script scheme +]) { + test(`archive_url rejects ${bad}`, () => { + assert.equal(validate(withSource({ archive_url: bad })), false); + }); +} + +test('url rejects non-http(s) schemes', () => { + assert.equal(validate(withSource({ url: 'javascript:alert(1)' })), false); + assert.equal(validate(withSource({ url: 'data:text/html,x' })), false); +}); From 51c63084f535a0a4159e97f00e9d2395e16417fa Mon Sep 17 00:00:00 2001 From: RiccardoBiosas Date: Thu, 15 Oct 2026 18:48:25 +0700 Subject: [PATCH 2/2] chore(release): v0.7.1 Patch release. Contents: the issue-only archive workflow (#21), 48 Wayback snapshots taking archive coverage to 91% (#22), corrected off-by-one counts in the 0.5.0/0.6.0 changelog entries plus the template-aware validator count (#22), and the archive_url Wayback-only schema rule. No record facts changed. npm test passes: 99 records + 1 template, 29/29 tests. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 11 +++++++++++ CITATION.cff | 2 +- dist/index.html | 4 ++-- dist/summary.json | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173ce4b..c38b323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ dataset version tracks `package.json` and `CITATION.cff` (kept in sync by ## [Unreleased] +## [0.7.1] - 2026-10-15 + +### Security +- `sources[].archive_url` must now be a Wayback Machine snapshot + (`https://web.archive.org/web/<14-digit timestamp>/…`). Previously the schema + accepted any `http(s)` URL, so a hand-edited record could introduce another + host as an "archive". All 185 existing values already conform, so no data + changed. `sources[].url` stays `http(s)`-only, which keeps `javascript:` and + `data:` links out of every consumer. Tests cover the accepted form and + rejected hosts, schemes and look-alike domains. + ### Changed - The weekly `archive` workflow no longer pushes a branch or opens a pull request, so the repo setting "Allow GitHub Actions to create and approve diff --git a/CITATION.cff b/CITATION.cff index 765321c..a588dcc 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,7 +10,7 @@ authors: website: "https://mlsecopshub.com" repository-code: "https://github.com/MLSecOpsHub/agentic-attack-index" url: "https://mlsecopshub.com" -version: 0.7.0 +version: 0.7.1 date-released: 2026-10-15 license: CC-BY-SA-4.0 keywords: diff --git a/dist/index.html b/dist/index.html index 8a9c586..5fd71ca 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,7 +3,7 @@ -Agentic Attack Index — dataset 0.7.0 +Agentic Attack Index — dataset 0.7.1