GitHub PR gating using Local Scanner
on:
pull_request:
branches:
- main
name: Aikido Scan
jobs:
aikido-local-scan-repo:
runs-on: ubuntu-latest
container:
image: aikidosecurity/local-scanner:latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ github.event.repository.name }}
fetch-depth: 0 # Makes sure base and head commit are accessible in workflow
- name: Run scan
run: aikido-local-scanner scan ${{ github.event.repository.name }} --apikey ${{ secrets.AIKIDO_API_KEY }} --repositoryname ${{ github.event.repository.name }} --branchname ${{ github.event.pull_request.head.ref }} --gating-mode pr --fail-on critical --base-commit-id ${{ github.event.pull_request.base.sha }} --head-commit-id ${{ github.event.pull_request.head.sha }}Last updated
Was this helpful?