You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamicRules lacks the three auto-ban fields guard-core 3.13.0+ reads #44
A dynamic rule pushed from the SaaS is applied in full on guard-core 3.13.0+ instead of ending in Failed to apply dynamic rules: 'DynamicRules' object has no attribute 'enable_rate_limit_auto_ban' on every poll.
What happens
guard-core 3.13.0 added auto_ban_threshold, auto_ban_duration and enable_rate_limit_auto_ban to the rule application step (_apply_feature_toggles reads rules.enable_rate_limit_auto_ban, then rules.auto_ban_threshold, rules.auto_ban_duration). The DynamicRules model that guard-agent hands it (guard_agent/models.py) never defined them, so the attribute access raises, guard-core's handler logs the error and restores its config snapshot, and it repeats on every poll (every 60s on the default interval). Reproduced live on guard-core 3.15.0 / fastapi-guard 7.8.2 / guard-agent 2.9.0 against a fresh SaaS project, before any rule was pushed (the platform default rule already trips it).
Expected
DynamicRules carries the three fields as optional overrides defaulting to None, matching the existing toggle fields, so guard-core skips them when unset and applies them when the backend sends them.
Activity