Skip to content

feat: enriched recommendations with attack scenarios and likelihood (#90) - #99

Merged
reloadfast merged 2 commits into
mainfrom
feat/elih-recommendations-90
Mar 1, 2026
Merged

reloadfast merged 2 commits into
mainfrom
feat/elih-recommendations-90

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Summary

Implements issue #90 — Explain Like I'm Human (ELIH) mode for recommendations.

Changes

Backend:

  • Added attack_scenario and likelihood fields to _Advice dataclass (default "" for backwards compat)
  • Populated all 27 catalogue entries with plain-language exploitation narratives and realistic home network likelihood assessments
  • Added attack_scenario and likelihood nullable columns to Recommendation ORM model
  • Added schema migrations in _migrate_schema() for existing databases
  • generate_recommendations() now writes both fields from the catalogue
  • RecommendationOut and _rec_to_out() expose both fields via the API

Frontend:

  • Added attack_scenario: string | null and likelihood: string | null to TypeScript Recommendation interface
  • RecommendationDetailPage now renders two expandable sections below the remediation steps:
    • 🎯 How could this be exploited? — plain-language attack narrative
    • 📊 How likely is this on a home network? — realistic risk assessment
    • Both sections are conditionally rendered (only shown when fields are non-empty)

Testing

  • All 241 existing tests pass
  • Ruff and Prettier checks pass

Closes #90

reloadfast and others added 2 commits March 1, 2026 19:50
)

- Add attack_scenario and likelihood fields to _Advice dataclass
- Populate all 27 catalogue entries with plain-language exploitation
  narratives and realistic home network likelihood assessments
- Add attack_scenario and likelihood columns to Recommendation ORM model
- Add schema migrations for existing DBs in _migrate_schema()
- Populate new fields in generate_recommendations()
- Add attack_scenario and likelihood to RecommendationOut schema
- Update _rec_to_out() to expose new fields via API
- Add attack_scenario/likelihood to TypeScript Recommendation interface
- Add expandable 'How could this be exploited?' and 'How likely is this?'
  sections to RecommendationDetailPage (hidden when fields are empty)

Closes #90

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reloadfast
reloadfast merged commit f9142dd into main Mar 1, 2026
7 checks passed
@reloadfast
reloadfast deleted the feat/elih-recommendations-90 branch March 1, 2026 18:56
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.

feat: Enriched recommendations — plain-language attack context

1 participant