Skip to content

feat: Phase 1.1 Policy as Code engine with structured violations - #24

Merged
Falkesand merged 10 commits into
mainfrom
feature/policy-as-code
Feb 12, 2026
Merged

Falkesand merged 10 commits into
mainfrom
feature/policy-as-code

Conversation

@Falkesand

Copy link
Copy Markdown
Owner

Summary

  • Extract inline EvaluateExitCode into dedicated PolicyEvaluator static class returning structured PolicyViolation records with CRA article references and remediation hints
  • Add 3 new CraConfig rules: NoCriticalVulnerabilities, MinPackageMaintainers, BlockUnmaintainedMonths (with month-level granularity and precedence over boolean flag)
  • Wire ExcludePackages (case-insensitive filtering before scoring) and ComplianceNotes (justification text on violations)
  • Replace CLI bullet output with Spectre.Console table (Rule/Sev./Details/CRA Art./Remediation) and upgrade HTML report with unified violations table and excluded packages info card
  • 15 policy rule checks mapped to specific EU Cyber Resilience Act articles
  • 16 new unit tests, 519 total passing, 0 build warnings

Test plan

  • All 519 tests pass (0 failures, 0 warnings)
  • Dual code review passed (Sonnet + Opus)
  • ExcludePackages filters packages, transitivePackages, and allPackages before scoring
  • CraArticle escaped in Spectre.Console CLI table
  • Old EvaluateExitCode and SetPolicyViolations APIs fully removed

@Falkesand
Falkesand merged commit 36ca693 into main Feb 12, 2026
1 check passed
@Falkesand
Falkesand deleted the feature/policy-as-code branch February 12, 2026 11:32
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