feat: enriched recommendations with attack scenarios and likelihood (#90) - #99
Merged
Merged
Conversation
) - 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #90 — Explain Like I'm Human (ELIH) mode for recommendations.
Changes
Backend:
attack_scenarioandlikelihoodfields to_Advicedataclass (default""for backwards compat)attack_scenarioandlikelihoodnullable columns toRecommendationORM model_migrate_schema()for existing databasesgenerate_recommendations()now writes both fields from the catalogueRecommendationOutand_rec_to_out()expose both fields via the APIFrontend:
attack_scenario: string | nullandlikelihood: string | nullto TypeScriptRecommendationinterfaceRecommendationDetailPagenow renders two expandable sections below the remediation steps:Testing
Closes #90