How GitHub Copilot Custom Agents Change The Game for Dynamic Testing
Launched today at GitHub Universe, Agent HQ addresses a fundamental challenge in the AI era: incredible power fragmented across disconnected tools. By making specialized agents native to GitHub’s workflow, developers can now tackle complex tasks—like security testing—with the same seamless integration they expect from Git, pull requests, and issues.
We worked with the GitHub team to build one of Agent HQ’s first Copilot custom agents!

Our custom agent solves one of AppSec’s biggest friction points: onboarding dynamic application security testing at scale.
Dynamic testing is more critical than ever in today’s world of APIs and LLM interfaces, where how an application behaves is just as important as how it was written. Runtime vulnerabilities like business logic flaws, authentication bypasses, and authorization failures only surface when applications are actually running and don’t get flagged by static analysis tools. But DAST adoption lags because configuration doesn’t scale—it requires two pieces of information for each application: how authentication works (to get past the login screen) and where the application runs (to test it).
The best way to find both? Analyzing source code—which is exactly where StackHawk’s code-based attack surface mapping expertise comes in.
How StackHawk’s GitHub Copilot Agent Works
The StackHawk Security Onboarding Agent analyzes source code to solve DAST’s two biggest configuration challenges: application host/runtime detection and authentication mechanism setup. For organizations wanting to deploy at scale, the agent can be added to your `.github` or `.github-private` repository to make it globally available across all repositories.
Here’s the workflow:
1. Repository Analysis: The agent determines if a repository contains a running application that’s a good candidate for dynamic testing.
2. Code Analysis: Once it determines a repository contains actual attack surface, the agent detects framework (Express, Flask, Spring Boot), runtime location (Docker configs, localhost patterns), authentication mechanism (JWT, OAuth, session-based), and API structure—all through static analysis with no running applications or credentials required.
3. Configuration Generation: With the intelligence gathered from the previous code analysis step and help from StackHawk’s MCP server, the agent generates a tailored `stackhawk.yml` pre-populated with detected patterns and intelligent TODOs for credentials, plus a GitHub Actions workflow with the complete startup sequence for your framework and proper environment variable references.
4. Pull Request Documentation: With the required config and CI/CD workflow ready to be deployed, the agent creates a PR explaining what was detected, what needs manual input, and required credentials.
5. Developer Review: Developers review the PR, add required secrets or authentication (typically 1-2 values like authentication tokens), and merge.
See the full workflow in action:
Voilà! Once the pull request is merged, StackHawk DAST runs automatically on your next builds across all relevant repositories. No more setup friction between development and security. No more “we’ll add security testing later.” Just intelligent configuration that identifies what you should test, and starts finding runtime vulnerabilities faster.
Why This Matters: From “Eventually” to “Already Done” At Scale
The promise of secure-by-design has always been compelling: integrate security into development workflows so it happens automatically rather than being bolted on later. But as long as DAST implementation requires dedicated resources that compete with innovative product work, security loses.
Intelligence-driven automation changes that dichotomy:
For Developers: DAST setup drops from hours to minutes with zero specialized knowledge required. Review a PR, add 1-2 secrets, and merge. Runtime testing runs automatically (only where it’s relevant) in CI/CD without breaking builds.
For AppSec Teams: Scale runtime testing across dozens or hundreds of repositories without manually configuring authentication and host patterns for each one. Never have to say “we should add security testing” again. Relevant applications have DAST coverage from the get-go.
This secure-by-design approach can have a seismic impact on how organizations scale application security. Without allocating precious development resources to testing implementation, teams automatically catch exploitable vulnerabilities that static tools miss, shift from reactive incident response to proactive runtime testing, and eliminate the traditional tradeoff between security rigor and development velocity.
StackHawk’s GitHub Copilot Custom Agent is in a private preview for StackHawk customers leveraging paid GitHub Copilot subscriptions. Get in touch with your StackHawk rep or schedule a demo to see it in action.
