generated from coulomb/repo-seed
Add report fragments and export manifest
This commit is contained in:
@@ -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."
|
||||
|
||||
26
extensions/sdk-fixture/reports/sdk_fixture_summary.py
Normal file
26
extensions/sdk-fixture/reports/sdk_fixture_summary.py
Normal 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"),
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user