garagon/aguara
关于
The open source security engine for AI agent and supply-chain trust.
安全与隐私实测星标增长
- 24小时
- +1
- 7天
- +1
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Aguara
Check a repository before you, or your agent, trust it.
A local security scanner for agent skills and instructions, MCP and agent settings, CI workflows, and dependencies.
Cloning a project brings more than its source code. Its dependencies can run install scripts, its agent settings can pre-approve shell commands or start MCP servers, and its instruction files can tell a coding agent to read your credentials or run a script nobody reviewed.
Aguara reads those files without running anything and tells you what needs a decision: a dependency pinned to a known malicious release, an instruction to read your SSH keys or cloud credentials, a hook that downloads and runs a script. Each finding names the package, or the file and line. Run it before you install dependencies, before an agent works in a repository or loads a skill, and on every pull request. No account, configuration or AI agent is needed.
Runs locally and offline, and the same input gives the same findings. No LLM, no telemetry, nothing uploaded, and none of the inspected code is executed.
Quick Start
Install the latest release (the script verifies the checksum and installs to ~/.local/bin):
curl -fsSL https://raw.githubusercontent.com/garagon/aguara/v0.30.0/install.sh \
| VERSION=v0.30.0 sh
Then, from the project directory:
aguara audit .
audit matches the project's dependencies against known malicious releases and scans its files for risky content, without installing or running anything. On a project that pins a compromised event-stream release and lets Claude Code run any shell command without asking, it reports:
...
── PACKAGE CHECK ───────────────────────────────────────────────────────
Coverage: npm package-lock.json: 1 packages
✖ CRITICAL event-stream 3.3.6 is a known compromised npm package (GHSA-mh6f-8j2x-4483)
package-lock.json
── CONTENT SCAN ────────────────────────────────────────────────────────
Coverage: 3 files scanned
■ AGENTCFG_BROAD_ALLOW_001 Claude Code permissions pre-approve dangerous commands .claude/settings.json:3
...
✖ Triage: STOP
Do not install, execute CI, or hand this repository to an agent until the critical findings are resolved.
...
Next: aguara explain AGENTCFG_BROAD_ALLOW_001
Read the triage line first. STOP means a known malicious package, a critical finding or a failed gate: install and run nothing yet. REVIEW means a person should decide before anything is installed or run, also when something could not be evaluated. PROCEED means nothing needs review. The Coverage lines say what each half of the audit read. For a known malicious package, look up the advisory named in the finding and remove or replace the package before anything installs it. aguara explain <RULE_ID> says what a rule looks for and how to fix it. Getting started walks through the whole report.
What It Catches
- Malicious dependencies. A lockfile that pins a compromised release, such as
event-stream3.3.6. - Instructions that leak secrets. A skill telling the agent to upload
~/.aws/credentials, even in base64. - Hidden instructions. A skill with an HTML comment telling the agent to ignore previous instructions.
- Settings that run commands. A
.claude/settings.jsonhook that downloads and runs a script. - Unsafe CI workflows. A
pull_request_targetjob that runs a pull request's code with secrets in scope. - Secret-harvesting install scripts. An npm
postinstallscript that readsGITHUB_TOKENand posts it. - Weakened package-manager settings.
dangerously-allow-all-scripts=truein a project's.npmrc. - Committed credentials. A GitHub token written into an MCP server's
envblock.
These are examples; RULES.md lists every detection.
Where It Fits
Check a project before you trust it. Run audit on a repository, a skill directory or an MCP server before you install or run anything. check looks only at dependencies: lockfiles and installed packages for npm, PyPI, Go, Rust, PHP, Ruby, Java and .NET. scan looks only at content. A local scan applies the scanned project's own .aguaraignore, .aguara.yml and inline suppressions; --project-policy ignore turns them off, and audit and --ci ignore them by default. See Checking packages and Scanning content.
aguara check .
aguara scan ./skills/ --project-policy ignore
Gate pull requests. In CI, run aguara audit . --ci before dependencies are installed; it exits 1 on critical findings. The GitHub Action runs the content scan only and uploads its SARIF to code scanning. aguara init scaffolds a GitHub Actions workflow that runs both: the Action's scan for code scanning and aguara audit . --ci as the gate. aguara init --hook writes a git pre-commit hook that scans the staged files. Exit code 0 means no gate tripped and 1 that a gate tripped; 2 means the command failed or a scan or package check could not finish, and is never a pass. See CI and automation.
Review the MCP servers on your machine. discover lists the servers configured in 17 MCP clients, including Claude Desktop, Claude Code, Cursor and VS Code, and scan --auto scans them. See MCP discovery.
aguara discover
aguara scan --auto
Build it into your tools. scan, check and audit write JSON, SARIF or Markdown, and JSON reports carry a schema version, with JSON Schemas in schema/. The Go library scans content in-process. See Reports and integrations.
Why You Can Rely on It
- Deterministic and offline. Findings come from rules and parsers, not a model, and the same input gives the same findings.
scan,checkandauditmake no network calls; onlyaguara update,--freshand the release check inaguara versiondo, and--no-update-checkorAGUARA_NO_UPDATE_CHECK=1turns that check off. - Threat intelligence in the binary. Each release embeds malicious-package advisories from OSV, including OpenSSF Malicious Packages, and curated incident records.
aguara updaterefreshes them from a signed bundle after verifying its signature. - Signed releases. Release checksums and container images are signed with Cosign and come with SBOMs; images also carry SLSA provenance. See Verifying a release.
- Gaps are reported. A report lists what Aguara could not evaluate, and a scan or package check that cannot finish exits 2 instead of passing.
Limitations
- Aguara is static analysis. A clean report is not proof of safety: unsupported formats, dynamic code and threats absent from the rules or the intelligence can be missed.
- A finding is evidence to review, not always proof of malicious intent.
- Aguara does not sandbox packages or control an agent at runtime, and package checks find known malicious releases, not CVEs. See Limitations.
Installation
# Install script: verifies the archive checksum, installs to ~/.local/bin
curl -fsSL https://raw.githubusercontent.com/garagon/aguara/v0.30.0/install.sh | VERSION=v0.30.0 sh
# Homebrew
brew install garagon/tap/aguara
# Docker: read-only project mount, non-root container
docker run --rm -v "$PWD:/repo:ro" ghcr.io/garagon/aguara:0.30.0 audit /repo
# Go 1.26.0 or later: builds from source, not a signed release artifact
go install github.com/garagon/aguara/cmd/[email protected]
Release binaries for Linux, macOS and Windows are on the Releases page. For GitHub Actions, use the Aguara Action. Installing and verifying covers signature checks and development builds.
Documentation
| Guide | What it covers |
|---|---|
| Getting started | A first audit and how to read the report |
| Checking packages | Files read, version matching, threat intelligence |
| Scanning content | What is scanned, piped content, project policy |
| CI and automation | Gates, exit codes, baselines, the Action, hooks |
| MCP discovery | discover, scan --auto and redaction |
| Reports and integrations | JSON, SARIF, Markdown, the Go library |
| Configuration | .aguara.yml, ignore patterns, custom rules, overrides |
| Installing and verifying | Install options, development builds, signatures |
| Limitations | What a result does not tell you |
Also: RULES.md for every detection, CHANGELOG.md for release history and upgrade notes, schema/ for the JSON Schemas of the reports, and AGENTS.md for contributors and AI agents.
Contributing
Bug reports, false positives and rule ideas are welcome as issues. Read CONTRIBUTING.md before opening a pull request, and the Code of Conduct.
Security
Report vulnerabilities in Aguara privately through GitHub Security Advisories, not in a public issue. SECURITY.md describes the scope and supported versions.
License
探索相关项目
加载中…