
AWS Continuum and GitHub Actions: A Step-by-Step Implementation Guide
Configure AWS Continuum, GitHub OIDC, and a staged penetration-testing gate for a pre-production application.
AWS Continuum can add an automated penetration test between deploying an application to pre-production and releasing it to production. The test examines a running application in the context of the deployed code changes, and the pipeline can stop promotion when the result fails your security policy. This guide turns the approach in the AWS article into a setup and operating process for developers. 1
The worked example uses GitHub Actions and an existing application deployment process. You will configure the service, authenticate through OpenID Connect, validate the integration, review findings, and enable automatic testing for releases.
Feature status as of 18 October 2026: AWS labels the CI/CD integration public preview. The service is now part of AWS Continuum, while its IAM actions still use the
securityagent prefix. 2 3
One correction when implementing the linked article: the official GitHub action accepts
fail-on-error . Use fail-on-error: "true" to block on infrastructure errors. The blog's term fail-on-infrastructure-error is not the GitHub action input. 4
How the release process works
- Build a release artifact and record its commit SHA and immutable artifact identifier.
- Deploy the candidate to pre-production, then verify application health and the running release.
- Run the AWS Continuum gate against that deployed candidate.
- Review the scope decision, findings, and any test errors against the release policy.
- Promote the same artifact after the gate passes. If the gate blocks, review the issue, fix it, and repeat the release process.
The workflow runner starts the job and collects its result; AWS performs the testing. Place the gate after the candidate is available in pre-production. A source-code check before deployment cannot establish that the running candidate was tested. 5
Recommended release design: build the artifact once, identify it by an immutable digest or release ID, and promote that same artifact after a passing test. Check that pre-production is serving the intended commit before starting the gate. Otherwise, a correctly configured pipeline can still test the wrong application version.

