whyq
The artifact translator. You already ran the scanner — whyq explains the file it left behind, offline, one grammar across every tool.
whyq explain <file> reads a security/IaC tool's output file — trivy.json and falco.json today, plan JSON next — and returns six things for every finding:
| 何が (what) | なぜ (why) | 危険度 (severity) | まず確認 (check) | 修正 (fix) | 参考 (refs) |
|---|
$ trivy image --format json -o scan.json app:latest
$ whyq explain scan.json
■ openssl: possible denial of service in X.509 name checks [HIGH] (CVE-2024-6119)
何が: libssl3 — vulnerability
なぜ: A known vulnerability affects libssl3 3.0.2-0ubuntu1.15. A fixed version
(3.0.2-0ubuntu1.18) is available, so this is actionable now.
確認: Confirm libssl3 is actually reachable in your runtime path, and check
whether the installed version is really in use.
修正: remedify <scan.json> (OS-package remediation is remedify's job)
参考: https://avd.aquasec.com/nvd/cve-2024-6119
Where whyq sits: detect → understand → fix
whyq is the understanding layer of a three-part story about contextualizing detection:
detect ──────────► understand ──────────► fix
(tfdrift, trivy, (whyq) (remedify)
falco, sysdig…) what/why/severity distro-aware
/check/fix/refs remediation commands
- tfdrift-falco and other scanners detect.
- whyq turns their raw output into something a human can act on.
- remedify owns the last mile — the exact, OS-specific fix command.
whyq deliberately does not re-implement OS-package remediation. When a finding is an OS-package vulnerability, its 修正 field hands off to remedify. whyq stays the cross-tool understanding layer; remedify owns vuln→fix. The --format json output is shaped so remedify (and CI) can consume it directly.
Why not k8sgpt / HolmesGPT?
The space isn't empty, but the wedge is real and narrow:
- k8sgpt reads a live Kubernetes cluster. It can't read a file you already have.
- HolmesGPT connects to your alert sources and investigates autonomously — a heavy agent.
- whyq reads the artifact already sitting on your disk. No cluster, no connection, no SaaS — and one grammar across tools (trivy → falco → plan JSON → …), not a single domain.
"Light / local / no-SaaS / brew" is not the flag here — k8sgpt already owns that. whyq's flag is one thing: artifact translator, cross-tool.
Quick start
# zero-install (stdlib only, no dependencies)
git clone https://github.com/higakikeita/whyq && cd whyq
python3 whyq.py explain examples/trivy.json
# machine-readable (remedify-ready / CI)
python3 whyq.py explain scan.json --format json
python3 whyq.py explain scan.json --min-severity HIGH
LLM: BYO-key, and honest about it
Turning a finding into good prose (なぜ / まず確認) benefits from an LLM — so whyq will not claim "no SaaS" unconditionally. Instead:
- Default is offline. With no flag, whyq uses deterministic templates. Nothing leaves your machine.
- Opt in explicitly with your own key/model — data goes only where you point it:
whyq explain scan.json --llm anthropic # uses $ANTHROPIC_API_KEY
whyq explain scan.json --llm ollama:llama3.2 # fully local, no key
The deterministic half — parse, severity, fix command, references — never touches the LLM and is regression-tested. Only the prose is model-generated. That keeps the audit trail intact ("the deterministic tool computes, the AI explains").
Supported inputs
| Tool | Status |
|---|---|
| Trivy JSON (vulnerabilities · misconfigurations · secrets) | ✅ |
| Falco JSON / JSONL (runtime events; MITRE ATT&CK tags → refs) | ✅ |
| Terraform plan JSON | planned |
A scan finding and a runtime event — two different tools, two different domains — land in the same normalized shape and flow through the same six-field output. That is the cross-tool wedge, not a slogan:
whyq explain trivy.json # vulnerabilities & misconfig
whyq explain falco.json # runtime events (JSONL, as Falco writes it)
Adding a format is a parser plus a detector — the normalized finding and every output path stay the same.
Development
python3 -m unittest discover tests -v
The deterministic core is pinned by regression tests; the LLM layer is mocked. See tests/.
License
MIT — see LICENSE.
Metadata
Release files for whyq 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whyq-0.1.0.tar.gz | 13.7 kB | With provenance | Details for whyq-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whyq-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for whyq-0.1.0-py3-none-any.whl |
Total release size: 26.3 kB
Release files / whyq-0.1.0.tar.gz
| Download URL | whyq-0.1.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68c57f1d1b62e4a0255dc7671c497c40a3c6ece856ff64ed12641eb8389d865b
|
|
BLAKE2b-256 checksum How to use checksums |
28c088bf435176d832091d4fc26cbb0ea7bc06da246dad75af34a30ba063e1a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / whyq-0.1.0-py3-none-any.whl
| Download URL | whyq-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8b75ad32e79bf6d3855824819853099f2fcbb47fa382ea53ace5959ea7c2ef5
|
|
BLAKE2b-256 checksum How to use checksums |
089749303ead71219d579e286f508f27b3ef0499e7a0d75a5912076dee57555e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for whyq 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for whyq-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.