From ba5c37dc02cc9b57b0b1febb0d441f9b9eb7e3c8 Mon Sep 17 00:00:00 2001 From: RiccardoBiosas Date: Thu, 15 Oct 2026 16:17:14 +0700 Subject: [PATCH 1/2] feat(summary): flag unreleased changes so main is not mistaken for the tagged release Data merged between releases was stamped with the previous version: after #18, main showed dataset 0.5.0 with 100 records while the v0.5.0 release holds 96. summary.json gains an additive unreleased_changes boolean, derived deterministically from a non-empty CHANGELOG [Unreleased] section, and the landing page says so. The release workflow refuses to tag while [Unreleased] has notes. CONTRIBUTING asks data PRs to add an [Unreleased] entry. Unit-tested. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 8 ++++++++ CONTRIBUTING.md | 3 ++- README.md | 2 +- scripts/build.mjs | 9 +++++++-- scripts/summary.mjs | 9 +++++++++ test/summary.test.mjs | 10 +++++++++- 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 388d3f2..1ca1480 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,14 @@ jobs: echo "skip=true" >> "$GITHUB_OUTPUT" fi + - name: Require an empty [Unreleased] section + if: steps.exists.outputs.skip != 'true' + run: | + if [ "$(node -p "require('./dist/summary.json').unreleased_changes")" = "true" ]; then + echo "::error::CHANGELOG [Unreleased] still has notes; move them into the version section before releasing." + exit 1 + fi + - name: Extract release notes from CHANGELOG if: steps.exists.outputs.skip != 'true' run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 857d2f5..d4364b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,6 +49,7 @@ Update the fields, add the new source(s), bump `last_updated`, and keep the `id` ## Commits and PRs - Conventional Commits; data changes use the `data:` scope (e.g. `data: add `). +- Every data PR adds a line under `## [Unreleased]` in `CHANGELOG.md`. That section drives `unreleased_changes` in `dist/summary.json`, so consumers can see when `main` is ahead of the latest tagged release. - CI runs `npm test`; nothing merges red. - Trust-critical paths (`data/`, `schema/`, `taxonomy/`, `scripts/`, `.github/`) have code owners (`.github/CODEOWNERS`). For this to actually gate merges, enable branch protection on `main` with **Require a pull request before merging**, **Require review from Code Owners**, and **Require status checks to pass** (select the `validate + build` check) — these are GitHub repo settings, not files in the repo. - If you change `schema/`, update `README.md`, the taxonomy files, and `CITATION.cff` as needed, and explain the migration in the PR. @@ -58,7 +59,7 @@ Update the fields, add the new source(s), bump `last_updated`, and keep the `id` The dataset follows semantic versioning: added records or enum values are a minor bump; a removed or renamed field or enum value is a major bump with a migration note. To cut a release: 1. On a `release/vX.Y.Z` branch, set the same version in `package.json` (`npm version X.Y.Z --no-git-tag-version`, which also updates `package-lock.json`) and in `CITATION.cff`, along with `date-released`. -2. Move the `[Unreleased]` notes in `CHANGELOG.md` into a dated `[X.Y.Z]` section. +2. Move the `[Unreleased]` notes in `CHANGELOG.md` into a dated `[X.Y.Z]` section, leaving `[Unreleased]` empty. The release workflow refuses to tag otherwise. 3. Run `npm test` and `npm run linkcheck`, commit the rebuilt `dist/` as `chore(release): vX.Y.Z`, and open a PR. 4. After the merge, `.github/workflows/release.yml` creates the `vX.Y.Z` tag and a GitHub Release. The release notes come from the changelog section, and the `dist/` artifacts and schema are attached. The workflow fails if that section is missing. diff --git a/README.md b/README.md index f7572e7..5bdae59 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ npm run build # writes the dist/ artifacts below | `dist/incidents.ndjson` | newline-delimited JSON (streaming) | | `dist/incidents.csv` | flattened columns for spreadsheets (map points as `geo_points` = `role:basis:country`) | | `dist/incidents/.json` | one file per incident (stable per-record URL) | -| `dist/summary.json` | counts + rollups (category, severity, status, actor type, autonomy level, AI role, model family, year) + `archive_coverage` + `geo_coverage` (points by role and basis) + `evidence_split` (records that are both `confirmed` and `load-bearing`, overall and by year, plus a status × AI-role crosstab; retracted/superseded excluded) | +| `dist/summary.json` | `dataset_version` + `unreleased_changes` (true when `main` is ahead of that tagged release) + counts + rollups (category, severity, status, actor type, autonomy level, AI role, model family, year) + `archive_coverage` + `geo_coverage` (points by role and basis) + `evidence_split` (records that are both `confirmed` and `load-bearing`, overall and by year, plus a status × AI-role crosstab; retracted/superseded excluded) | | `dist/stix/bundle.json` | STIX 2.1 bundle (reports + ATLAS/ATT&CK attack-patterns + CVE vulnerabilities) for TIP/MISP ingestion | | `dist/index.html` | landing page (served via GitHub Pages) | diff --git a/scripts/build.mjs b/scripts/build.mjs index 5e42e51..27dd001 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -13,10 +13,13 @@ import { sortKeysDeep, } from './lib.mjs'; import { buildStixBundle } from './stix.mjs'; -import { evidenceSplit } from './summary.mjs'; +import { evidenceSplit, hasUnreleasedChanges } from './summary.mjs'; const pkg = JSON.parse(readFileSync(path.join(ROOT, 'package.json'), 'utf8')); const schema = loadSchema(); +const unreleasedChanges = hasUnreleasedChanges( + readFileSync(path.join(ROOT, 'CHANGELOG.md'), 'utf8') +); const incidents = listIncidentFiles() .map((file) => loadIncident(file)) @@ -58,6 +61,8 @@ const geoCoverage = { const summary = { dataset_version: pkg.version, + // main is ahead of the tagged dataset_version (CHANGELOG [Unreleased] non-empty). + unreleased_changes: unreleasedChanges, schema: schema.$id, total: incidents.length, archive_coverage: { @@ -143,7 +148,7 @@ code{font-size:.85em}

