
Husk
io.github.husk-security由 GitHub 帳號 husk-security 發布v0.1.2更新於 Oct 24, 2026
Local-first defensive scanner for vulnerable dependencies, leaked secrets, and risky agent configs
概覽
Husk 是本地優先的安全掃描器,透過 stdio 讓 AI 助理讀取相依套件漏洞、外洩密鑰與代理設定風險等掃描結果。
- 可以做什麼
- 讀取掃描發現與最近一次掃描報告,包含嚴重程度、證據與修復建議,無需重新掃描。觸發針對專案的限定範圍掃描,並查詢單一套件的漏洞或惡意軟體判定。檢視與管理專案原則決策,例如允許、封鎖與抑制,以及個人信任帳本。透過寫入設定,將此 MCP 伺服器註冊到支援的 AI 代理。
- 適用情境
- 當你希望助理協助整理程式庫中的安全問題、在安裝前查核某個套件,或說明有風險的相依套件、外洩密鑰與不安全的 MCP 或代理設定時使用。適合已在本地執行 Husk、希望助理直接讀取結果而非臨時執行檢查的開發者。
- 執行需求
- 以本地程序執行,支援 Linux 與 macOS(Windows 僅能透過 WSL),僅限桌面端。可透過 npm(husk-sec)、cargo、簽章發行腳本或 Nix 安裝。本地掃描不需帳號或 API 金鑰;線上查詢需要連線至公開漏洞公告資料庫,使用 --offline 則完全不發出網路請求。選用環境變數包括 HUSK_HOME、HUSK_CACHE_DIR 與 HUSK_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Husk,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
A local-first security scanner for developers. One binary, no account.
Install · Quickstart · Usage · Commands · How it works
husk scans your machine for compromised packages, leaked secrets, risky install
scripts, and unsafe AI/MCP configuration, then shows you what to fix. It runs
locally: no login, no account, no file ever leaves your machine. An online scan
sends only package names, versions, and CVE ids to public advisory databases
(OSV.dev, npm, PyPI, GitHub, CISA KEV / FIRST EPSS); --offline makes zero
network calls.
Pre-1.0 software without an independent audit. Interfaces can change between releases. Bug reports and questions are welcome in Issues.
Install
husk runs on Linux and macOS. On Windows, run it inside WSL, where it installs and behaves exactly as it does on Linux. There is no native Windows build.
Download the latest signed release, verify its checksum, and install it:
It installs to ~/.local/bin, overridable with HUSK_INSTALL_DIR or
--install-dir. If that directory is not already on your PATH, it asks before
adding it to your shell's startup file and names the exact file it would change.
Decline, or run it without a terminal, and it prints the one command that adds
it instead. --no-modify-path never writes to a startup file at all.
Prefer not to pipe into a shell? Download install.sh, read it, then run
it. Every release is cosign-signed and SLSA-attested; the installer verifies the
SHA-256 checksum (and the signature too, when cosign is on your PATH). See
verifying a release.
Other install sources
Nix
Run it without installing anything:
The flake exposes two packages:
husk(the default, with the localhost web UI) andhusk-tui(the same binary without it, so it needs no Node toolchain).For persistent use, add the flake as an input and put the package in your configuration. NixOS:
Home Manager, with the same input:
If you would rather put it on
PATHimperatively than declare it,nix profile install github:husk-security/huskalso works.
Quickstart
husk with no subcommand prints help and exits, like git or cargo. The entry
points are husk scan (scan and print the report), husk web (the local web
UI, opened in your browser), and husk tui (the terminal UI).
Usage
A few of the commands you'll actually run day to day. The full list (every subcommand and flag) is in the command reference.
Scan a directory and print the findings report:
Vet one package before you install it (a live OSV.dev lookup):
The version can be an @version suffix (split on the last @, so
@scope/[email protected] works) or separate arguments: husk check npm lodash 4.17.20.
A bare name (husk check lodash) assumes npm and checks malware advisories only.
Protect normal and lockfile installs with the tracked Safe Chain task in the Guide. Husk recommends the free, MIT-licensed third-party tool instead of shipping a weaker package-manager wrapper:
Commit a project policy (block/allow packages, suppress triaged findings,
set the CI threshold); the .husk/ directory is meant to be committed:
Plan safe fixes (dry-run by default; --apply writes them, with backups):
Gate a build in CI, JSON on stdout, non-zero exit at or above the threshold:
Environment
husk reads a few environment variables:
Command reference
One binary, many subcommands. Run husk <command> --help for the full flags
of any of them.
husk scan: Scan now and print the findings reporthusk status: Print the last scan's report without rescanninghusk tui: Open the interactive terminal UI on the latest scanhusk web: Serve the local web UI on the latest scanhusk check: Look up one package's malware/vulnerability verdicthusk ci: Scan and gate a build; exit 1 at/above the thresholdhusk fix: Plan fixes from the latest scan; write them with --applyhusk init: Create a committed .husk/policy.toml project policyhusk approve: Record an allow/block/suppress decision in the policyhusk policy: Show the active project policy and its countshusk ledger: Show or verify the personal trust ledgerhusk daemon: Scan on an interval; report findings new since last runhusk login: Sign in to a husk account (coming soon)husk logout: Delete the credentials stored on this machinehusk account: Show the signed-in account and machine linkhusk sync: Upload the last scan's inventory for retroactive alertshusk alerts: List this account's retroactive alertshusk telemetry: Manage opt-in anonymous telemetry (off by default)husk feedback: Send feedback to the husk developershusk mcp: Run the MCP server, or register it with an AI agent
JSON output
Several commands emit the full scan report as JSON: husk scan --json,
husk status --json, husk tui --json, and husk ci (always JSON). The shape
is identical everywhere; it is the report the local cache stores and every UI
renders. It is plain JSON on stdout: never paged, never colored, safe to pipe
straight into jq.
How it works
- Local-first. Scans read files and parse them statically; husk never executes what it scans. Results and state stay on your machine; an online scan sends only package coordinates and CVE ids to public advisory databases.
- Package coverage. Discovery is a pluggable registry spanning ~68 package
ecosystems (language managers, OS/distro databases, AI/agent/editor surfaces,
CI/IaC/containers, and CycloneDX/SPDX SBOMs), see
src/scan/targets/. - Exploit-aware. CISA KEV and FIRST EPSS enrichment sorts actively-exploited CVEs to the top instead of dumping an undifferentiated CVE list.
- State that compounds. A committed
.husk/policy.toml(block/allow, suppress, CI threshold) travels with your repo; a personal hash-chained trust ledger at~/.husk/ledger.jsonlrecords everyapprove. Both are local, inspectable, and deletable. - Built for agents.
husk mcpserves a Model Context Protocol server over stdio so AI agents can read findings and trigger scoped scans;husk mcp install <agent>writes the config. It is listed in the Model Context Protocol Registry asmcp-name: io.github.husk-security/husk. Agent-facing details live in AGENTS.md andintegrations/.
Building from source
Cargo and Rust 1.95 or newer is all you need.
The localhost web UI is a Vite + React app in web/ that the binary
embeds (via rust-embed) under the default web Cargo feature. There are two
build paths; pick one:
-
Full build (default feature). Build the frontend first, then compile. This is the only path that needs Node:
-
CLI/TUI-only (no Node needed). Drops the web UI entirely; nothing to build first:
web/dist is generated output and is gitignored. A plain cargo build without
building the frontend first fails with a clear error pointing you at one of the
two paths above, because the web feature requires web/dist to exist.
If you already use Nix, the flake pins the same toolchain:
nix develop gives you a shell with it, and nix build .#husk (web UI included)
or nix build .#husk-tui (Node-free) builds the binary directly. None of it is
required.
Developer documentation (the module layout, the three pluggable registries, and how to add a scanner) is in AGENTS.md.
Privacy & trust: what husk reads, what never leaves your machine, how releases are signed
husk is a security tool, so it holds itself to a higher standard than the things it scans. Every claim below is enforced by code or CI in this repository.
What husk reads. Manifests and lockfiles, package-manager databases,
dotfiles and configs, git hook files, CI workflow files, MCP/agent configs, and
text files (for secret patterns). Scans are strictly read-only. husk writes
only its own state, ~/.husk/ (ledger, daemon state, cloud
config) and the cache dir, plain files you can inspect and delete anytime.
What husk never does.
- Never executes what it scans. No package managers, install scripts, git
hooks, editor extensions, MCP servers, or repo code; detection is static
parsing only. The one opt-in, per-invocation exception is
husk fix --apply --deps, which runs your package manager's version-pin command, shown to you first. - Never uploads your files. During an online scan husk sends package names,
versions, and CVE ids only to public advisory databases (OSV.dev, npm, PyPI,
GitHub, CISA KEV / FIRST EPSS), never file contents, paths, or secrets.
husk scan --offlinemakes zero network calls. - Never phones home by default. No account, no login wall; telemetry is off
until you run
husk telemetry on, and it honorsDO_NOT_TRACKand aHUSK_TELEMETRY_DISABLEDkill switch. All cloud features are opt-in and inert until used. - Never puts secrets in output. Secret findings carry short, pre-redacted excerpts, not the matched credential.
Verifiable properties.
About tst/. tst/ holds intentionally unsafe fixtures (fake AWS keys
like AKIAIOSFODNN7EXAMPLE, prompt-injection markdown, vulnerable pins) so
husk's detectors can be tested deterministically. They are fake by policy and
excluded from the crates.io package. If your scanner flags them inside this repo,
it's working as intended; so is husk. tst/README.md explains
what is in there and why, and tst/ is out of scope in
SECURITY.md.
Vulnerabilities in husk itself go through the private channel in SECURITY.md, not public issues.
Verifying a release
Release verification details
Every release archive ships a SHA-256 checksum, a cosign keyless signature
(Sigstore Fulcio + the Rekor transparency log, no long-lived key to steal), and
a SLSA build-provenance attestation, all produced in CI from the tagged
commit. install.sh verifies the checksum automatically (and the signature if
cosign is present). To verify by hand:
A successful run prints Verified OK. If the identity or issuer doesn't match,
the signature is rejected; that's the point. The exact release process
is documented in .github/workflows/release.yml.
Publishing requires a stable vX.Y.Z tag on a commit reachable from main, a
matching version in Cargo.toml and flake.nix, and an explicitly allowed
human for both the original workflow run and any re-run. The workflow does not
rely on tag protection rules: it rechecks the live remote tag and its main
ancestry immediately before publishing. An unauthorized tag can start a run, but
it cannot reach the signing job.
Support and license
- Building and developing: see building from source above and AGENTS.md. New detections ship with fixtures and tests.
- Contributing: see CONTRIBUTING.md for the build and pull-request flow.
- Getting help: usage questions, help interpreting findings, concrete bugs, and feature requests all go to Issues.
- Security: report a vulnerability in husk itself privately, per SECURITY.md. Never open a public issue for one.
- License: MIT.
來源:README.md,提交 8ef79b0
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分