Docs
GitHub Actions
Run Mikoshi security scans on every pull request
Integrate Mikoshi into your GitHub workflow to catch vulnerabilities before they reach production.
Basic Workflow
.github/workflows/security.yml
name: Security Scan
on:
pull_request:
jobs:
mikoshi-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Mikoshi
run: curl -sSL https://www.mikoshi.digital/install | bash
- name: Run Security Scan
env:
MIKOSHI_LLM: ${{ secrets.MIKOSHI_LLM }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
run: mikoshi -n -t ./ --scan-mode quickRequired Secrets
Add these secrets to your repository:
| Secret | Description |
|---|---|
MIKOSHI_LLM | Model name (e.g., openrouter/z-ai/glm-5.3) |
LLM_API_KEY | API key for your LLM provider |
Exit Codes
The workflow fails when vulnerabilities are found:
| Code | Result |
|---|---|
| 0 | Pass — No vulnerabilities (with --fail-on, none at or above the threshold) |
| 2 | Fail — Vulnerabilities found |
Add --fail-on high (or critical, medium, low) to fail only on findings at or above that severity. Lower findings still appear in the report, so a passing run is not necessarily finding-free.
Scan Modes for CI
| Mode | Duration | Use Case |
|---|---|---|
quick | Minutes | Every PR |
standard | ~30 min | Nightly builds |
deep | 1-4 hours | Release candidates |