Skip to content

Commit 13ec94f

Browse files
authored
Merge pull request #83 from RedTeamSubnet/ab_sniffer_v4
Auto Browser Sniffer v4
2 parents f0c9b69 + 4e668f9 commit 13ec94f

136 files changed

Lines changed: 708 additions & 1000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Auto Browser Sniffer v3
2+
title: Auto Browser Sniffer v4
33
---
4-
# AB Sniffer v3 Submission Guide (Active after Aug 24th 2025 14:00 UTC)
4+
# AB Sniffer v4 Submission Guide (Active after Oct 16th 2025 10:00 UTC)
55

66
## Overview
77

8-
**AB Sniffer v3** is the next iteration of **AB Sniffer** challenge which tests participants' ability to develop a SDK that can detect and correctly identify automation frameworks by name. The challenge evaluates how well the SDK can analyze automation behavior and identify unique characteristics or "leaks" from different automation tools interacting with a web page. With the new iteration, we are introducing one more frameworks to be detected which is **Camoufox**
8+
**AB Sniffer v4** is the next iteration of **Auto Browser Sniffer** challenge which tests participants' ability to develop a SDK that can detect and correctly identify automation frameworks by name. The challenge evaluates how well the SDK can analyze automation behavior and identify unique characteristics or "leaks" from different automation tools interacting with a web page. With the new iteration, we are introducing one more frameworks to be detected which are **Botasaurus**, **Pydoll** and a **human-in-the-loop** interaction scenario.
99

10-
Participants must demonstrate precise detection capabilities across multiple automation frameworks while maintaining reliability across different execution headless mode.
10+
Participants must demonstrate precise detection capabilities across multiple automation frameworks while maintaining reliability across different execution headless mode and human-in-the-loop scenarios.
1111

1212
---
1313

1414
## Example Code and Submission Instructions
1515

16-
Example codes for the AB Sniffer v3 can be found in the [`redteam_core/miner/commits/ab_sniffer_v3/`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/ab_sniffer_v3/) directory.
16+
Example codes for the AB Sniffer v4 can be found in the [`redteam_core/miner/commits/ab_sniffer_v4/`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/ab_sniffer_v4/) directory.
1717

1818
### Technical Requirements
1919

