Merge master
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
2026-10-25 15:21:56 +11:00
32 changed files with 1232 additions and 88 deletions
+11
View File
@@ -198,6 +198,17 @@ func (r *Remote) ValidateSyncInterval() error {
return nil
}
// DefaultQuarantineDays matches the remotes.quarantine_days column default.
const DefaultQuarantineDays = 3
// ValidateQuarantine rejects an enabled quarantine with no window.
func (r *Remote) ValidateQuarantine() error {
if r.QuarantineEnabled && r.QuarantineDays < 1 {
return fmt.Errorf("quarantine_days must be at least 1 when quarantine_enabled is set")
}
return nil
}
// ValidatePatterns ensures every configured regex compiles. Storing an
// invalid pattern would otherwise be silently dropped at match time, which
// for the blocklist is a fail-open: a mistyped deny rule becomes a no-op.