Repository navigation
feat(reporting): Phase 4 grounded AI reporting, SMB remediation UX & encrypted secrets - #8
Open
huangji6693-max wants to merge 1 commit into
Conversation
…crypted API keys - Add finding ID citations ([ID: <finding.id>]) and sanitize_grounded_report anti-hallucination filter in app/services/ai_reporter.py - Add OWASP_REMEDIATION_CARDS and explain_risk_rule safety score algorithm in app/services/owasp.py - Render per-OWASP-category plain-English remediation cards and fix guidance in static/index.html, static/js/app.js, and static/css/style.css - Add PBKDF2-HMAC-SHA256 passphrase-encrypted API key storage (enc:v1:...) and production plaintext warning in app/services/secrets.py - Document safety score algorithm and viva demo walkthrough in docs/safety_score_and_chapter5.md and add tests/test_ai_reporting_phase4.py Closes BreachDirect#3
6 tasks
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 Phase 4 AI reporting & SMB-friendly UX:
app/services/ai_reporter.py): Added explicit finding ID citations ([ID: <finding.id>]) across template and Claude AI reports, plussanitize_grounded_report()to strip unverified finding citations and prevent hallucinated CVE numbers.app/services/owasp.py,static/index.html,static/js/app.js,static/css/style.css): AddedOWASP_REMEDIATION_CARDS(A01:2021–A10:2021) and rendered plain-English remediation cards and per-finding "How to fix" guidance in the dashboard.app/services/owasp.py,docs/safety_score_and_chapter5.md): Addedexplain_risk_rule()alongsiderisk_grade()and documented the A–F decision table, 0–100 penalty formula, and < 5-minute viva demo guide (Slides 9–10).app/services/secrets.py): Addedencrypt_secret(),decrypt_secret(), andresolve_anthropic_api_key()using PBKDF2-HMAC-SHA256 (enc:v1:...), and updatedvalidate_settings()to warn inproductionwhenANTHROPIC_API_KEYis stored in plaintext without encryption.tests/test_ai_reporting_phase4.py): Added unit and contract tests for grounded citations, CVE hallucination sanitization, remediation cards, A–F safety score grading, and encrypted secret storage.Verification
pytest tests/ -v: 16 passedruff check app tests: All checks passedbandit -r app -c bandit.yaml -ll -q: CleanCloses #3
Payout Wallets
GBYWLISGOUWQ43VQEGXX6KRGDZ3CKAFFK3JXVLXKDO5TIFJUJ3OHJYOZ0x380C97bcbcAEf29DAc2d0ba7E180F1b4A7F38fddAyXYaA9Nf4z5fpLKY6DmubWe6D2qveMd79w8pEDNHcDw