Skip to content

fix(oie): align OWASP LLM Top10 / AIX B2 gold to hub AI CREs #1124

Open

Description

@northdpole

Problem

The AIX B2 arm (run_full_pipeline.py → fixture owasp_llm_top10_2025) scores 0% exact on the d1-winner combo, while the librarian already returns AI Exchange–topic CREs.

Canonical gold in application/tests/fixtures/owasp_mappings/owasp_llm_top10_2025.json still uses classic AppSec CREs (often via gold_remap: related_expand_orphan). Hub Links gold under tmp/oie_owasp_eval/hub_link_gold/owasp_llm_top10_2025.json is the AI set.

Example (LLM01 Prompt Injection):

  • B2 gold: Input validation / Injection protection / Output encoding…
  • Hub: 686-110 Direct prompt injection, 012-625 Indirect prompt injection
  • Pred (d1-winner): includes 686-110 → hub hit, B2 miss

Re-score of d1-winner preds vs nonempty hub gold: 3/6 = 50% (LLM06–09 hub Links empty today).

Evidence

  • tmp/oie_owasp_eval/experiments/miss_slice_d1_winner.json (worktree OpenCRE-wt-oie-1088-dual)
  • tmp/oie_owasp_eval/experiments/product_metric_d1_winner.json — aix exact 0%, d1 10%
  • Unit test already encodes the intended contract and fails on current fixture:
    • application.tests.owasp_mapping_fixtures_test.TestOwaspMappingFixtures.test_llm_top10_uses_ai_topic_cres_not_classic

Proposed fix

  1. Rewrite owasp_llm_top10_2025.json cre_ids to hub AI CREs (LLM01–05, LLM10 from hub Links / AI Exchange).
  2. For LLM06–09 (empty hub today): add provisional AI-topic gold (same provenance pattern as other provisional fixtures) — do not leave classic AppSec stand-ins.
  3. Drop or invert related_expand_orphan for this fixture so classic neighbors are not treated as exact gold.
  4. Make test_llm_top10_uses_ai_topic_cres_not_classic green; re-run AIX B2 arm (Module C env unchanged).

Out of scope

  • Librarian toggles / Module C ablations (will not fix this mismatch).
  • Expecting AIX exact lift from SHORTLIST_JUDGE / leaf-drill env alone.

Success

  • Fixture test green
  • AIX B2 exact ≫ 0% on same d1-winner librarian defaults (target: match hub-proxy ballpark on nonempty sections)
  • Docs note in docs/oie/full-pipeline.md that AIX arm gold is hub AI CREs, not classic expand

Activity

  1. northdpole commented on Oct 2, 2026

    @northdpole
    CollaboratorAuthor

    Implemented on stack/oie-p7-full-pipeline-docs (worktree):

    • Rewrote application/tests/fixtures/owasp_mappings/owasp_llm_top10_2025.json to hub AI CREs for LLM01–05/10.
    • LLM06–09 use provisional AI Exchange topic CREs (gold_provenance.kind=provisional) — hub Links were empty.
    • Dropped classic AppSec / related_expand_orphan for this fixture.
    • test_llm_top10_uses_ai_topic_cres_not_classic and parser test green.

    Also shipping Module C defaults: FORCE_RESOURCES=api, SHORTLIST_JUDGE_MAX_PICKS=3. Cold-start full verify in progress.

  2. northdpole commented on Oct 2, 2026

    @northdpole
    CollaboratorAuthor

    Cold-start after hub gold + MAX_PICKS=3 + experimental FORCE_RESOURCES=api:

    Arm before (d1-winner) cold-start
    GitHub exact 33.7% 32.2%
    GitHub d1 58.4% 59.9%
    Top10 exact 80% 90%
    API exact 60% 50% (FORCE=api regression)
    AIX exact 0% 50% (gold fix)

    Shipping: hub/provisional gold + SHORTLIST_JUDGE_MAX_PICKS=3. Leaving FORCE_RESOURCES off by default (API exact regression). Evidence: tmp/oie_owasp_eval/experiments/product_metric_cold_start_post60.json.

  3. bhushan4work commented on Oct 4, 2026

    @bhushan4work

    I would like to work on this issue , could u please assign it to me

  4. V-2007-P commented on Oct 19, 2026

    @V-2007-P

    Hey! @northdpole ...
    I’m interested in contributing to this issue. I noticed that the fixture updates and tests have already been reported as completed. Is there any remaining part of this issue that would be useful for me to take on? I’d be happy to help once the scope is clear.

  5. Bornunique911 commented on Nov 2, 2026

    @Bornunique911
    Contributor

    Hey @northdpole — verified that the fixture-alignment requirements in this issue are already present on staging: AI-topic hub/provisional gold, no related_expand_orphan on the LLM fixture, a passing AI-topic fixture test, and the AIX gold documentation note.

    PR #1197 is complementary rather than the implementation of the fixture fix. It adds B2 report provenance (gold, gold_original, gold_remap, gold_is_expanded, and remap summary) so future scoring can be audited for expanded/remapped evidence without changing scoring or fixture content.

    The only acceptance evidence not independently re-run by #1197 is the AIX B2 measurement; the issue’s existing report records 50% exact after the gold fix.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions