> For the complete documentation index, see [llms.txt](https://copilot-docs.bugbase.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://copilot-docs.bugbase.ai/enterprise/how-pentest-copilot-works.md).

# How Pentest Copilot Works

The Discovery and Assessment phases, run intents, and the key terms used throughout Pentest Copilot.

Pentest Copilot works like a methodical penetration tester. It first learns what exists in scope, then tests it, then proves each finding before reporting it. Web and Network assessments split this work into two phases you can run separately or together.

## The Two Phases

### Discovery

Discovery builds an inventory of the attack surface. It does not send attack payloads.

* **Web:** subdomains, exposed services, pages, the APIs those pages call, and **trajectories**: recorded user flows such as "search for a product" or "update profile".
* **Network:** live hosts, services, Active Directory objects, and cloud resources visible to the agent.

Everything Discovery finds is stored in the **Exploit Graph** for that target. It stays there for later runs.

### Assessment

Assessment actively tests the inventory. It never invents new scope: it only tests what Discovery stored.

* **Web:** generates test cases for each selected trajectory and attack vector, and sends them through each authentication context.
* **Network:** checks discovered entities against the exploit families you allow, then chains credentials, privileges, and trust relationships into attack paths.

Each candidate finding goes through validation. Unconfirmed results are marked false positives and repeats are marked duplicates, so **Attack Paths** shows findings with evidence.

## Run Intents

Every Web and Network run starts with an **intent**:

| Intent                                 | Runs                                     | Best for                                                                                           |
| -------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **Discovery + Assessment** *(default)* | Discovery, then Assessment automatically | Most runs. One run maps the target and tests it.                                                   |
| **Discovery**                          | Discovery only                           | Mapping before active testing is approved, or reviewing the inventory before anything is attacked. |
| **Assessment**                         | Assessment only, on stored inventory     | Hand-picking what to test, or re-testing without mapping again.                                    |

**Web:** start with **Discovery + Assessment**. It is the default and needs no extra setup. See [Your First Web Run](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-web-assessment.md#your-first-web-run).

**Network:** Assessment can change real systems, so start with **Discovery** on one small subnet, review the inventory with the system owner, then run **Assessment** with a narrow set of exploit families. See [Network Assessment](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-network-assessment.md).

{% hint style="info" %}
**Discovery + Assessment** tests what *that* Discovery run found. For Web, every eligible trajectory is tested, with no trajectory picker. For Network, Entity scope exclusions are not available. Use the separate **Assessment** intent when you need that control.
{% endhint %}

## Setting Up a Web Run: AI Configure or Manual

A Web run also chooses how its **scan configuration** (the saved Discovery and Assessment settings for the domain) is set up:

* **AI configure** *(recommended, when available)*: before the scan, Pentest Copilot **vets** the domain. It checks the site can be reached, measures a safe request rate, signs in with each account you describe, records a browser session for each, picks the starting URL, and flags anything that could block or reduce the scan. When the domain is scannable, the scan starts on its own.
* **Manual**: you record browser sessions and set authentication, starting URL, and concurrency yourself.
* **Use existing configuration**: start the scan with the scan configuration saved by the domain's last scannable vetting run, without vetting again.

See [AI Configure and Vetting](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-web-assessment/ai-configure-and-vetting.md).

## Which Modules Use Phases

| Module                 | Phases                | Notes                                                                                                                                                                                                                                                                                                  |
| ---------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Web Assessment**     | Discovery, Assessment | See [Web Discovery](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-web-assessment/web-discovery.md) and [Web Assessment Phase](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-web-assessment/web-assessment-phase.md).                                                       |
| **Network Assessment** | Discovery, Assessment | Also used for cloud accounts. See [Network Discovery](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-network-assessment/network-discovery.md) and [Network Assessment Phase](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-network-assessment/network-assessment-phase.md). |
| **Code Assessment**    | None                  | Each run reviews one repository target: a branch, PR, tag, or commit.                                                                                                                                                                                                                                  |

## Key Terms

| Term                   | Meaning                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Root target**        | The top-level scope you approve: a root domain for Web, a subnet or cloud scope for Network, or a repository for Code.                                                                                                                                                                                                                                                                                    |
| **Agent**              | A Pentest Copilot worker process, not an AI agent. Network and cloud runs use an agent you install inside your environment.                                                                                                                                                                                                                                                                               |
| **Intent**             | Which phases a run executes: Discovery, Assessment, or both.                                                                                                                                                                                                                                                                                                                                              |
| **AI configure**       | A Web configuration choice: Pentest Copilot vets the domain and sets up the scan for you.                                                                                                                                                                                                                                                                                                                 |
| **Vetting**            | The checks AI configure runs on a domain before a Web scan: access, a safe request rate, sign-in for each account, browser sessions, and the starting URL. Its outcome is **Scannable**, **Scannable with limitations**, **Needs changes**, or **Not scannable**. See [AI Configure and Vetting](https://copilot-docs.bugbase.ai/enterprise/how-to-trigger-a-web-assessment/ai-configure-and-vetting.md). |
| **Scan configuration** | The saved Discovery and Assessment settings for a domain. Vetting saves them; Manual runs reuse them for sections you do not change.                                                                                                                                                                                                                                                                      |
| **Email identity**     | A test inbox in your workspace that Pentest Copilot can read, used for email codes, sign-in links, and sign-up verification. See [Email Identities](https://copilot-docs.bugbase.ai/enterprise/settings/email-identities.md).                                                                                                                                                                             |
| **Egress**             | Where scan traffic leaves from: the scanner's own IP addresses (**Sandbox egress**) or a **Residential proxy**. Allow the scanner's IP addresses if your site uses an IP allow-list or WAF.                                                                                                                                                                                                               |
| **Browser session**    | A recorded login for one user role, used to test logged-in areas of a web application. Vetting records them for you with AI configure.                                                                                                                                                                                                                                                                    |
| **Trajectory**         | A recorded user flow and the API requests it makes. Single-API trajectories have one request; multi-API trajectories have several. Web Assessment tests trajectories.                                                                                                                                                                                                                                     |
| **Trajectory scope**   | The list of trajectories a Web Assessment run will test. You choose it for the domain, with Manual configuration.                                                                                                                                                                                                                                                                                         |
| **Attack vector**      | A web vulnerability category to test, such as SQL Injection or IDOR.                                                                                                                                                                                                                                                                                                                                      |
| **Exploit family**     | A group of network or cloud techniques Assessment may use, such as ACL Privilege Escalation or Cloud Credential Access.                                                                                                                                                                                                                                                                                   |
| **Finding**            | A validated vulnerability with severity, evidence, AI reasoning, and remediation.                                                                                                                                                                                                                                                                                                                         |
| **Attack path**        | The chain of entities from the root target to a finding, shown in the Exploit Graph.                                                                                                                                                                                                                                                                                                                      |
| **Exploit Graph**      | The store of everything discovered and tested, and how it connects.                                                                                                                                                                                                                                                                                                                                       |

## Where to See Each Phase

* **Activity -> Activity** shows each phase as its own row: `WEB_DISCOVERY`, `WEB_ASSESSMENT`, `NETWORK_DISCOVERY`, and `NETWORK_ASSESSMENT`. An **Auto-run** badge marks a Discovery that will start Assessment when it finishes.
* **Dashboard -> Exploit Graph** shows the inventory Discovery built.
* **Modules -> \[module] -> Analysis** shows, for Web, each domain's vetting, scan runs, outcomes, alerts, and statistics; for Network and Code, the statistics.
* **Modules -> \[module] -> Attack Paths** shows what Assessment proved.

## Next Steps

* [Before Your First Run](https://copilot-docs.bugbase.ai/enterprise/enterprise-onboarding-checklist.md)
* [Run Assessment Wizard](https://copilot-docs.bugbase.ai/enterprise/run-assessment-wizard.md)
* [Scan Noise and Safety](https://copilot-docs.bugbase.ai/enterprise/scan-noise-and-safety.md)
