nuke/lib/policy
Xe Iaso 6b1cd6120f
fix!(policy/checker): make List and-like (#1217)
* fix!(policy/checker): make List and-like

This has the potential to break user configs.

Anubis lets you stack multiple checks at once with blocks like this:

```yaml
name: allow-prometheus
action: ALLOW
user_agent_regex: ^prometheus-probe$
remote_addresses:
  - 192.168.2.0/24
```

Previously, this only returned ALLOW if _any one_ of the conditions
matched. This behaviour has changed to only return ALLOW if _all_ of the
conditions match.

I have marked this as a potentially breaking change because I'm
absolutely certain that someone is relying on this behaviour due to
spacebar heating. If this bites you, please let me know ASAP.

Signed-off-by: Xe Iaso <me@xeiaso.net>
Assisted-by: GPT-OSS 120b on local hardware

* fix(policy/checker): more explicit short-circuit

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-10-25 01:25:05 +00:00
..
checker fix!(policy/checker): make List and-like (#1217) 2025-10-25 01:25:05 +00:00
config fix(web): embed challenge ID in pass-challenge invocations (#944) 2025-08-04 18:49:19 +00:00
expressions feat(expressions): add contentLength to bot expressions (#1120) 2025-09-15 01:41:45 +00:00
testdata feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
bot.go perf: Replace internal SHA256 hashing with xxhash for 4-6x performance improvement (#676) 2025-06-16 22:53:53 -04:00
celchecker.go feat(expressions): add contentLength to bot expressions (#1120) 2025-09-15 01:41:45 +00:00
checker.go lib/checker: Implement X-Original-URI support (#1015) 2025-08-23 23:14:37 -04:00
checker_test.go lib/checker: Implement X-Original-URI support (#1015) 2025-08-23 23:14:37 -04:00
checkresult.go feat(lib): implement request weight (#621) 2025-06-09 15:25:04 -04:00
policy.go refactor(web): redo proof of work web worker logic (#941) 2025-08-02 11:27:26 -04:00
policy_test.go docs: remove JSON examples from policy file docs (#945) 2025-08-03 18:09:26 +00:00
thresholds.go feat(config): custom weight thresholds via CEL (#688) 2025-06-18 16:58:31 -04:00