nuke/lib/policy/config/testdata/good
Xe Iaso 22c47f40d1
feat(expressions): add randInt function to allow making rules nondeterministic (#578)
This seems counter-intuitive at first glance, but let me cook.

One of the problems with Anubis is that the rule matching is super
deterministic. This means that attackers can figure out what patterns
they are hitting and change things to bypass them.

The randInt function lets you have rulesets behave nondeterministically.
This is a very easy way to hang yourself, but can be great to
psychologically mess with scraper operators. Consider this rule:

```yaml
- name: deny-lightpanda-sometimes
  action: DENY
  expression:
    all:
      - userAgent.matches("LightPanda")
      - randInt(16) >= 4
```

It would match about 75% of the time.

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-28 16:36:27 -04:00
..
allow_everyone.json Refactor and split out things into cmd and lib (#77) 2025-03-22 18:44:49 -04:00
allow_everyone.yaml lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
block_cf_workers.json Add headers bot rule (#300) 2025-04-20 22:18:21 +00:00
block_cf_workers.yaml lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
challengemozilla.json Refactor and split out things into cmd and lib (#77) 2025-03-22 18:44:49 -04:00
challengemozilla.yaml lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
entropy.yaml feat(expressions): add randInt function to allow making rules nondeterministic (#578) 2025-05-28 16:36:27 -04:00
everything_blocked.json Refactor and split out things into cmd and lib (#77) 2025-03-22 18:44:49 -04:00
everything_blocked.yaml lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
git_client.json feat(checker): add CEL for matching complicated expressions (#421) 2025-05-03 14:26:54 -04:00
git_client.yaml feat(checker): add CEL for matching complicated expressions (#421) 2025-05-03 14:26:54 -04:00
import_filesystem.json feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
import_filesystem.yaml feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
import_keep_internet_working.json feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
import_keep_internet_working.yaml feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
old_xesite.json test(config): add Xesite's old policy file to known good test cases (#382) 2025-04-27 13:32:50 +00:00
status-codes-paranoid.json feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00
status-codes-paranoid.yaml feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00
status-codes-rfc.json feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00
status-codes-rfc.yaml feat(config): add ability to customize HTTP status codes Anubis returns (#393) 2025-04-29 15:13:44 -04:00