Skip to content

fix(ai-agent): complete the ATR category mapping and repair its target reference - #459

Open
eeee2345 wants to merge 1 commit into
gemaraproj:mainfrom
eeee2345:fix/atr-mapping-completeness
Open

fix(ai-agent): complete the ATR category mapping and repair its target reference#459
eeee2345 wants to merge 1 commit into
gemaraproj:mainfrom
eeee2345:fix/atr-mapping-completeness

Conversation

@eeee2345

Copy link
Copy Markdown
Contributor

@jpower432 — two defects in the artifact from #428, found while building the follow-on we discussed there. Split out as a fix so it does not sit behind the design conversation on the catalogs.

The target reference does not resolve. target-reference.reference-id and its entry in metadata.mapping-references both say ATR-AI-AGENT-CAP, but the capability catalog's metadata.id is ATR-AI-AGENT-CAPABILITY-CATALOG. #MappingReference says that when url is absent the id is the referenced artifact's metadata.id, so as merged this document points at nothing. Both occurrences fixed.

The mapping is a category short. ATR's rules/ on main has ten detection categories; this maps nine. model-security was added upstream after #428 merged and never got an entry, so the artifact under-reports its own coverage without saying so.

Added, with the caveat stated rather than papered over: of that category's rules, only behaviour extraction relates to a capability this catalog models. The other two — poisoned fine-tuning data, and unsafe deserialization when a model artifact is loaded — are model supply chain, and there is no capability here for either. The rationale says that instead of reaching for an adjacent capability to make the row look complete. Proposing the missing capabilities is a separate change.

Also drops "nine" from the description. Not changed to "ten" — a count in prose goes stale the next time upstream adds a category, which is precisely how this one became wrong.

Verified: go test -run TestSchemaValidation passes, and every capability id the mapping references now resolves against the capability catalog.

Unrelated, but worth knowing since you will see it locally: TestNoBreakingChanges currently fails on #EvaluationLog and #ControlEvaluation against released v1.5.0. It fails on a clean main too, so it is not from this branch.

…t reference

Two defects in the artifact merged in gemaraproj#428, found while building the follow-on
catalogs.

The target reference does not resolve. `target-reference.reference-id` and the
matching entry in `metadata.mapping-references` both say `ATR-AI-AGENT-CAP`,
but the capability catalog's `metadata.id` is `ATR-AI-AGENT-CAPABILITY-CATALOG`.
Per the `#MappingReference` doc comment, when `url` is absent the id is the
referenced artifact's `metadata.id`, so as merged this mapping points at
nothing. Both occurrences now use the real id.

The mapping is a category short. ATR's `rules/` directory on main carries ten
detection categories; this document maps nine. `model-security` was added
upstream after gemaraproj#428 merged and never got an entry, so the artifact silently
under-reports its own coverage. Added, with the honest caveat: only the
behaviour-extraction rules in that category relate to a capability this catalog
models, and the rationale says so rather than reaching for an adjacent one. The
capabilities the rest of the category needs are a separate proposal.

Also drops the word "nine" from the description. Not changed to "ten": a count
in prose goes stale the next time upstream adds a category, which is exactly
how this one became wrong.

Verified: TestSchemaValidation passes, and every capability id referenced by the
mapping now resolves against the capability catalog.

Signed-off-by: Adam Lin <adam@agentthreatrule.org>
@eeee2345
eeee2345 requested a review from a team as a code owner August 24, 2026 08:39
@github-actions github-actions Bot added the fix label Aug 24, 2026
@eeee2345

Copy link
Copy Markdown
Contributor Author

@jpower432 — the red X on this PR is not from this branch, and the detail is probably worth having.

CI fails on TestNoBreakingChanges/#EvaluationLog and TestNoBreakingChanges/#ControlEvaluation, both reporting field "assessment-logs" not present when main is compared against the released v1.5.0. I reproduced it on a clean checkout of main at 9d36c25 with no changes in the tree, and it fails there the same way.

The timeline points at the release rather than at any branch:

Last green CI 2026-08-14 20:24Z, fix/start-required
v1.5.0 published 2026-08-14 20:57Z, 33 minutes later
CI run 2026-08-20 dependabot/github_actions/dependencies — same two subtests fail
CI run 2026-08-24 this branch — same two subtests fail

Those two are the only CI runs since the release, and both failed. The dependabot one is the useful data point: it bumps GitHub Actions dependencies and cannot touch a CUE schema, so the compatibility gate has been failing for anything that runs it since v1.5.0 shipped.

Reading it as a schema question rather than a test question: #ControlEvaluation gained assessment-logs, and the released v1.5.0 does not have it, so the gate is doing its job — the incompatibility is real, it just predates this branch by ten days and no PR had run CI in between to surface it.

Nothing here needs anything from this PR; flagging it so the failure is not read as coming from these two lines of YAML. Happy to open a separate issue with the reproduction if that is more useful than a comment on an unrelated PR.

@jpower432

Copy link
Copy Markdown
Contributor

Thanks @eeee2345. Seeing the failure on other PRs as well. I will get a fix up to unblock this.

@jpower432

Copy link
Copy Markdown
Contributor

@eeee2345 A rebase should fix the failing CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants