Skip to content
Mikoshi

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.

shell
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 comments

Combine 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

ModeTypical durationUse it for
quickMinutesEvery pull request, smoke tests. In CI it scopes itself to changed files.
standard30–60 minutesNightly or weekly scans, pre-release checks.
deep1–4 hoursFull assessments, critical apps, before major releases. The default.
shell
mikoshi -t ./app --scan-mode standard

Interactive 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.

shell
mikoshi -n -t ./app --scan-mode quick --max-budget 10 --fail-on high

Headless 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.

shell
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
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 provider

Two more ways to shape a run:

  • --skills idor,business_logic loads built-in knowledge packs into the root agent at the start. See skills.
  • --workspace-file ./wordlist.txt (or PATH: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:

FileContents
penetration_test_report.mdThe full report, for people.
vulnerabilities/*.mdOne write-up per finding: proof of concept, impact, fix.
vulnerabilities.jsonEvery finding as structured data.
vulnerabilities.csvThe same, for spreadsheets and trackers.
findings.sarifSARIF 2.1.0, for code scanning and IDEs.
blue_team_report.mdDetections and hardening. Data in blue_team.json, rules in detections/.
run.jsonStatus, targets, cost and timings.

Browse a run, live or finished, in a local dashboard. Nothing leaves your machine:

shell
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:

shell
mikoshi -n -t https://staging.example.com --blue-logs ./access.log --blue-logs ./app.jsonl
mikoshi blue mikoshi_runs/<run-name> --logs ./access.log

Generated 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:

shell
mikoshi --resume                 # pick from previous runs
mikoshi -n --resume <run-name>