Add report fragments and export manifest

This commit is contained in:
2026-05-16 03:11:56 +02:00
parent 2a1a53c140
commit 6c467dd1f4
22 changed files with 630 additions and 24 deletions

View File

@@ -74,7 +74,17 @@
"mappings": [
"sdk-fixture-map"
],
"report_fragments": [],
"report_fragments": [
{
"id": "sdk-fixture-summary",
"kind": "python_module",
"module_path": "reports/sdk_fixture_summary.py",
"callable": "build_fragment",
"path": null,
"title": "SDK Fixture Summary",
"description": "Summarizes SDK fixture evidence for report fragment tests."
}
],
"dependencies": [],
"restricted_assets": [],
"certification_boundary": "SDK fixture only. It does not certify any product, process, or repository."

View File

@@ -0,0 +1,26 @@
"""Report fragment for the SDK fixture extension."""
from __future__ import annotations
def build_fragment(context: dict) -> dict:
evidence_count = len(context["evidence"])
finding_count = len(context["findings"])
source_lock = context["source_lock"]
markdown = "\n".join(
[
"### SDK Fixture Summary",
"",
f"- evidence items: {evidence_count}",
f"- findings: {finding_count}",
f"- source lock: {source_lock.get('id')}",
]
)
return {
"markdown": markdown,
"structured": {
"evidence_count": evidence_count,
"finding_count": finding_count,
"source_lock_ref": source_lock.get("id"),
},
}