Agentic Attack Index

-

Open, source-linked dataset of real-world AI-agent cyberattacks. Dataset version ${esc(pkg.version)}, ${incidents.length} incidents.

+

Open, source-linked dataset of real-world AI-agent cyberattacks. Dataset version ${esc(pkg.version)}${unreleasedChanges ? ' plus unreleased changes (see the CHANGELOG)' : ''}, ${incidents.length} incidents.

Artifacts: incidents.json summary.json diff --git a/scripts/summary.mjs b/scripts/summary.mjs index 6d8d706..5ffff7e 100644 --- a/scripts/summary.mjs +++ b/scripts/summary.mjs @@ -56,3 +56,12 @@ export function evidenceSplit(incidents) { ids: clb.map((i) => i.id).sort(), }; } + +// True when CHANGELOG.md's [Unreleased] section has any content, i.e. main +// carries data or tooling changes that no tagged release contains yet. Lets +// consumers tell "dataset_version X" (a tagged release) apart from "main ahead +// of X" without a version bump on every data merge. +export function hasUnreleasedChanges(changelog) { + const m = changelog.match(/^## \[Unreleased\][^\n]*\n([\s\S]*?)(?=^## \[|(?![\s\S]))/m); + return Boolean(m && m[1].trim()); +} diff --git a/test/summary.test.mjs b/test/summary.test.mjs index 05f0670..9fd055e 100644 --- a/test/summary.test.mjs +++ b/test/summary.test.mjs @@ -1,7 +1,7 @@ // Hermetic tests for the derived summary rollups in scripts/summary.mjs. import { test } from 'node:test'; import assert from 'node:assert/strict'; -import { evidenceSplit, activeRecords } from '../scripts/summary.mjs'; +import { evidenceSplit, activeRecords, hasUnreleasedChanges } from '../scripts/summary.mjs'; import { listIncidentFiles, loadIncident } from '../scripts/lib.mjs'; const rec = (over = {}) => ({ @@ -69,3 +69,11 @@ test('evidence_split over the real dataset is internally consistent', () => { assert.equal(yearSum, out.confirmed_load_bearing); assert.ok(out.confirmed_load_bearing <= out.total); }); + +test('hasUnreleasedChanges detects content under [Unreleased] only', () => { + const head = '# Changelog\n\nIntro.\n\n'; + assert.equal(hasUnreleasedChanges(`${head}## [Unreleased]\n\n## [1.0.0] - 2026-01-01\n\n- x\n`), false); + assert.equal(hasUnreleasedChanges(`${head}## [Unreleased]\n\n### Data\n- added\n\n## [1.0.0] - 2026-01-01\n`), true); + assert.equal(hasUnreleasedChanges(`${head}## [Unreleased]\n- only section\n`), true); + assert.equal(hasUnreleasedChanges(`${head}## [1.0.0] - 2026-01-01\n- x\n`), false); +}); From 279dbf2efc974f135003ed80e265d14f0b1e7e91 Mon Sep 17 00:00:00 2001 From: RiccardoBiosas Date: Thu, 15 Oct 2026 16:17:14 +0700 Subject: [PATCH 2/2] chore(release): v0.6.0 Bumps package.json and CITATION.cff from 0.5.0 to 0.6.0 (2026-10-15) and moves the #18 notes (4 incidents from the Rogue Agents Watch brief triage) plus the unreleased_changes addition into [0.6.0]. An additive minor bump with no schema change. npm test passes: 100 records, 17/17 tests. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 12 ++++++++++++ CITATION.cff | 2 +- dist/index.html | 4 ++-- dist/summary.json | 3 ++- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7093f37..fc3c6db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ dataset version tracks `package.json` and `CITATION.cff` (kept in sync by ## [Unreleased] +## [0.6.0] - 2026-10-15 + +### Added +- `dist/summary.json` gained **`unreleased_changes`** (boolean). It is true + when `CHANGELOG.md`'s `[Unreleased]` section has content, meaning `main` + carries changes that no tagged release contains yet. The landing page shows + "plus unreleased changes" in that case. Before this, data merged between + releases appeared under the previous version number: after #18 the site + showed "0.5.0" for 100 records, while the v0.5.0 release holds 96. +- The release workflow refuses to tag while `[Unreleased]` still has notes. + CONTRIBUTING now asks every data PR to add an `[Unreleased]` entry. + ### Data - Triage of an external candidate brief (Rogue Agents Watch, 2026-10-15). Of the candidates not already in the catalog, four passed re-validation against diff --git a/CITATION.cff b/CITATION.cff index 02a9829..8eac63d 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.5.0 +version: 0.6.0 date-released: 2026-10-15 license: CC-BY-SA-4.0 keywords: diff --git a/dist/index.html b/dist/index.html index c25b8e2..3d197a9 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,7 +3,7 @@ -Agentic Attack Index — dataset 0.5.0 +Agentic Attack Index — dataset 0.6.0