Skip to content

feat(web): render dynamic dashboards and finding lifecycle for generic/custom skills - #210

Open
SriRamkunamsetty wants to merge 1 commit into
secfoo-com:mainfrom
SriRamkunamsetty:feat/custom-skills-dashboard-92
Open

SriRamkunamsetty wants to merge 1 commit into
secfoo-com:mainfrom
SriRamkunamsetty:feat/custom-skills-dashboard-92

Conversation

@SriRamkunamsetty

Copy link
Copy Markdown
Contributor

Fixes #92

Summary

  • Added generic \OUTPUT_CONTRACT\ extractor in \src/secfoo/report/generic.py\ supporting 4/5-column Findings Registers, fallback detail headings, example filtering, custom severity normalization, overall risk rating extraction, and contract-compliance signaling.
  • Added persistent \generic_findings\ lifecycle storage (\schema.sql, \schema_indexes.sql, \GenericFindingRecord), CRUD methods + one-time chronological backfill migration (\generic_findings_backfill_v1), and runner lifecycle updates in \src/secfoo/runner.py.
  • Refactored /activities/{skill_id}\ to dispatch via \skill.output_type\ instead of hardcoded \skill_id ==\ chains, routing specialized custom skills (such as \output: sast) to their dedicated dashboards and routing generic/custom skills (\deployment-readiness, \prompt-review, user custom skills) to the new dynamic \generic_dashboard\ builder & templates.
  • Added filterable Open/Closed findings register (\status, \project_id, \severity, \�erdict, \q), severity donut with custom severity bucket support, overall risk rating distribution, 20-run trend chart, contract mismatch alert, /activities/{skill_id}/findings/{finding_id}\ detail view, and \ op_findings\ integration.
  • Added unit and end-to-end integration tests in \ ests/test_report/test_generic.py\ and \ ests/test_web/test_generic_dashboard.py.

Verification


  • uff check .\ — 0 errors
  • \�andit -c .bandit -ll -r src/secfoo\ — 0 medium/high issues
  • \secfoo skills validate examples/skills\ — 2 valid, 0 problems
  • \pytest tests/test_report/test_generic.py tests/test_web/test_generic_dashboard.py tests/test_web/test_widget_info_tips.py tests/test_web/test_no_inline_scripts.py tests/test_web/test_top_findings.py tests/test_web/test_activity_routes.py tests/test_custom_skills.py tests/test_runner.py tests/test_docs_consistency.py -q\ — 162 passed

@vsn411 vsn411 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and welcome! Routing /activities/{skill_id} by output_type instead of a chain of skill_id == checks is the right refactor for #92. The generic register parser and the lifecycle table with a one-time backfill marker are well built, and the generic dashboard gives custom skills a real page for the first time.

Two things before we merge:

  1. A custom skill with output: sast would show someone else's data. _SPECIALIZED_DASHBOARDS[output_type] calls sast_dashboard.build(repo) (and likewise SCA, secret scanning and threat modeling). Those builders take no skill_id: they read the built-in skill's tables. The runner also only writes structured SAST/SCA/secret findings for the built-in skill_ids (STRUCTURED_FINDINGS_SKILLS). So a custom output: sast skill's page would show the built-in SAST skill's findings, and none of its own. Please route to a specialized dashboard only when skill_id is the built-in one, and send custom skills to the generic dashboard. Giving those builders a skill_id can be a follow-up.
  2. Responsible AI. #208 (about to merge) adds a dedicated dashboard for responsible-ai-compliance. With this PR as it stands, that output type falls through to the generic dashboard too. Please add it to _NON_GENERIC_OUTPUTS, or to the specialized map once #208 is in, so the page doesn't render both. Whichever of the two merges second will need a small rebase in activities.py and detail.html.

CI hasn't run yet because this is your first PR here. A maintainer will approve the workflow run.

@SriRamkunamsetty
SriRamkunamsetty force-pushed the feat/custom-skills-dashboard-92 branch from 7dbb4c3 to 505e78f Compare November 30, 2026 01:46
@SriRamkunamsetty

Copy link
Copy Markdown
Contributor Author

Addressed review feedback and rebased onto \main:

  1. Isolated custom skills declaring \output: sast\ (etc.): \�ctivities.py\ now routes to _SPECIALIZED_DASHBOARDS\ only for built-in \skill_id\s, sending custom skills with specialized \output:\ overrides to \generic_dashboard\ (with their own \generic_findings\ rows in
    unner.py\ / backfill) so they never show built-in SAST/SCA/secret data. Added \ est_custom_sast_output_routes_to_generic_dashboard_not_builtin_sast.
  2. Responsible AI (Responsible AI: output contract, program dashboard and AI-BOM cross-check (#131) #208): Integrated
    ai_dash\ cleanly during rebase and added
    esponsible-ai-compliance\ to _NON_GENERIC_OUTPUTS\ / \SPECIALIZED_FINDINGS_OUTPUTS\ (verified via \ est_responsible_ai_does_not_render_generic_dashboard).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard for custom skills: render any skill's output dynamically

2 participants