Skip to content

chore: post-SC code review — remove emojis, fix French strings, refactor enrichment, add docstrings#77

Merged
Rowuni merged 2 commits into
developfrom
copilot/review-repo-post-sc
May 25, 2026
Merged

chore: post-SC code review — remove emojis, fix French strings, refactor enrichment, add docstrings#77
Rowuni merged 2 commits into
developfrom
copilot/review-repo-post-sc

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 25, 2026

Post-scoring-completion code review pass across the agent codebase. Addresses encoding risks from emoji in source, non-English output strings, a function violating SRP, and missing public API documentation.

agent/scan.py

  • Emojis removed: _SEV_ICON (🔴🟠🟡🟢⚪) replaced with ASCII _SEV_LABEL ([CRIT]/[HIGH]/[MED]/[LOW]/[INFO]) in both the Markdown table header and per-finding rows
  • French strings fixed: "rapport JSON" / "rapport Markdown""JSON report" / "Markdown report"
  • SRP refactor: _enrich_risk_scores() had two distinct loops (risk scoring + recommendation enrichment); the second extracted into _enrich_recommendations(), both called from run_scan()
# Before: one function doing two unrelated things
def _enrich_risk_scores(findings): ...   # risk scores AND recommendations

# After: two focused functions
def _enrich_risk_scores(findings): ...   # risk scores only
def _enrich_recommendations(findings): ... # recommendations only

agent/scoring/criticality_factor.py

  • Added docstrings to category_from_source() and criticality_factor()

agent/scanners/crypto_libs.py

  • Added docstrings to detect_openssl() and scan_crypto_libs()

Copilot AI linked an issue May 25, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Review repository post SC for POC demonstration chore: post-SC code review — remove emojis, fix French strings, refactor enrichment, add docstrings May 25, 2026
Copilot finished work on behalf of Rowuni May 25, 2026 16:24
Copilot AI requested a review from Rowuni May 25, 2026 16:24
@Rowuni Rowuni marked this pull request as ready for review May 25, 2026 16:27
@Rowuni Rowuni merged commit 2b6fb45 into develop May 25, 2026
@Rowuni Rowuni deleted the copilot/review-repo-post-sc branch May 25, 2026 16:28
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.

Review de repo post SC

2 participants