Skip to content
Mikoshi

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 quick

Required Secrets

Add these secrets to your repository:

SecretDescription
MIKOSHI_LLMModel name (e.g., openrouter/z-ai/glm-5.3)
LLM_API_KEYAPI key for your LLM provider

Exit Codes

The workflow fails when vulnerabilities are found:

CodeResult
0Pass — No vulnerabilities (with --fail-on, none at or above the threshold)
2Fail — 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

ModeDurationUse Case
quickMinutesEvery PR
standard~30 minNightly builds
deep1-4 hoursRelease candidates