[Feature request] Paste a bug bounty program's scope (in scope, out of scope, wildcards) when creating a task

Open
#519 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start with ParseScopeLine in db/company_scope.go and its tests, since the wildcard rejection of *.example.com is the one self-contained step the issue proposes. Check how company domain scope matches on root_domain before deciding what a leading *. should map to. The maintainer has not yet answered the semantics questions in the thread, so confirm the intended behaviour before writing code. Done means the wildcard line parses and has tests, while the task-form preview and out-of-scope block rules stay out of scope for a first pass.

Written by the indexing model from the issue text.

Description

feature

The README lists authorized bug bounty programs as a permitted use, and findings already track report_state for submissions (#308). Setting up a task from a program's scope page is still slow and easy to get wrong, and on a bounty program a scope mistake means testing something the program doesn't allow.

What I hit setting one up

  • Wildcards are rejected. Most programs write in-scope entries as *.example.com. ParseScopeLine (db/company_scope.go) returns not recognizable as a valid domain/IP/CIDR: *.example.com, so every such line has to be rewritten by hand. Plain example.com, full URLs and host:port parse fine.
  • Out-of-scope entries are added one row at a time. Programs usually list several excluded hosts (admin.example.com, payments.example.com, a third-party status page). The task form's intercept rules editor takes one kind and pattern per row, while the company scope box already accepts a pasted list.
  • In scope and out of scope live in two places. In-scope goes into a company's scope, and exclusions go into the task's block rules. Nothing shows them side by side, so it is hard to check the setup against the program page before starting.

Proposal (vendor-neutral, plain text only)

One "Program scope" box on the task form. You paste text under In scope and Out of scope headings, or under two separate boxes. ARTEX shows a preview of what each line becomes before anything is saved:

  • *.example.com → domain scope for example.com and its subdomains
  • api.example.com, a URL or a CIDR → scope rows, using the existing parser
  • an out-of-scope line → a task-level block rule (exact_domain, fuzzy_domain, exact_url or cidr)
  • a line that can't be parsed → shown as an error in the preview and never silently dropped

There are no platform API integrations, tokens or scraping, just pasted text, so this stays generic like the rest of the provider and integration surface.

Suggested order, each step a small PR

  1. Accept a leading *. in ParseScopeLine as the domain itself, with tests. This is useful on its own.
  2. Let the task intercept rules editor take a pasted list (one pattern per line, kind inferred), using the same preview.
  3. The combined "Program scope" box with the in/out preview on the task form.

Questions before I start

  • Is a leading *. mapping to the domain scope (example.com and subdomains) the semantics you want, or should *.example.com exclude the apex?
  • When a program puts only specific subdomains in scope (api.example.com, but not the rest of example.com), what is the right place for that: a task subdomain scope row, or something else? Company domain scope matches on root_domain, so I want to avoid widening scope by accident.
  • Is the task form the right home, or would you rather have it on the company page?

I'm happy to do steps 1 and 2 first and hold step 3 until the shape is agreed.

Dominant language
Go
Stars
18.7k
Forks
7k
Avg merge
10h 57m
Merged PRs (30d)
494

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BaaRai/ARTEX

All issues in BaaRai/ARTEX

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.