docs/Guides
CI and GitHub Action
Audit a staging site on every push, upload findings to code scanning and fail on a severity you choose.
#GitHub Action
.github/workflows/kagicyber.yml
name: KagiCyberon: [push]permissions: contents: read security-events: writejobs: audit: runs-on: ubuntu-latest steps: - uses: kvdzidev/kagicyber@v1 with: url: https://staging.example.com fail-on: high sarif: trueThe action writes the Markdown report to the job summary, saves the HTML, JSON and fix-prompt files in the workspace (upload them with actions/upload-artifact to keep them) and, with sarif: true, uploads the findings to GitHub code scanning.
#Inputs
| Input | Default | Purpose |
|---|---|---|
url | required | Site to audit, a domain or URL |
fail-on | empty | Fail at or above this severity: critical, high, medium or low |
fail-under | empty | Fail when the compliance score is below this number |
profile | balanced | Request profile: quiet, balanced or fast |
country | detected | Jurisdiction used for maximum penalties, for example PL or DE |
include | empty | Extra jurisdictions, for example DE,FR |
baseline | empty | An earlier JSON result; only new findings fail the job |
sarif | false | Upload findings to code scanning (needs security-events: write) |
version | empty | A kagicyber version from npm; empty runs the code of the action release |
#Outputs
kagicyber-report.md, kagicyber-report.html, kagicyber-report.json, kagicyber.sarif and kagicyber-fix-prompt.md.
#Monthly audit with a baseline
.github/workflows/kagicyber.yml
on: push: schedule: - cron: '17 6 1 * *'jobs: audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 with: path: baseline.json key: kagicyber-baseline-${{ github.run_id }} restore-keys: kagicyber-baseline- - uses: kvdzidev/kagicyber@v1 with: url: https://www.example.com fail-on: high baseline: ${{ hashFiles('baseline.json') != '' && 'baseline.json' || '' }} sarif: true - run: cp kagicyber-report.json baseline.json if: always()#Repositories
terminal
npx kagicyber scan . --sarif kagicyber.sarif --fail-on highEvery repository finding points at its file and line, so code scanning shows it inline. Other CI systems can read --junit output.