Reading the diagram
- Blue: release orchestration and application deployment.
- Orange: the testing API, returned results, and active testing of the pre-production endpoint.
- Purple dashed lines: temporary AWS credentials, service-role permissions, and repository source context. These indicate access or data relationships rather than the order of workflow jobs.
- Green: the successful promotion path and production destination.
- Red: a blocked release that requires review, a fix, and another deployment.
The gate exchanges GitHub's OIDC token through AWS STS for temporary credentials for the pipeline gate role. The Agent Space service role separately authorizes the service's access to approved AWS resources. The application's deployment jobs use their own deployment roles.
The repository integration uses the GitHub App for source context. The workflow token separately maintains the baseline ref; that connection is omitted from the main diagram to keep the release path readable.
Private targets use the VPC connection configured for the test. The workflow runner and the testing service have separate connectivity requirements. The figure is a logical architecture and does not prescribe a particular account or VPC layout.
Step 1: Prepare a representative pre-production environment
Start with an application you control, such as
https://preprod.example.com , and a repository containing its source and deployment workflow. Use synthetic data and dedicated test accounts. AWS recommends isolated non-production targets because penetration testing can change application state, data, or configuration. 6
Prepare the following:
- AWS access to configure the service, IAM roles, and an OIDC provider.
- Permission to configure the GitHub repository and authorize its AWS integration.
- Control of the target domain or the private VPC hosting it.
- A deployment health check and a way to verify the running release ID.
- An owner who will review findings and make release decisions.
Use a supported AWS Region consistently for the Agent Space, penetration test, and gate credentials. This example uses
us-west-2 , matching AWS's GitHub tutorial. 7 Begin with a manageable scope: one application and its critical API paths. Add other services after you understand its testing duration, coverage, and cost.
Step 2: Create the Agent Space and enable penetration testing
An Agent Space organizes the application's test configuration and findings. In the service console, start the setup, enter a name such as
customer-portal-preprod , choose IAM-only access or IAM Identity Center, and complete the permissions configuration. If you choose Identity Center, check its Region alignment before creating the setup. 8 Open the Agent Space's Penetration test tab and choose Set up penetration test. Configure the service's access to the resources needed by your test, including its log group, authentication resources, and VPC when applicable. 9
Keep these roles separate:
Role | What it does |
|---|---|
Agent Space service role | Lets the testing service use approved resources such as network interfaces, logs, and credential secrets. |
Pipeline gate role | Lets GitHub start a configured test and retrieve or stop its job. |
Application deployment roles | Let your existing deployment jobs update pre-production and production. |
This separation makes a failed permission easier to diagnose and keeps test orchestration from inheriting production deployment access. The gate policy in Step 6 belongs on the pipeline gate role. 9 3
Step 3: Verify the application domain
Add your pre-production hostname as a target domain. For DNS verification, copy the generated TXT record into the appropriate DNS zone, then return to the console and choose Verify. Use the record name and value AWS supplies. 10
If you choose HTTP verification, serve the generated token at this path:
https://preprod.example.com/.well-known/aws/securityagent-domain-verification.jsonThe response body has this structure:
{ "tokens": ["REPLACE_WITH_THE_AWS_GENERATED_TOKEN"]}
AWS also supports Private VPC verification. In that mode, the configured hostname must exactly match the target endpoint hostname and resolve to an allowed private address. DNS TXT and HTTP verification can cover subdomains of the verified domain. 10
Verify only the application domains you intend to authorize for active testing. A third-party login service is a dependency to classify separately in the test's network configuration.
Step 4: Connect the source repository
In the AWS console, open Integrations, add a GitHub integration, and select the GitHub App permission level. Authorize it for the intended organization and selected repositories, complete the registration in AWS, and connect the application repository to the Agent Space. 11
Read-only integration access can provide source context. Choose write access when you also want supported features that write to the repository, such as remediation pull requests. This GitHub App permission is separate from the workflow's token permissions; the workflow still needs
contents: write for its baseline marker. 11 12
For a monorepo, document which deployed application each penetration test represents. Avoid assuming that a test aimed at one service covers every repository component.
Step 5: Configure the reusable penetration test
Open the service web application, select Penetration tests, and create a test. Give it a descriptive name and configure the target URLs, service role, and log group. Complete the optional VPC and credential sections, then review network configuration and add application context. 13
Classify network entries deliberately:
Classification | Intended use |
|---|---|
Target | An application endpoint the agent may actively test. |
Accessible | A dependency needed for navigation or login that must not be attacked. |
Out of scope | An endpoint the agent must not access. |
Attach relevant source and API documentation. Include instructions that explain tenant boundaries and sensitive workflows. Review exclusions carefully because they reduce coverage. 13
Configure authenticated access
For protected routes, add a test identity and instructions describing how to sign in and recognize success. A practical login prompt is:
Open the pre-production login page and use the configured test credential. Successful login displays the workspace dashboard. Use the dedicated test tenant assigned to this account.
Use Save and test to verify access. If credentials come from Secrets Manager, grant the Agent Space service role the documented secret-read permissions and keep the secret in the service's AWS account. Do not put application passwords in workflow YAML. 14
For a SaaS application, I recommend testing representative roles separately and including a tenant-boundary check in your acceptance criteria. An administrator-only identity can conceal authorization defects that ordinary users encounter.
Reach a private VPC or EKS application
For a private target, register the VPC, subnets, and security groups in the Agent Space, then select them in the test's VPC Resources configuration. The service creates a network interface without a public IP. If the test needs internet egress, a public subnet and Internet Gateway alone are insufficient; provide an appropriate NAT path. 15
For EKS, the implementation implication is to target the application's reachable HTTP or HTTPS ingress, such as its internal load balancer. Verify DNS, routing, security groups, and relevant Kubernetes network policies from the test network. The runner's ability to deploy to EKS and the testing service's ability to reach the application are separate connectivity requirements.
For private targets in another AWS account, AWS documents AWS RAM sharing of subnets and security groups within the same AWS Organization. Authentication secrets and Lambda credential providers remain in the account containing the service setup. 15
Finally, enable CI/CD mode in the penetration test's CI/CD Settings and copy its
as-... Agent Space ID
Step 6: Configure GitHub OIDC and the gate role
Create or reuse an IAM OIDC provider in the account containing the Agent Space:
Setting | Value |
|---|---|
Provider URL | https://token.actions.githubusercontent.com |
Audience | sts.amazonaws.com |
Create a dedicated role, for example
ContinuumPreprodGate . Its trust policy must match the actual subject emitted by your gate job. The following example is for an older-format repository, branch main , and a gate job without an environment declaration. Replace the example account and repository. 16
{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Federated": "arn:aws:iam::111122223333:oidc-provider/token.actions.githubusercontent.com" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com", "token.actions.githubusercontent.com:sub": "repo:YOUR_ORG/YOUR_REPO:ref:refs/heads/main" } } }]}Newer repositories, and repositories renamed or transferred after GitHub's July 2026 change, may use a subject containing immutable numeric IDs:
repo:YOUR_ORG@OWNER_ID/YOUR_REPO@REPO_ID:ref:refs/heads/main
Match the emitted value exactly. If you later add
environment: preprod to the gate job, the subject generally changes to an environment-based form; update the trust policy and environment branch restrictions together. The separate deployment job's environment does not change the gate job's token. 16
Attach this permissions policy, replacing the Region, account, and Agent Space ID:
{ "Version": "2012-10-17", "Statement": [{ "Sid": "RunGateInOneAgentSpace", "Effect": "Allow", "Action": [ "securityagent:StartPentestJob", "securityagent:BatchGetPentestJobs", "securityagent:StopPentestJob", "securityagent:ListFindings", "securityagent:BatchGetFindings", "securityagent:ListIntegratedResources" ], "Resource": "arn:aws:securityagent:us-west-2:111122223333:agent-space/as-REPLACE_ME" }]}The current AWS authorization reference supports Agent Space scoping for these six actions. This authorizes the listed operations within that space; selecting a
pentest-id does not create a separate IAM permission boundary. 3
Set the role's maximum session duration to two hours. For example, using credentials with IAM administration access in that account:
aws iam update-role \ --role-name ContinuumPreprodGate \ --max-session-duration 7200The workflow requests the same 7,200-second lifetime. AWS rejects a session request above the role's maximum. Give credentials enough time to cover testing and cleanup. 7
Step 7: Add repository configuration and deployment hooks
Create these GitHub repository variables:
Variable | Example value |
|---|---|
PENTEST_AWS_REGION | us-west-2 |
PENTEST_ROLE_ARN | arn:aws:iam::111122223333:role/ContinuumPreprodGate |
PENTEST_AGENT_SPACE_ID | Your as-... identifier |
PENTEST_ID | Your pt-... identifier |
CONTINUUM_PROMOTION_ENABLED | false during setup; set to true only after the pilot is verified |
The example below deliberately uses your application's existing deployment machinery. Implement or replace these repository-specific hooks:
-
ci/deploy-release.sh preprod COMMIT_SHA: build or locate the candidate artifact and deploy it to pre-production.
-
ci/check-release.sh preprod COMMIT_SHA: wait for readiness and verify that the running release matches the expected commit.
-
ci/promote-release.sh COMMIT_SHA: promote the already tested artifact to production without rebuilding it.
These script names are example contracts, not files provided by AWS. Insert your existing deployment authentication steps into the two deployment jobs. For private infrastructure, use runners with the required deployment connectivity.
Use separate deployment roles with their own permissions. The gate role is only for operating Continuum.
If a deployment job uses GitHub OIDC, give that job
id-token: write and contents: read permissions as well as its own deployment-role trust policy. The gate job's OIDC permission does not apply to other jobs.
Step 8: Add the workflow
Create
.github/workflows/continuum-release.yml . Start with manual execution so you can validate the setup before enabling automatic releases.name: Release with Continuum
on: workflow_dispatch: inputs: mode: description: Gate operating mode type: choice required: true default: validate options: [validate, report, enforce]
permissions: contents: read
concurrency: group: customer-portal-preprod-release cancel-in-progress: false queue: max
env: RELEASE_SHA: ${{ github.sha }}
jobs: deploy-preprod: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest environment: preprod steps: - uses: actions/checkout@v4 with: persist-credentials: false # Insert your existing preprod deployment authentication. - run: ./ci/deploy-release.sh preprod "$RELEASE_SHA" - run: ./ci/check-release.sh preprod "$RELEASE_SHA"
security-pentest: needs: deploy-preprod runs-on: ubuntu-latest timeout-minutes: 60 permissions: id-token: write contents: write actions: read deployments: read steps: - name: Assume the gate role uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ vars.PENTEST_ROLE_ARN }} aws-region: ${{ vars.PENTEST_AWS_REGION }} role-duration-seconds: 7200
- name: Evaluate the deployed change id: pentest # Continuum action v1.0.0 uses: aws-actions/aws-continuum-run-pentest@1752c1469cb54edda9933d414490d04cd0cd2d10 with: agent-space-id: ${{ vars.PENTEST_AGENT_SPACE_ID }} pentest-id: ${{ vars.PENTEST_ID }} severity-threshold: ${{ inputs.mode == 'report' && 'NONE' || 'HIGH' }} dry-run: ${{ inputs.mode == 'validate' }} on-scope-conflict: block fail-on-error: "true" timeout-minutes: "45"
deploy-production: needs: security-pentest if: >- vars.CONTINUUM_PROMOTION_ENABLED == 'true' && (github.event_name == 'push' || inputs.mode == 'enforce') runs-on: ubuntu-latest environment: production steps: - uses: actions/checkout@v4 with: persist-credentials: false # Insert your existing production deployment authentication. - run: ./ci/promote-release.sh "$RELEASE_SHA"The Continuum action is pinned to the commit associated with its
v1.0.0 release. The supporting actions use readable v4 tags in the template. Before activation, resolve your approved versions to full commit SHAs and replace those tags too. 17 6
The workflow's design makes each operating mode explicit:
Mode | Behavior in this example | Production promotion |
|---|---|---|
validate | Check AWS authentication, Region, and repository integration; no pentest job starts. | Skipped |
report | Run a real test with finding threshold NONE ; scope conflicts and infrastructure errors remain blocking. | Skipped |
enforce | Run a real test and block on HIGH or CRITICAL findings, scope conflicts, or test errors. | Requires a successful gate and promotion enabled |
The action's validation behavior and input names come from its metadata. The release conditions above are the recommended workflow design. A successful dry run does not prove that the application is reachable or that login works. 4
contents: write lets the action maintain its baseline ref. The history permissions support fallback commit resolution. Keep the AWS credentials step and the pentest action in the same job so cleanup retains credentials. 12
The 60-minute job timeout leaves headroom around the 45-minute action timeout. Workflow-level concurrency keeps an active deployment and test together. Current GitHub documentation supports
queue: max , with up to 100 pending runs; monitor queue overflow. Every workflow that writes to this shared target must respect the same coordination rule. 18
Avoid
continue-on-error on the gate or a production condition using always() . Protect changes to the workflow and require normal review of release-policy changes.
Step 9: Validate the setup and read a real result
Open GitHub Actions, select this workflow, and run it on
main with mode validate . Confirm that authentication and repository resolution succeed, and that production is skipped.
Next, run mode
report . This starts an actual test against the deployed application. Review the GitHub job summary, then open the corresponding run in the service console. Check its compared commits and the Scoping tab before interpreting finding counts. 5 Result | Meaning | Response under this workflow |
|---|---|---|
IN_SCOPE | The deployed change affects the configured attack surface. | Evaluate findings; HIGH and CRITICAL block in enforce mode. |
SCOPED_OUT | The change does not alter the tested attack surface. | Gate passes; this is not a full application assessment. |
SCOPE_CONFLICT | The change was outside the configured scope and was not tested. | Block and correct the configuration or deployment mapping. |
Authentication, infrastructure, or timeout failure | The required assessment did not complete successfully. | Investigate before promotion. |
Scope decisions describe coverage as well as outcome. An absent finding count is not evidence that a test found zero vulnerabilities. 7
On a finding, inspect the affected endpoint, evidence, severity, and reproduction guidance. Assign an owner, reproduce the issue in the test environment, fix it, and add an appropriate regression check. Review any generated patch before merging it. AWS provides finding details and remediation tracking, while its guidance requires validation of AI-generated findings and fixes. 19 6
For example, if a report identifies an authorization failure on a document API, verify the behavior with a lower-privileged test identity, enforce the missing server-side authorization check, and add a test for the rejected request. Redeploy the fix and review the next run. Treat the finding as closed only after the relevant behavior has been verified.
Keep
CONTINUUM_PROMOTION_ENABLED set to false throughout the pilot. Before using enforce mode on a candidate already tested in report mode, apply the explicit-range reassessment in Step 10. A same-commit rerun can otherwise have an empty diff because report mode advanced the baseline. 20
Demonstrate both outcomes in an isolated test environment: a known issue blocks in enforce mode, and the reviewed correction passes. AWS's official tutorial provides an intentionally vulnerable sample for this exercise; keep it isolated and remove it afterward. 7
Step 10: Reassess the pilot range and enable automatic releases
Report-only runs advance the baseline. Switching from
NONE to HIGH does not make the next run reassess changes already accepted during the pilot. Resolve those findings and choose a deliberate commit range for reassessment. 5
For a one-off reassessment in this workflow, add these inputs. Supply the full pre-pilot base SHA; the head expression matches the commit the deployment job uses:
base-commit-sha: REPLACE_WITH_PRE_PILOT_COMMIT_SHAhead-commit-sha: ${{ github.sha }}The head must match the application actually deployed. An explicitly supplied head leaves the automatic baseline unchanged; remove these overrides for routine operation. Deleting a baseline marker alone does not guarantee a historical or full-application retest, because fallback commit resolution still applies. 20
Also inspect the first real run's range. When no usable baseline exists, the integration uses fallback history, not an automatic full-application assessment. Establish broader initial coverage through a separately configured assessment when needed. 20
After the pilot range passes under the enforcing policy and the positive-control exercise is verified, remove the one-off commit overrides and set
CONTINUUM_PROMOTION_ENABLED to true . Add a push trigger alongside workflow_dispatch :on: push: branches: [main] workflow_dispatch: # Keep the existing mode input block here.In this example, a push has no manual mode input, so it selects
HIGH , leaves dry-run off, and allows production only after the gate succeeds. Ensure the deployed commit and promoted artifact remain aligned throughout the release.
For multiple applications or promotion environments, use distinct test configurations and coordination groups. A single baseline shared between unrelated deployments makes coverage difficult to interpret.
Control operating cost and handle interrupted runs
AWS's published penetration-testing price is USD 50 per task-hour, metered by the second. Task hours aggregate concurrent agent activity, so a 45-minute wait is not a 0.75-task-hour spending limit. AWS also publishes a two-month new-customer trial with monthly usage limits; check eligibility and current pricing before estimating your pilot. 21
Review each run's task hours and duration, and use Cost Explorer and AWS Budgets for tracking and alerts. Estimate recurring cost from measured task hours per representative deployment, multiplied by expected deployments. Add hosting, network, and logging costs separately. 22
The test configuration supports a maximum task-hours setting, currently with a minimum configurable limit of 20. If that limit is reached, the service preserves findings and can finish with status
Completed ; that status alone does not establish that all planned testing finished. Review the limit and run logs when evaluating coverage. 13
Cancellation cleanup is best effort. After a cancelled or timed-out pipeline, check whether its server-side job stopped. Expired credentials or missing stop permissions can prevent cleanup while the test continues running. 12
Troubleshooting during adoption
Use the job's failure stage to narrow the investigation. Check identity first, then service configuration, then application reachability, then the finding itself.
Symptom | First checks |
|---|---|
Role assumption fails | OIDC audience, exact subject format, branch or environment, and id-token: write . |
Repository cannot be resolved | GitHub registration and repository connection in the selected Agent Space. |
Private target is unreachable | VPC selection, private DNS, routing, security groups, and needed egress. |
Findings appear but the workflow is green | Selected mode and threshold; report mode intentionally does not block on findings. |
The same range keeps appearing | Baseline-write permission and any explicit head override. |
Credentials expire during the run | Requested session lifetime, IAM maximum, and cleanup headroom. |
These checks follow the documented identity, network, and baseline behavior described above. Record the commit range, test job ID, scope decision, artifact digest, finding disposition, and final release decision together so the team can explain what was assessed for each promoted version.
Keep periodic broader assessments alongside deployment tests. A passing gate is evidence about a configured change range under a chosen policy. Developers still own the scope, investigation, remediation, and decision to release.
Sources and further reading
- AWS Security Blog: Penetration testing every deployment with AWS Continuum .
- AWS announcement: Continuous penetration testing integrated into CI/CD .
- AWS Service Authorization Reference: Actions resources and condition keys for AWS Security Agent .
- Official AWS GitHub action: Action metadata and input definitions .
- AWS User Guide: Run penetration tests from your CI/CD pipeline .
- AWS User Guide: Security best practices for AWS Security Agent .
- AWS User Guide: Gate a GitHub Actions deployment with a scoped penetration test .
- AWS User Guide: Set up AWS Security Agent .
- AWS User Guide: Enable penetration testing .
- AWS User Guide: Enable an application domain for penetration testing .
- AWS User Guide: Connect AWS Security Agent to GitHub repositories .
- Official AWS GitHub action: Usage baseline behavior and cleanup .
- AWS User Guide: Create a penetration test .
- AWS User Guide: Provide authentication credentials for penetration testing .
- AWS User Guide: Connect agent to private VPC resources .
- GitHub Docs: OpenID Connect reference .
- Official AWS GitHub action: Commit associated with v1.0.0 .
- GitHub Docs: Control the concurrency of workflows and jobs .
- AWS User Guide: Review findings from a penetration test .
- Official AWS GitHub action: Baseline resolution implementation .
- AWS pricing: AWS Continuum for penetration testing pricing .
- AWS User Guide: Pricing and billing .
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article