Docs
Running scans
Give Mikoshi one or more targets, tell it how deep to go and what it may touch, and read the results from a folder of standard files.
Targets
Pass targets with -t / --target, as many as you like. Mikoshi works out the type of each.
mikoshi -t ./app # local codebase (white-box)
mikoshi -t https://github.com/org/repo # repository, cloned for the run
mikoshi -t https://staging.example.com # live web app (black-box)
mikoshi -t ./openapi.yaml -t https://api.example.com # API spec + where it is deployed
mikoshi -t 10.0.0.0/28 --target-type host # hosts and networks
mikoshi --target-list ./targets.txt # one target per line, # for commentsCombine source and a running app for the strongest results: Mikoshi reads the code to find candidate bugs, then proves them against the live instance.
API specs can be OpenAPI or Swagger (.json/.yaml), a Postman collection export, or a live collection (postman://<collection-id>?env=<environment-id>, needs POSTMAN_API_KEY). Public CIDR ranges wider than /24 are refused.
Scan modes
| Mode | Typical duration | Use it for |
|---|---|---|
quick | Minutes | Every pull request, smoke tests. In CI it scopes itself to changed files. |
standard | 30–60 minutes | Nightly or weekly scans, pre-release checks. |
deep | 1–4 hours | Full assessments, critical apps, before major releases. The default. |
mikoshi -t ./app --scan-mode standardInteractive or headless
Without flags, Mikoshi opens a terminal UI where you watch the agents and can steer them. For scripts, CI and agents, run headless with -n. Mikoshi also switches to headless automatically when no terminal is attached.
mikoshi -n -t ./app --scan-mode quick --max-budget 10 --fail-on highHeadless runs exit 0 when clean, 2 when vulnerabilities are found (at or above --fail-on, if set), and 1 on an error. A clean exit only covers what was analysed, so check status in run.json too: a run that hit its budget reports stopped.
Credentials, focus and scope
Tell the agents what you know: test accounts, areas to focus on, and what is out of bounds. Short instructions go inline; reusable ones belong in a file you keep in your repo.
mikoshi -t https://app.example.com \
--instruction "Log in as test@example.com / TestPass123. Focus on IDOR in /api/users. Do not test /admin."
mikoshi -t https://app.example.com --instruction-file ./security/pentest-instructions.md# Credentials
- Admin: admin@example.com / AdminPass123 (HIGH privilege)
- User: user@example.com / UserPass123 (LOW privilege)
# Focus
1. Access control between the two roles
2. JWT handling
# Out of scope
- /health
- Third-party payment providerTwo more ways to shape a run:
--skills idor,business_logicloads built-in knowledge packs into the root agent at the start. See skills.--workspace-file ./wordlist.txt(orPATH:DEST) copies a file into the sandbox for the agents to use. Don’t place secrets there: the sandbox runs target code.
Results
Each run writes to mikoshi_runs/<run-name>/ as it goes:
| File | Contents |
|---|---|
penetration_test_report.md | The full report, for people. |
vulnerabilities/*.md | One write-up per finding: proof of concept, impact, fix. |
vulnerabilities.json | Every finding as structured data. |
vulnerabilities.csv | The same, for spreadsheets and trackers. |
findings.sarif | SARIF 2.1.0, for code scanning and IDEs. |
blue_team_report.md | Detections and hardening. Data in blue_team.json, rules in detections/. |
run.json | Status, targets, cost and timings. |
Browse a run, live or finished, in a local dashboard. Nothing leaves your machine:
mikoshi view # most recent run
mikoshi view <run-name>Detections from findings
The blue-team report is written at the end of every run. Add your logs to check whether you would have seen the attacks, or regenerate it later:
mikoshi -n -t https://staging.example.com --blue-logs ./access.log --blue-logs ./app.jsonl
mikoshi blue mikoshi_runs/<run-name> --logs ./access.logGenerated Sigma rules and SIEM queries are conservative drafts: tune them against your real telemetry before alerting on them.
Resume a run
Stopped by a budget, a quota or a closed laptop? Resume where it left off, with every agent’s history intact:
mikoshi --resume # pick from previous runs
mikoshi -n --resume <run-name>