Guides for Security Engineers
These guides cover advanced configuration: authenticated scanning, deploying scan agents inside private networks, creating reusable templates, and setting up continuous scanning.
Guide 1: Setting Up Authenticated Scanningβ
Authenticated scans find significantly more vulnerabilities than unauthenticated ones because they can test pages and APIs behind login screens.
| Time needed | 15 minutes |
| Prerequisites | ThreatWeaver account with Engineer or Admin role; test credentials for the target application |
| What you'll learn | How to create an auth profile, test it, and attach it to a scan |
Why authenticated scanning mattersβ
Without authentication, the scanner can only test publicly accessible pages. With a login, it can reach admin panels, user dashboards, API endpoints that require tokens, and more. This is where most critical vulnerabilities hide.
Stepsβ
-
Navigate to AppSec > Credentials. From the AppSec sidebar, click Credentials. This is where you manage authentication profiles.
-
Click "+ New Auth Profile". Choose the authentication type that matches your target application:
Auth Type When to use it Form Login Standard username/password login page (most web apps). API Token Bearer token or API key-based authentication (REST APIs). OAuth 2.0 OAuth2 client credentials or authorization code flow. Cookie-Based You manually provide session cookies. Custom Header Custom authentication header (e.g., X-API-Key). -
Fill in the credentials.
For Form Login (the most common type):
- Login URL: The URL of the login page (e.g.,
https://staging.myapp.com/login) - Username field: The HTML name or ID of the username input (e.g.,
email) - Password field: The HTML name or ID of the password input (e.g.,
password) - Username: Your test account username
- Password: Your test account password
- Success indicator: A string that appears after successful login (e.g., "Dashboard" or "Welcome")
Use dedicated test accountsNever use real user credentials. Create a dedicated test account with the minimum permissions needed. This protects real users and ensures the scan doesn't accidentally modify production data.
- Login URL: The URL of the login page (e.g.,
-
Test the auth profile. Click Test Login. ThreatWeaver will attempt to log in using your credentials and report whether it succeeded. If the test passes, you will see a green checkmark and the authenticated session details.
If the test fails, check:
- Is the login URL correct and accessible from ThreatWeaver?
- Are the field names correct? (Inspect the login form HTML to verify.)
- Does the application use CAPTCHA or rate limiting that blocks automated login?
- Does the application require MFA? If so, consider using API Token auth instead.
-
Attach the auth profile to an assessment. When creating or editing an assessment, select your auth profile in the Authentication section. The scanner will log in before starting its tests.
-
Set up multi-user context (optional). For thorough authorization testing (BOLA, BFLA, IDOR), configure two users with different permission levels:
- User A: Regular user (e.g.,
analyst@test.com) - User B: Admin user (e.g.,
admin@test.com)
The scanner will test whether User A can access User B's resources, detecting broken access control.
- User A: Regular user (e.g.,
Credentials are encrypted at rest and never logged in scan results. Only users with Engineer or Admin roles can view or edit auth profiles.
Guide 2: Deploying a Docker Scan Agent for Internal Networksβ
When your application runs behind a firewall and is not accessible from the internet, you can deploy a scan agent inside your network.
| Time needed | 20 minutes |
| Prerequisites | Docker installed on a machine inside your internal network; ThreatWeaver Admin role |
| What you'll learn | How to deploy an agent, connect it to ThreatWeaver, and assign scan targets |
Architecture overviewβ
The scan agent connects outbound to ThreatWeaver via WebSocket over HTTPS. No inbound firewall rules are needed. All scan traffic stays inside your network -- only results and coordination messages travel over the WebSocket connection.
Stepsβ
-
Navigate to AppSec > Sensors. From the AppSec sidebar, click Sensors (sometimes labeled "Agents" depending on your version).
-
Generate an enrollment token. Click + Enroll New Sensor. ThreatWeaver generates a one-time enrollment token and displays the Docker run command.
-
Copy the Docker run command. It looks something like this:
docker run -d \
--name tw-agent \
--restart unless-stopped \
-e ENROLLMENT_TOKEN=eyJhbGciOiJFUzI1NiIs... \
-e PLATFORM_URL=https://api.threatweaver.ai \
threatweaver/scan-agent:latest -
Run the command on your internal machine. SSH into the machine inside your network and run the command. The agent will:
- Pull the Docker image
- Connect to ThreatWeaver using the enrollment token
- Register itself in the agent fleet
-
Wait for the agent to appear. Back in ThreatWeaver, refresh the Sensors page. Your new agent should appear within 30 seconds with a Connected status.
-
Assign a scan target to the agent. When creating an assessment for an internal application, select your agent in the Sensor dropdown. The scan will run through that agent instead of the default cloud scanner.
Network requirementsβ
| Direction | Protocol | Port | Purpose |
|---|---|---|---|
| Outbound | HTTPS | 443 | WebSocket connection to ThreatWeaver |
| Internal | HTTP/HTTPS | Any | Agent connects to your internal applications |
The agent only makes outbound connections. You do not need to open any inbound ports on your firewall.
Troubleshootingβ
| Symptom | Cause | Fix |
|---|---|---|
| Agent shows "Disconnected" | Network or proxy blocking outbound WebSocket | Check that wss://api.threatweaver.ai is allowed through your proxy |
| Agent can't reach target | DNS or routing issue inside your network | Verify the agent machine can curl the target URL |
| Enrollment token expired | Tokens expire after 24 hours | Generate a new token from the Sensors page |
Guide 3: Configuring Scan Templatesβ
Scan templates let you save and reuse scan configurations so you don't have to reconfigure settings for every assessment.
| Time needed | 10 minutes |
| Prerequisites | Engineer or Admin role |
| What you'll learn | How to create and share custom scan templates |
What templates controlβ
| Setting | Description |
|---|---|
| Scan Scope | Which types of tests to run (e.g., injection only, full DAST, API-focused). |
| Scan Depth | How aggressively the scanner explores (number of endpoints, parameter fuzzing depth). |
| Agent Selection | Which of the 59 agents are enabled. You can disable agents for specific use cases. |
| Timeout | Maximum scan duration before auto-stop. |
| Auth Profile | Default authentication configuration. |
| Compliance Mapping | Which frameworks to map findings against (PCI-DSS, SOC 2, etc.). |
Stepsβ
-
Navigate to AppSec > Templates. Click Templates in the AppSec sidebar.
-
Click "+ New Template". Give your template a descriptive name (e.g., "API Full Scan" or "PCI Compliance Check").
-
Configure the settings.
For an API-focused scan:
- Enable API-specific agents:
apiSecurityAgent,owaspApiTop10Agent,graphqlAgent,specConformanceAgent,massAssignmentAgent - Disable browser-focused agents:
domXssAgent,csrfTester - Set scope to "API endpoints only"
For a compliance-focused scan:
- Enable all agents (maximum coverage)
- Turn on compliance mapping for your required frameworks
- Set timeout to allow a thorough scan (60-90 minutes)
- Enable API-specific agents:
-
Save the template. Click Save. The template is now available when creating new assessments.
-
Share with your team. Templates are visible to all users in your tenant. Use clear naming conventions so everyone knows which template to pick.
Use a prefix that describes the use case: API-* for API scans, COMPLIANCE-* for audit prep, QUICK-* for fast checks, FULL-* for comprehensive scans.
Guide 4: Setting Up Continuous Scanning Schedulesβ
One-time scans catch vulnerabilities at a point in time. Continuous scanning catches new vulnerabilities as your application changes.
| Time needed | 10 minutes |
| Prerequisites | At least one target and template configured |
| What you'll learn | How to schedule recurring scans and integrate with CI/CD |
Scheduling optionsβ
| Schedule Type | Best For |
|---|---|
| Daily | High-change applications with frequent deployments. |
| Weekly | Most applications -- good balance of coverage and cost. |
| On-Commit | CI/CD integration -- scan every time code is pushed. |
| Monthly | Stable applications that change infrequently. |
Steps: Scheduled scansβ
- Navigate to AppSec > Assessments.
- Click "+ New Assessment" or edit an existing one.
- In the Schedule section, select your frequency (Daily, Weekly, Monthly).
- Set the day and time (e.g., every Monday at 2:00 AM).
- Choose whether to notify on completion -- enable webhook or email notifications so you know when results are ready.
- Save the assessment.
The scan will run automatically on schedule. Results appear in the assessment history.
Steps: CI/CD integration via GitHub Actionβ
For on-commit scanning, add a GitHub Action to your repository:
# .github/workflows/threatweaver-scan.yml
name: ThreatWeaver Security Scan
on:
pull_request:
branches: [main, dev]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- name: Trigger ThreatWeaver Scan
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.TW_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"targetId": "your-target-id", "templateId": "your-template-id"}' \
https://api.threatweaver.ai/api/appsec/assessments/trigger
- name: Wait for Results
run: |
# Poll for scan completion (simplified example)
echo "Scan triggered. Check ThreatWeaver for results."
You can configure webhooks to post scan results directly to your PR as a comment. See the Webhooks guide for setup instructions.
Next stepsβ
- CI/CD Pipeline Integration -- deeper CI/CD integration details
- Using the ThreatWeaver API -- automate everything programmatically
- Managing Users and Roles -- set up accounts for your team
- Glossary -- look up unfamiliar terms