@@ -23,7 +23,7 @@ Example codes for the AB Sniffer v3 can be found in the [`redteam_core/miner/com
2323

2424
### Core Requirements
2525

26-
1. Use our template from [`redteam_core/miner/commits/ab_sniffer_v3/src/detection/detection.js`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/ab_sniffer_v3/src/detection/detection.js)
26+
1. Use our template from [`redteam_core/miner/commits/ab_sniffer_v4/src/detection/detection.js`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/ab_sniffer_v4/src/detection/detection.js)
2727
2. Keep the detection function signature unchanged
2828
3. Your SDK must:
2929
- Detect automation frameworks interacting with the page
@@ -41,6 +41,9 @@ Your SDK should be capable of detecting these automation frameworks:
4141
- **puppeteerextra**
4242
- **zendriver**
4343
- **camoufox**
44+
- **botasaurus**
45+
- **pydoll**
46+
- **human**
4447

4548
### Key Guidelines
4649

@@ -62,7 +65,7 @@ Your SDK will be scored based on:
6265
- **Detection Accuracy**: Correctly identifying automation frameworks by name
6366
- **Consistency**: Maintaining accuracy across multiple test runs
6467
- **Coverage**: Number of frameworks successfully detected
65-
- **Minimum Requirement**: Must detect at least 2 of the 4 frameworks with 100% accuracy to qualify
68+
- **Minimum Requirement**: Must detect at least 7 frameworks with 100% accuracy to qualify
6669

6770
### Scoring System
6871

@@ -81,21 +84,21 @@ We maintain strict originality standards:
8184

8285
Follow 1~6 steps to submit your SDK.
8386

84-
1. **Navigate to the AB Sniffer v2 Commit Directory**
87+
1. **Navigate to the AB Sniffer v4 Commit Directory**
8588

8689
```bash
87-
cd redteam_core/miner/commits/ab_sniffer_v3
90+
cd redteam_core/miner/commits/ab_sniffer_v4
8891
```
8992

9093
2. **Build the Docker Image**
9194

92-
To build the Docker image for the AB Sniffer v2 submission, run:
95+
To build the Docker image for the AB Sniffer v4 submission, run:
9396

9497
```bash
95-
docker build -t my_hub/ab_sniffer_v3-miner:0.0.1 .
98+
docker build -t my_hub/ab_sniffer_v4-miner:0.0.1 .
9699
97100
# For MacOS (Apple Silicon) to build AMD64:
98-
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t myhub/ab_sniffer_v3-miner:0.0.1 .
101+
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t myhub/ab_sniffer_v4-miner:0.0.1 .
99102
```
100103

101104
3. **Log in to Docker**
@@ -113,23 +116,23 @@ Follow 1~6 steps to submit your SDK.
113116
Push the tagged image to your Docker Hub repository:
114117

115118
```bash
116-
docker push myhub/ab_sniffer_v3:0.0.1
119+
docker push myhub/ab_sniffer_v4:0.0.1
117120
```
118121

119122
5. **Retrieve the SHA256 Digest**
120123

121124
After pushing the image, retrieve the digest by running:
122125

123126
```bash
124-
docker inspect --format='{{index .RepoDigests 0}}' myhub/ab_sniffer_v3:0.0.1
127+
docker inspect --format='{{index .RepoDigests 0}}' myhub/ab_sniffer_v4:0.0.1
125128
```
126129

127130
6. **Update active_commit.yaml**
128131

129132
Finally, go to the `neurons/miner/active_commit.yaml` file and update it with the new image tag:
130133

131134
```yaml
132-
- ab_sniffer_v3---myhub/ab_sniffer_v3@<sha256:digest>
135+
- ab_sniffer_v4---myhub/ab_sniffer_v4@<sha256:digest>
133136
```
134137

135138
---

neurons/validator/base_validator.py

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,8 @@ def forward_local_scoring(
397397
else:
398398
bt.logging.warning(
399399
f"[FORWARD LOCAL SCORING] Skipping scoring for {today_key}"
400-
)
401-
bt.logging.info(
402400
f"[FORWARD LOCAL SCORING] Current hour: {current_hour}, Scoring hour: {constants.SCORING_HOUR}"
403-
)
404-
bt.logging.info(
405401
f"[FORWARD LOCAL SCORING] Scoring dates: {self.scoring_dates}"
406-
)
407-
bt.logging.info(
408402
f"[FORWARD LOCAL SCORING] Revealed commits: {str(revealed_commits)[:100]}..."
409403
)
410404

@@ -651,6 +645,9 @@ def get_revealed_commits(self) -> dict[str, list[MinerChallengeCommit]]:
651645
seen_docker_hub_ids: set[str] = set()
652646

653647
revealed_commits: dict[str, list[MinerChallengeCommit]] = {}
648+
_list_existing_commits = []
649+
_list_revealed_commits = []
650+
_list_skipped_commits = []
654651
for (uid, hotkey), commits in self.miner_commits.items():
655652
for challenge_name, commit in commits.items():
656653
bt.logging.info(
@@ -669,22 +666,34 @@ def get_revealed_commits(self) -> dict[str, list[MinerChallengeCommit]]:
669666
challenge_name
670667
].get_unique_scored_docker_hub_ids()
671668
):
672-
# Only reveal unique docker hub ids in one pass, also ignore if docker_hub_id has been scored
673-
bt.logging.info(
674-
f"[GET REVEALED COMMITS] Skipping commit, Already revealed: {uid} - {hotkey}"
669+
_list_existing_commits.append(
670+
f"{challenge_name}-{uid}-{hotkey}-{docker_hub_id}"
675671
)
676672
continue
677673
else:
678674
commit.docker_hub_id = docker_hub_id
679675
this_challenge_revealed_commits.append(commit)
680676
seen_docker_hub_ids.add(docker_hub_id)
681-
bt.logging.info(
682-
f"[GET REVEALED COMMITS] Revealed commit: {uid} - {hotkey} - {challenge_name} - {commit.encrypted_commit}"
677+
_list_revealed_commits.append(
678+
f"{challenge_name}-{uid}-{hotkey}-{docker_hub_id}"
683679
)
684680
else:
685-
bt.logging.info(
686-
f"[GET REVEALED COMMITS] Skipping commit: Not revealed yet: {uid} - {hotkey}"
681+
_list_skipped_commits.append(
682+
f"{challenge_name}-{uid}-{hotkey}-{commit.encrypted_commit}"
687683
)
684+
for list_name, list_data in [
685+
("Existing", sorted(_list_existing_commits)),
686+
("Revealed", sorted(_list_revealed_commits)),
687+
("Skipped", sorted(_list_skipped_commits)),
688+
]:
689+
if list_data:
690+
bt.logging.info(
691+
f"[GET REVEALED COMMITS] {list_name} commits: {'\n'.join(list_data)}"
692+
)
693+
else:
694+
bt.logging.info(
695+
f"[GET REVEALED COMMITS] No {list_name.lower()} commits"
696+
)
688697

689698
return revealed_commits
690699

redteam_core/challenge_pool/ab_sniffer_v3/src/api/endpoints/challenge/service.py

Lines changed: 0 additions & 182 deletions
This file was deleted.

redteam_core/challenge_pool/ab_sniffer_v3/.dockerignore renamed to redteam_core/challenge_pool/ab_sniffer_v4/.dockerignore

File renamed without changes.

redteam_core/challenge_pool/ab_sniffer_v3/.env.example renamed to redteam_core/challenge_pool/ab_sniffer_v4/.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ ABSC_API_PORT=10001
1515
# ABSC_API_DOCS_OPENAPI_URL="{api_prefix}/openapi.json"
1616
# ABSC_API_DOCS_DOCS_URL="{api_prefix}/docs"
1717
# ABSC_API_DOCS_REDOC_URL="{api_prefix}/redoc"
18+
19+
ABSC_CHALLENGE_PUSHCUT_API_KEY="pushcut_api_key_here"
20+
ABSC_CHALLENGE_PUSHCUT_SHORTCUT="rt-abs"
21+
ABSC_CHALLENGE_PUSHCUT_SERVER_ID="pushcut_server_id_here"
22+
ABSC_CHALLENGE_PUSHCUT_WEB_URL="http://reward-app:10001/_web"
23+
24+
RT_COMPARER_RANDOM_SEED="RANDOM_SEED"
File renamed without changes.

redteam_core/challenge_pool/ab_sniffer_v3/README.md renamed to redteam_core/challenge_pool/ab_sniffer_v4/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ cd ~/workspaces/projects
4949

5050
```sh
5151
git clone https://github.com/RedTeamSubnet/RedTeam.git && \
52-
cd RedTeam/redteam_core/challenge_pool/ab_sniffer_v3
52+
cd RedTeam/redteam_core/challenge_pool/ab_sniffer_v4
5353
```
5454

5555
**OPTION B.** Clone the repository (for **DEVELOPMENT**: git + ssh key):
5656

5757
```sh
5858
git clone --recursive git@github.com:RedTeamSubnet/RedTeam.git && \
59-
cd RedTeam/redteam_core/challenge_pool/ab_sniffer_v3 && \
59+
cd RedTeam/redteam_core/challenge_pool/ab_sniffer_v4 && \
6060
git submodule update --init --recursive && \
6161
git submodule foreach --recursive git checkout main
6262
```
File renamed without changes.

redteam_core/challenge_pool/ab_sniffer_v3/challenge_manager.py renamed to redteam_core/challenge_pool/ab_sniffer_v4/challenge_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, challenge_info: dict, metagraph: bt.metagraph):
3232

3333
self.max_similarity = 0.4
3434
self.min_similarity = 0
35-
self.min_score = 0.5
35+
self.min_score = 0.7
3636
self.break_point = 0.6
3737
self.max_input = 1.0
3838
self.min_value = 0
File renamed without changes.

0 commit comments

Comments
 (0)