Skip to content

Commit a37068a

Browse files
authored
fix(default-config): remove browser detection logic (#1360)
Looks like these rules don't work anymore. Closes: #1353 Signed-off-by: Xe Iaso <me@xeiaso.net>
1 parent 9d9be61 commit a37068a

3 files changed

Lines changed: 1 addition & 94 deletions

File tree

data/botPolicies.yaml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -95,53 +95,6 @@ bots:
9595
# weight:
9696
# adjust: -10
9797

98-
# Assert behaviour that only genuine browsers display. This ensures that Chrome
99-
# or Firefox versions
100-
- name: realistic-browser-catchall
101-
expression:
102-
all:
103-
- '"User-Agent" in headers'
104-
- '( userAgent.contains("Firefox") ) || ( userAgent.contains("Chrome") ) || ( userAgent.contains("Safari") )'
105-
- '"Accept" in headers'
106-
- '"Sec-Fetch-Dest" in headers'
107-
- '"Sec-Fetch-Mode" in headers'
108-
- '"Sec-Fetch-Site" in headers'
109-
- '"Accept-Encoding" in headers'
110-
- '( headers["Accept-Encoding"].contains("zstd") || headers["Accept-Encoding"].contains("br") )'
111-
- '"Accept-Language" in headers'
112-
action: WEIGH
113-
weight:
114-
adjust: -10
115-
116-
# The Upgrade-Insecure-Requests header is typically sent by browsers, but not always
117-
- name: upgrade-insecure-requests
118-
expression: '"Upgrade-Insecure-Requests" in headers'
119-
action: WEIGH
120-
weight:
121-
adjust: -2
122-
123-
# Chrome should behave like Chrome
124-
- name: chrome-is-proper
125-
expression:
126-
all:
127-
- userAgent.contains("Chrome")
128-
- '"Sec-Ch-Ua" in headers'
129-
- 'headers["Sec-Ch-Ua"].contains("Chromium")'
130-
- '"Sec-Ch-Ua-Mobile" in headers'
131-
- '"Sec-Ch-Ua-Platform" in headers'
132-
action: WEIGH
133-
weight:
134-
adjust: -5
135-
136-
- name: should-have-accept
137-
expression:
138-
all:
139-
- userAgent.contains("Mozilla")
140-
- '!("Accept" in headers)'
141-
action: WEIGH
142-
weight:
143-
adjust: 5
144-
14598
# Generic catchall rule
14699
- name: generic-browser
147100
user_agent_regex: >-

data/meta/default-config.yaml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -79,53 +79,6 @@
7979
# weight:
8080
# adjust: -10
8181

82-
# Assert behaviour that only genuine browsers display. This ensures that Chrome
83-
# or Firefox versions
84-
- name: realistic-browser-catchall
85-
expression:
86-
all:
87-
- '"User-Agent" in headers'
88-
- '( userAgent.contains("Firefox") ) || ( userAgent.contains("Chrome") ) || ( userAgent.contains("Safari") )'
89-
- '"Accept" in headers'
90-
- '"Sec-Fetch-Dest" in headers'
91-
- '"Sec-Fetch-Mode" in headers'
92-
- '"Sec-Fetch-Site" in headers'
93-
- '"Accept-Encoding" in headers'
94-
- '( headers["Accept-Encoding"].contains("zstd") || headers["Accept-Encoding"].contains("br") )'
95-
- '"Accept-Language" in headers'
96-
action: WEIGH
97-
weight:
98-
adjust: -10
99-
100-
# The Upgrade-Insecure-Requests header is typically sent by browsers, but not always
101-
- name: upgrade-insecure-requests
102-
expression: '"Upgrade-Insecure-Requests" in headers'
103-
action: WEIGH
104-
weight:
105-
adjust: -2
106-
107-
# Chrome should behave like Chrome
108-
- name: chrome-is-proper
109-
expression:
110-
all:
111-
- userAgent.contains("Chrome")
112-
- '"Sec-Ch-Ua" in headers'
113-
- 'headers["Sec-Ch-Ua"].contains("Chromium")'
114-
- '"Sec-Ch-Ua-Mobile" in headers'
115-
- '"Sec-Ch-Ua-Platform" in headers'
116-
action: WEIGH
117-
weight:
118-
adjust: -5
119-
120-
- name: should-have-accept
121-
expression:
122-
all:
123-
- userAgent.contains("Mozilla")
124-
- '!("Accept" in headers)'
125-
action: WEIGH
126-
weight:
127-
adjust: 5
128-
12982
# Generic catchall rule
13083
- name: generic-browser
13184
user_agent_regex: >-

docs/docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Anubis is back and better than ever! Lots of minor fixes with some big ones inte
2828
- Open Graph passthrough now reuses the configured target Host/SNI/TLS settings, so metadata fetches succeed when the upstream certificate differs from the public domain. ([1283](https://github.com/TecharoHQ/anubis/pull/1283))
2929
- Stabilize the CVE-2025-24369 regression test by always submitting an invalid proof instead of relying on random POW failures.
3030
- Refine the check that ensures the presence of the Accept header to avoid breaking docker clients.
31+
- Removed rules intended to reward actual browsers due to abuse in the wild.
3132

3233
### Dataset poisoning
3334

0 commit comments

Comments
 (0)