Skip to content

Responsible AI: a real output contract and dashboard (per-dimension coverage, framework tier, AI-BOM cross-check) instead of the generic SAST-shaped report #131

Done

Description

@vsn411

Problem: responsible-ai-compliance is the only governance skill, and it is also the only one of the main activities without its own output contract or dashboard. It falls through to the generic OUTPUT_CONTRACT in skills/renderer.py, which is shaped for code findings: a register with a CWE column and a Confirmed/Conditional/Latent verdict. A real run against openai/openai-quickstart-python (Claude, 2026-11-15) shows the result: six findings about missing model cards, audit trails and user disclosure, tagged CWE-668, CWE-778 or "unverified". The skill's own seven dimensions (documentation, bias and fairness, human oversight, transparency, data provenance, framework alignment, auditability and recourse) and its severity rubric (stakes of the decision × missing safeguards) appear nowhere in the data. The Responsible AI page (web/routes/responsible_ai.py) can therefore only show one badge per assessment (high-risk / moderate / low-risk, provisional / confirmed), and /activities/responsible-ai-compliance is the generic severity view.

Goal: a Responsible AI report whose structure matches the skill, parsed into columns, and a dashboard that answers "which dimension is failing, for which system, at what stakes".

Build:

  1. RESPONSIBLE_AI_OUTPUT_CONTRACT in skills/renderer.py (registered in SKILL_OUTPUT_CONTRACTS), keeping the two invariants every skill shares (**Overall risk rating:** line, ### [SEVERITY] Fn: headings). Sections: AI system profile (models and providers in use, what the system decides or influences, who is affected, stakes tier), Dimension coverage table (one row per dimension: adequate / partial / missing / not applicable, evidence, finding IDs), Findings with a Dimension column instead of CWE and an optional Framework column (NIST AI RMF function, EU AI Act article or risk class, internal policy ID) instead of the verdict, Remediation roadmap, Coverage notes.
  2. Parse and persist. A report/responsible_ai.py parser (pure functions, like report/sast.py) extracting the profile, the dimension table and per-finding dimension/framework into new tables (rai_dimensions, rai_findings), written at complete_run. Store the overall rating on the run too, so the badge no longer re-reads every report file on every page load (_responsible_ai_badges and count_assessments_with_responsible_ai_risk open N files per request today).
  3. Dashboard. /activities/responsible-ai-compliance gets a dedicated page like the SAST and threat-modeling ones: a dimension × project heat map, open findings grouped by dimension, stakes tier per system, and the framework mapping when present. /responsible-ai gains low-risk and moderate counts next to high-risk and links each row to the dimension view.
  4. AI-BOM cross-check. Include the assessment's AI-BOM (ai_bom_items) in the brief when one is attached; the system profile lists models found in code that are not in the AI-BOM and vice versa; show the diff on the assessment page.
  5. Skill text. Keep the rubric; add the instruction to fill the dimension table even when a dimension has no finding ("adequate" with evidence), and say that CWE is not expected.
  6. Docs: docs/REFERENCE.md gains a "Responsible AI program dashboard" section like the others, with a screenshot.

Where to look: src/secfoo/skills/definitions/responsible-ai-compliance.md, src/secfoo/skills/renderer.py (OUTPUT_CONTRACT, SKILL_OUTPUT_CONTRACTS), src/secfoo/report/sast.py and report/severity.py (parser patterns), src/secfoo/storage/repository.py (_responsible_ai_badges, complete_run, ai_bom_items), src/secfoo/web/routes/responsible_ai.py, activities.py and the *_dashboard.py modules, src/secfoo/web/templates/responsible_ai.html, tests/test_web/test_assessment_routes.py.

Relation: PR #130 (a Low rating showed as "moderate") is the floor this builds on; the custom-skills dashboard work in #92 may share the "render a skill's table dynamically" piece.

Done when: a run with the new contract parses into the dimension table (tests with a fixture report); the badge comes from the stored rating, with a migration test; the dimension view renders with real data (screenshot in the PR); the AI-BOM diff shows on an assessment with an attached BOM; docs updated.

Activity

  1. added
    enhancement
    help wanted
    hackathon
    difficulty: hard
    on Nov 15, 2026
  2. added a commit that references this issue on Nov 29, 2026
    4a4e58f
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

    difficulty: hardenhancementhackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions