Guardanaのロゴ

Guardana

組織
guardana

Open-source AI security verification for model artifacts, live endpoints, MCP servers, and recorded agent traces. Reproducible evidence for release decisions.

公開者guardana
リポジトリguardana
言語HTML
フォーク
5
スター
124
利用可能なツール
0
通信方式stdio
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Guardanaは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには124件のスターと5件のフォークがあります。

🛡️ Guardana

Guardana is an open-source AI security verification tool for security and platform engineers that checks model and code artifacts, live AI systems, and recorded runs, with scans that run fully offline.

It probes live endpoints and MCP servers, analyzes recorded agent traces, and returns reproducible evidence and a verdict, including "could not tell". Compare each run with an accepted baseline.

CI OpenSSF Best Practices License: Apache 2.0 Python 3.11+ Status: beta OWASP LLM Top 10 PyPI PRs welcome

Quickstart · Features · Rule catalog · Docs · Status & limits · Roadmap · Changelog · Partner with us


51 built-in security checks. Add checks for your application. No account, telemetry, or phone-home. Artifact scans are offline. Active checks connect to the target you choose and, when configured, an optional collector.

Why Guardana

Guardana keeps four outcomes separate:

  • findings: a check reached a negative verdict;
  • unverified: it ran but could not decide;
  • errors: it could not run;
  • coverage shortfalls: required evidence was unavailable.

Results that require judgment include an outcome, confidence, rationale, and evaluator identity. guardana calibrate measures evaluator confidence against labelled samples.

An exhausted budget exits 6 and preserves its results. A comparison that cannot be made exits 2. Missing evidence is not reported as success.

Quickstart

bash
uvx --from guardana-cli guardana scan .   # zero-install run (uv)
uv add guardana-cli                       # or: pip install guardana-cli

The command is guardana; the distribution is guardana-cli. For a source checkout, clone and run uv sync as described in docs/install.md.

Start with an offline result:

bash
guardana init --starter first-run   # a small project with one problem to find and fix

Its README guides you through a failing scan, the fix, a saved run and a check of your own. You need no account, key, model or network. Then choose a recipe: your own project, a run your application recorded, or the application your users talk to.

Every published distribution has signed, keyless build provenance verifiable with gh attestation verify, plus a PEP 740 attestation on PyPI.

Scan the bundled vulnerable model directory:

console
$ uv run guardana scan examples/vulnerable-model

✖ [CRITICAL] guardana.supply_chain.pickle_opcode — Dangerous pickle opcode (arbitrary code on load)
    unpickling imports non-allowlisted callable: posix.system  (examples/vulnerable-model/model.pt)
✖ [HIGH] guardana.supply_chain.dependency_risk — Unsafe model/deserialization loader call
    torch.load without weights_only=True  (examples/vulnerable-model/load_model.py:3)
✖ [CRITICAL] guardana.supply_chain.remote_code_config — Model config requests custom-code execution on load
    '_attn_implementation_internal' names the Hub kernel repository 'attacker/kernel-repo', which transformers downloads and imports on load — a private field, so trust_remote_code=False does not stop it (CVE-2026-4372)  (examples/vulnerable-model/config.json)
…
▲ [MEDIUM] guardana.supply_chain.hallucinated_package — Import of unknown package (possible slopsquat lead)
    import 'torchutilz' isn't a known package or a declared dependency — declare it in requirements/pyproject, or verify it exists on PyPI  (examples/vulnerable-model/train.py:1)
…

12 finding(s); 19 rule(s) run, 0 skipped. 5 component(s) observed.

That run exits 1, so it can gate CI. To check your own work:

bash
guardana scan path/to/your/project     # static, offline, no model needed
guardana init                          # write a guardana.yaml policy file
guardana scan . --format sarif         # SARIF 2.1.0 for GitHub code scanning

guardana probe --url http://localhost:11434 --model llama3 --preset ci --output run.json
guardana diff accepted-run.json run.json   # 0 nothing worse · 1 it is · 2 cannot tell

The same rules, policy, redaction, and gate work in tests (docs/usage-testing.md):

python
from guardana.adapters.langchain import langchain_target
from guardana.testing import assert_secure


def test_the_repository_ships_no_dangerous_artifact():
    assert_secure("models", preset="ci")


def test_the_agent_keeps_its_instructions_to_itself(chat_model):
    assert_secure(langchain_target(chat_model, system_prompt=SYSTEM), preset="ci")

Before active testing

Probes send real requests and can cost money or trigger provider abuse detection. Prefer staging. Guardana sends tool calls to doubles, but the surrounding application can still act on a model response. Evidence may contain sensitive text and is redacted by default. guardana monitor re-runs active probes on a schedule. See docs/safe-testing.md and docs/privacy.md.

What you do with it

Guardana verifies artifacts, deployed systems, and recorded evidence.

VerbCommandWhat it does
Verify artifactsguardana scan <path>Static, offline checks for code and model artifacts.
Verify a deployed systemguardana probe --url … --model …Bounded active checks against a model, agent, or MCP server.
Verify a recorded runguardana analyze-trace trace.jsonlChecks OpenTelemetry GenAI spans against built-ins and your security contract, without opening a socket.
Inspect available evidenceguardana trace inspect trace.jsonlShows recorded evidence dimensions and policy gaps.
Continuously re-verifyguardana monitor --url … --model …Re-runs active checks on a schedule and alerts when a cycle is worse than the first.
Compare evidenceguardana diff a.json b.jsonReports whether the later saved run is worse, or refuses an invalid comparison.
Import external observationsguardana import-observations results.jsonImports garak, promptfoo, or custom results as unverified, with provenance. It never exits 0 because Guardana verified nothing.

scan, probe, monitor, and analyze-trace can send findings to an optional collector with --reporter server://<url>. Other commands cover planning, capability inspection, configuration, baselines, run inspection, rule testing, and extension packs. See docs/index.md.

Exit codes have eight documented meanings, tested against docs/exit-codes.md. CI does not need to parse console text.

GitHub Actions

yaml
# .github/workflows/ai-security.yml
name: AI security
on: [push, pull_request]
jobs:
  guardana:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write   # to upload SARIF
    steps:
      - uses: actions/checkout@v4
      - uses: guardana/guardana@v0.33   # moving tag → latest 0.33.x
        # with:
        #   args: --preset ci --baseline guardana-baseline.yaml

A pre-commit hook and templates for GitLab, Jenkins, and Azure DevOps are in docs/integrations.md.

What it checks

51 built-in rules map to both editions of the OWASP LLM Top 10, the OWASP Top 10 for Agentic Applications, the OWASP MCP Top 10, OWASP ML Top 10, MITRE ATLAS v5.6.0, and NIST AI 100-2e2025. References include their edition.

FamilyRulesSurfaceWhat it covers
guardana.supply_chain.*16buildunsafe loading, remote code, model formats, dependencies, transport, secrets, and provenance
guardana.prompt.*7build + runtimehidden instructions, tool poisoning, injection, jailbreaks, prompt leakage, and resource consumption
guardana.agent.*7runtimetool-result injection, credential exfiltration, broad arguments, excessive use, memory poisoning, tool schemas, and MCP server manifests
guardana.mcp.*8runtimeauthentication, discovery, audience, session, scope, issuer, and cache handling
guardana.trace.*9runtimerecorded credential, identity, consent, policy, approval, retrieval, effect, and handoff boundaries
guardana.scenario.*2runtimemulti-turn jailbreak and indirect-injection scenarios
guardana.output.*1runtimesecrets in model output
guardana.training.*1buildtraining-data integrity

The static 19 (artifact surface) need no model or network. The dynamic 32 (endpoint and trace surfaces) grade a live model, a live MCP server, or a recorded execution.

The generated rule catalog lists each installed rule id, severity, and framework mapping, including third-party rules. guardana rules prints the same registry. See FEATURES.md for the capability overview.

Where Guardana fits

Guardana works beside security and evaluation tools.

CategoryExamplesGuardana's relationship
Model and artifact scannersModelScan, picklescanOverlaps at the static layer and covers additional AI artifact formats.
Red-team harnessesgarak, PyRIT, promptfoo, DeepTeamComplements their attack libraries. Guardana separates findings, inconclusive results, errors, and missing coverage, and can import their observations.
Evaluation frameworksDeepEval, RagasGuardana also gates answer quality on team-supplied datasets through suites. Use it alongside DeepEval or Ragas.
Runtime guardrailsLlamaFirewall, Llama GuardVerifies and gates; it does not run inline.
AI observabilityLangSmith, LangfuseUses OpenTelemetry output as trace-analysis input.
SAST, CVE, and secret scannersSemgrep, Trivy, gitleaksAdds AI-specific verification beside general application security tools.

A run records what was checked, what could not be checked, and the sample used. This distinguishes fewer findings from less coverage and prevents an invalid comparison from appearing as no change.

Extend it for your application

The 51 built-ins cover shared risks. Add rules for your data, tools, permissions, and business rules.

Guardana has five extension points: Target, Rule, Evaluator, Report/Finding, and Profile. A shared registry discovers extensions from Guardana or private packages.

  • Rules express prohibited behavior in YAML or Python. docs/writing-rules.md explains both forms; guardana new-rule scaffolds one.
  • Security contracts describe application invariants such as tenant boundaries, required approval, allowed scopes, and credential boundaries (docs/usage-contracts.md).
  • Evaluators control how replies are graded. Configuration supports llm_judge through an OpenAI-compatible endpoint and the optional guard classifier.
  • Targets connect installed, trusted systems through a declared locator scheme.
  • Taxonomies let a package register its own control set.

examples/custom_rule/ is a working third-party package. The guardana-core library supports embedding the engine without the CLI. See docs/extending.md and docs/architecture.md. The extension API remains pre-1.0; compatibility details are in docs/product-status.md.

Central monitoring — self-hosted or managed

The collector is optional. Local and CI verification do not depend on it. For shared visibility, runs can send normalized findings to self-hosted guardana-server, backed by PostgreSQL with an opt-in dashboard.

Maturity: beta. Finding routes require scoped API keys. Projects cannot read each other's data, and keys can be pinned to an environment. Findings have audited lifecycle states and expiring waivers. Operators control retention and deletion. Still missing: RBAC and human identities. The dashboard uses a read-scoped session rather than a human identity. docs/usage-collector.md · docs/deployment.md

The engine and built-in rules are Apache-2.0. See the project principles and roadmap.

Documentation

Contributing

New rules are useful. Each new rule must map to a standard and include a positive and a negative fixture.

CONTRIBUTING.md covers contributors; CLAUDE.md covers AI agents. Report security issues through SECURITY.md, never public issues.

Related project: Guardana Control

Guardana Control is a separate, independent open-source project. It sits in the request path of an AI agent's MCP tool calls: it decides each call, enforces the decision, and records evidence. It is alpha; its own README says not to deploy it as a security boundary. Guardana verifies from outside any request path, before and between releases. Neither project needs the other.

Partner with us

  • 🏢 Design partners. Use Guardana in CI and beside self-hosted production models, with a direct line to the maintainers.
  • 🧩 Rule and integration authors. Keep checks private under your namespace or contribute them upstream.
  • 💬 Everyone else. Share issues and questions in Discussions.

contact@guardana.dev · karauda.com/contact · guardana.dev · github.com/guardana

License

Apache License 2.0 — see LICENSE. Use it, ship it, build on it.

GuardanaのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Guardanaに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Guardanaをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. GuardanaのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "guardana": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてGuardanaのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. GuardanaのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Guardanaを使ってこのタスクを手伝ってもらえますか?
Guardana
はい、読みました。
Guardanaで調べた結果をお伝えします。

よくある質問

Guardana MCPサーバーは何に使いますか?

Guardanaは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでGuardana MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでGuardanaを利用できます。

TypingMindでGuardana MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Guardanaを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Guardana MCPをTypingMindに接続するにはどうすればよいですか?

GuardanaはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでGuardana MCPのどのようなツールを利用できますか?

GuardanaはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Guardana MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Guardanaで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