Cybersecurity-Projects/PROJECTS
CarterPerez-dev 538395ebcc feat(policy): Crystal Policy as Code DSL with macros + compile-time enum autocast
- Policy struct: matcher Proc, max_age, warn_at, enforce_action, notify_channels, triggers
- Builder validates all required fields at .build, raises BuilderError with the policy name
- DSL exposes top-level 'policy' method via 'with builder yield' so all
  builder methods (description, match, max_age, enforce, notify_via, etc.)
  are receiver-less inside the block
- Symbol literals autocast to Action/Channel/Trigger enums on direct calls;
  Symbol overload for splat parameters (notify_via :telegram, :email)
- Evaluator subscribes to bus, fires PolicyViolation + RotationScheduled
  (rotate_immediately) or AlertRaised (notify_only/quarantine) when overdue
- 15 unit specs cover Policy.matches?/overdue?/in_warning_window?,
  Builder validation, DSL syntax with closures, evaluator action dispatch
2026-04-29 00:56:29 -04:00
..
advanced chore: add demos for projects, update haskell-reverse-proxy modules, refresh siem assets 2026-04-26 23:12:48 -04:00
beginner chore: add demos for projects, update haskell-reverse-proxy modules, refresh siem assets 2026-04-26 23:12:48 -04:00
intermediate feat(policy): Crystal Policy as Code DSL with macros + compile-time enum autocast 2026-04-29 00:56:29 -04:00