GitHub Actions
Last updated
Last updated
Akto integrates with GitHub Actions to add automated API security testing to your workflows. This integration enables you to:
Run API security tests as part of your GitHub workflow
Automate security testing on pull requests
Block merges based on security test results
GitHub repository with Actions enabled
Akto dashboard access
GitHub App installed and configured (required for PR comments)
Create .github/workflows/akto-security.yml
in your repository with the following content:
Go to Repository Settings > Secrets and Variables > Actions
Add the following repository variables:
AKTO_DASHBOARD_URL
: Your Akto dashboard URL
AKTO_API_KEY
: Your Akto API key
AKTO_TEST_ID
: Your Akto test ID
GITHUB_COMMIT_ID
: For a particular PR (if needed)
Navigate to Repository Settings > Branches
Add branch protection rule
Enable "Require status checks to pass before merging"
Add "Akto Security Testing" as a required check
Create a new pull request
Check that Akto security tests run automatically
View test results in the GitHub Actions tab
Check status of Akto CICD tests directly from GitHub pull requests through quality gates
Check result of Akto CICD tests directly from comment posted on Github pull request