Skip to content

Improve remediate reports with prompt before/after and severity-ordered recommendations#80

Merged
melonattacker merged 3 commits intomainfrom
feature/improve-remediate-report
Apr 21, 2026
Merged

Improve remediate reports with prompt before/after and severity-ordered recommendations#80
melonattacker merged 3 commits intomainfrom
feature/improve-remediate-report

Conversation

@melonattacker
Copy link
Copy Markdown
Collaborator

This pull request enhances the prompt remediation reporting by tracking and displaying the original and updated system prompts before and after remediation. It also refactors how recommendations are sorted by severity and ensures these improvements are reflected in both the codebase and the test suite.

Prompt Remediation Enhancements:

  • Added original_system_prompt and updated_system_prompt fields to the PromptRemediation data structure, schema, and report outputs to capture the system prompt before and after remediation. These are now included in both markdown and HTML reports. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated test fixtures and test cases to cover the new fields, ensuring correct serialization, deserialization, and report rendering. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Recommendation Sorting Improvements:

  • Refactored recommendation sorting by introducing _severity_rank and _sorted_recommendations helpers, replacing duplicated inline sorting logic and ensuring consistent ordering by severity in both markdown and HTML reports. [1] [2] [3] [4] [5] [6]

These changes improve the transparency of prompt changes and the clarity of remediation reports, while also cleaning up and unifying recommendation sorting logic.

@melonattacker melonattacker merged commit 000cf8d into main Apr 21, 2026
2 checks passed
@melonattacker melonattacker deleted the feature/improve-remediate-report branch April 21, 2026 08:34
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.

1 participant