Check if secrets are rotated within the last N days
Result
package main import rego.v1 default allow := false rotation_window := "720h" #30d allow if { rotation_ns := time.parse_rfc3339_ns(input.LastRotation) window_ns := time.parse_duration_ns(rotation_window) time.now_ns() - rotation_ns < window_ns }
Was this page helpful?