Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
Guardrails — Programmable guardrails for LLM chat apps: enforce input/output rails, block jailbreaks and prompt injections, detect hallucination, and mask sensitive data. | Kitploit
工具/GitHubGitHub/nvidia-nemo/guardrails
Defensive ToolsVulnerability AnalysisPrivacyMachine LearningAI SecurityAnomaly DetectionAI Security 分类第 10 名
GitHubnvidia-nemo/guardrails

Guardrails

Programmable guardrails for LLM chat apps: enforce input/output rails, block jailbreaks and prompt injections, detect hallucination, and mask sensitive data.

7.5k90317217小时25分前Kitploit 审核通过
分享
查看仓库
网站
内容在请求的语言中不可用。显示英文版本。
# NVIDIA NeMo Guardrails Library

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PyPI](https://img.shields.io/pypi/v/nemoguardrails)](https://pypi.org/project/nemoguardrails)
[![Python](https://img.shields.io/pypi/pyversions/nemoguardrails)](https://pypi.org/project/nemoguardrails)
[![Tests/Linux](https://img.shields.io/github/actions/workflow/status/NVIDIA-NeMo/Guardrails/pr-tests.yml?logo=github&label=Tests/Linux)](https://github.com/NVIDIA-NeMo/Guardrails/actions/workflows/pr-tests.yml)
[![Tests/Windows](https://img.shields.io/github/actions/workflow/status/NVIDIA-NeMo/Guardrails/full-tests.yml?logo=github&label=Tests/Windows)](https://github.com/NVIDIA-NeMo/Guardrails/actions/workflows/full-tests.yml)
[![Tests/macOS](https://img.shields.io/github/actions/workflow/status/NVIDIA-NeMo/Guardrails/full-tests.yml?logo=github&label=Tests/macOS)](https://github.com/NVIDIA-NeMo/Guardrails/actions/workflows/full-tests.yml)
[![Lint](https://img.shields.io/github/actions/workflow/status/NVIDIA-NeMo/Guardrails/lint.yml?logo=github&label=Lint)](https://github.com/NVIDIA-NeMo/Guardrails/actions/workflows/lint.yml)
[![Documentation](https://img.shields.io/badge/docs-nvidia.com-76B900)](https://docs.nvidia.com/nemo/guardrails)
[![Total downloads](https://static.pepy.tech/badge/nemoguardrails)](https://pepy.tech/project/nemoguardrails)
[![Monthly downloads](https://static.pepy.tech/badge/nemoguardrails/month)](https://pepy.tech/project/nemoguardrails)

[Documentation](https://docs.nvidia.com/nemo/guardrails/latest/about-nemo-guardrails-library/overview) · [Quickstart](#quickstart) · [Use cases](#what-you-can-build) · [Integrations](#choose-your-integration) · [Guardrail catalog](#guardrail-catalog) · [Examples](https://github.com/nvidia-nemo/guardrails/blob/develop/examples) · [Community](#community-usage) · [Security](https://github.com/nvidia-nemo/guardrails/blob/develop/SECURITY.md) · [Releases](https://github.com/NVIDIA-NeMo/Guardrails/releases) · [Changelog](https://github.com/nvidia-nemo/guardrails/blob/develop/CHANGELOG.md)

NeMo Guardrails is an open-source library for applying programmable safety and security controls to LLM and agentic applications. Agents run commands, call APIs, query your data, and read the web. Conversational applications apply input and output checks; retrieval-augmented generation (RAG) systems filter retrieved content and check answers against evidence.

You use the NeMo Guardrails library to declare what each agent may do in a policy, combining low-latency local rules with model-backed checks for jailbreaks, injected instructions, and unsafe tool calls. Your application or agent harness runs these checks and uses their results to decide whether to continue.

```bash
pip install nemoguardrails
```

Requires Python 3.11–3.13. Refer to the [installation guide](https://docs.nvidia.com/nemo/guardrails/latest/get-started/installation-guide) for optional packages and setup.

> [!NOTE]
> Version 0.25.0 deprecates `LLMRails`, with removal planned no earlier than 0.27.0. Use `Guardrails` for new integrations and follow the [migration guide](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/migration/0.25.mdx).

## What You Can Build

- **AI agents and coding assistants:** Check proposed tool calls and returned results with [tool rails](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/tool-calling.mdx), or connect an agent through the [hooks server](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-hooks-server/index.mdx).
- **Conversational applications:** Apply [input and output checks](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-python-apis/check-messages.mdx).
- **Retrieval-augmented generation (RAG):** [Detect or mask sensitive data in retrieved content](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/pii-detection.mdx) and [check whether answers are grounded in evidence](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/fact-checking.mdx).

## How It Works

- **Define your policy.** Configure rails, models, and prompts in YAML. Use Python actions for custom logic.
- **Run the checks.** Invoke rails at the points where your application needs a policy decision.
- **Read the result.** Handle blocked or modified content before executing a tool or returning a response. You can also route generation through Guardrails.

![Agent runtime connected to NeMo Guardrails: configurable checks for prompts, tool calls, tool results, and answers, with policy rules, optional guard models, and integration options.](https://assets.kitploit.com/production/public/readmes/51007/217fd58628cfbab589c2dca874a467b70de0d11a6cecff340d3126cc11d8bd08/68c508b56041284c5795ed5d579e274d91ab8c952cd3f1ffaf6605a9dadb58b9-display-v1.webp)

Tool-call checks run before execution, while tool-result checks run after the tool has executed. Latency depends on the configured rules, models, and services.

Integrations support different checks. Rail support varies by engine; refer to [rail engine support](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/reference/rail-engine-support.mdx) and [configuration](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/configuration-reference.mdx).

## Why NeMo Guardrails

- **Govern what agents do.** Validate tool names and argument schemas before execution. Check tool results and apply per-tool policies before returning them to the model.
- **Keep your model and agent loop.** Use [checks without main-model generation](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-python-apis/check-messages.mdx) to add guardrails to an existing application. Model-backed checks still call their configured model or service.
- **Compose the policy you need.** Combine local [regex](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/community/regex.mdx) and [CEL](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/cel.mdx) rules with safety models and third-party checks.
- **Connect your runtime.** Choose an [integration](#choose-your-integration) for your application, shared service, or coding agent.
- **Open and yours to run.** The library is Apache 2.0 licensed. Choose [supported model providers](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/about/supported-llms.mdx) and run checks with local detectors or hosted inference endpoints.

## Quickstart

Check a support agent's proposed refund against a $500 limit, without a model or API key.
Install the optional CEL extra for this example:

```bash
pip install "nemoguardrails[cel]"
```

The example validates the tool's argument schema and blocks calls over the limit. Expand it and save it as `check_refund.py`:

<details>
<summary>Complete Python example</summary>

```python
import asyncio
import json

from nemoguardrails import Guardrails, RailsConfig
from nemoguardrails.rails.llm.options import RailStatus, RailType

config = RailsConfig.from_content(yaml_content="""
models: []
rails:
  tool_call:
    flows: [tool call validation]
    per_tool:
      issue_refund: [cel check tool call]
  config:
    cel:
      tool_call:
        issue_refund:
          expressions: ["args.amount > 500"]
""")

TOOLS = [{
    "type": "function",
    "function": {
        "name": "issue_refund",
        "parameters": {
            "type": "object",
            "properties": {"amount": {"type": "number", "minimum": 0}},
            "required": ["amount"],
            "additionalProperties": False,
        },
    },
}]


async def main():
    async with Guardrails(config, require_iorails=True) as rails:
        for amount in (50, 5000):
            call = {
                "role": "assistant",
                "tool_calls": [{
                    "id": "call_1",
                    "type": "function",
                    "function": {
                        "name": "issue_refund",
                        "arguments": json.dumps({"amount": amount}),
                    },
                }],
            }
            result = await rails.check_async(
                [call], rail_types=[RailType.TOOL_CALL], tools=TOOLS
            )
            print(f"${amount}: {result.status.value}")
            if result.status == RailStatus.PASSED:
                print("Ready for the application to execute")
            else:
                print(f"Rail: {result.rail}")
                print(f"Reason: {result.reason}")


asyncio.run(main())
```

</details>

Run it from the directory where you saved the file:

```bash
python check_refund.py
```

Expected output:

```text
$50: passed
Ready for the application to execute
$5000: blocked
Rail: cel check tool call
Reason: cel check tool call
```

The example does not issue refunds. Your application executes a tool only after its checks pass.
For more configuration and error-handling examples, refer to [tool calling](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/tool-calling.mdx) and [checking messages](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-python-apis/check-messages.mdx).

## Choose Your Integration

Connect NeMo Guardrails where your application or agent can enforce its checks.

| What are you building? | How to connect |
| --- | --- |
| **A shared guardrails service** for multiple applications or teams | Use the [Checks API](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-fastapi-server/overview.mdx) (`/v1/checks`) to request verdicts while each application manages its model and execution loop. |
| **A guardrails layer** for existing model APIs | Use the [gateway server](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-proxy/quickstart.mdx) to check supported requests and responses while preserving provider formats. |
| **A coding assistant or agent harness** | Use [native hooks](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-hooks-server/run-hooks-server.mdx) or [NeMo Relay](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-hooks-server/nemo-relay-plugin.mdx) to check tool calls before execution. |
| **An agent platform, framework integration, or custom loop** | Embed the [Python SDK](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-python-apis/check-messages.mdx), call the [Checks API](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/run-rails/using-fastapi-server/overview.mdx), or use a supported [framework integration](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/integration/langchain/langgraph-integration.mdx). |

## Guardrail Catalog

Choose checks for your policy and workflow:

| Check | Purpose |
| --- | --- |
| [Content safety](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/content-safety.mdx) | Check inputs and outputs against safety policies. |
| [Topic control](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/topic-control.mdx) | Check inputs against configured topical guidelines. |
| [Jailbreak detection](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/jailbreak-protection.mdx) | Detect jailbreak attempts with configured heuristics or classifiers. |
| [Injection detection](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/agentic-security.mdx) | Check model output for code, SQL, template, and cross-site scripting patterns. |
| [Sensitive data and PII](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/pii-detection.mdx) | Detect or mask sensitive data in inputs, outputs, and retrieved content. |
| [Fact-checking](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/fact-checking.mdx) and [hallucination checks](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/fact-checking.mdx#hallucination-detection) | Check answers against evidence or compare model responses for consistency. |
| [Tool-call and tool-result validation](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/tool-calling.mdx) | Validate declared tools, argument schemas, and tool-result linkage and structure. |
| [Tool safety checks](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/tool-safety-check.mdx) | Evaluate tool calls and results against per-tool safety instructions. |
| [Regex](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/community/regex.mdx) and [CEL](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/cel.mdx) | Apply deterministic pattern and expression rules. |
| [LLM self-checks](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/self-check.mdx) | Use configured LLM prompts for input moderation, output moderation, or fact-checking. |
| [Language detection](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/language-detector.mdx) | Restrict input to configured languages. |
| [Third-party integrations](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/configure-rails/guardrail-catalog/third-party.mdx) | Connect managed safety and moderation services. |

NVIDIA Nemotron Safety models include [Nemotron 3.5 Content Safety](https://github.com/nvidia-nemo/guardrails/blob/develop/examples/configs/nemotron-3.5-content-safety), [Nemotron Content Safety Reasoning 4B](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/getting-started/tutorials/nemotron-content-safety-reasoning-deployment.mdx), and [Llama 3.1 Nemotron Safety Guard 8B V3](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/getting-started/tutorials/nemotron-safety-guard-deployment.mdx). Follow the linked examples and guides for model-specific setup.

Use the [evaluation tools](https://docs.nvidia.com/nemo/guardrails/latest/evaluation/evaluate-guardrails) to assess your policies and [garak](https://github.com/NVIDIA/garak) to scan LLM applications for vulnerabilities. Refer to the [vulnerability-scanning guide](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/evaluation/llm-vulnerability-scanning.mdx) for an example.

## Community Usage

This anonymous usage snapshot covers `0.22.0` and `0.23.0` release builds from May 22 to August 18, 2026, with an estimated 665,798 distinct startup sessions.

<details>
<summary>View rail usage, feature usage, and configured rail counts</summary>

![Sessions by rail type](https://assets.kitploit.com/production/public/readmes/51007/5c817f183980e89808ce8be263ceebbfa7d9deed6b646fb16ce020f203e38923/493c6d2c9a0d81af5bbd7ebfaf0cdbb06d21c64d4786f8b7082150eb9e42fd40-display-v1.webp)

![Sessions by library feature](https://assets.kitploit.com/production/public/readmes/51007/89ba78eebea3784baeb13513865883714c3daf62a440742478efd4689a27698b/73327d185c0ca512c4a3b837e70dd54bc243ce873a6e4051aff3e0c9a314311e-display-v1.webp)

![Configured rails at startup](https://assets.kitploit.com/production/public/readmes/51007/94f316ceecd9de13b14b9b38766a36884f82175a9cf4b08dcdeeb9544ae1668c/29fd7090a76d6ee66edef8f64cfdc84ec7c5a446c4b89d65aaafdc2f1db3c74e-display-v1.webp)

Session counts are estimates, and a session can use multiple rail types or features. Refer to the [aggregate data](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/_static/images/community-telemetry/0.22.0-0.23.0.json) and [methodology](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/_static/images/community-telemetry/README.md) for definitions and counting limits.

</details>

## Telemetry and Privacy

The library sends anonymous usage telemetry that excludes prompts, completions, model names, credentials, and endpoints. Set `NEMO_GUARDRAILS_NO_USAGE_STATS=1` to opt out. This does not disable configured model or guardrail service calls, which can send content to those endpoints. Refer to [telemetry and privacy](https://github.com/nvidia-nemo/guardrails/blob/develop/docs/telemetry.mdx) for details and other opt-out options.

Third-party endpoints have separate terms and privacy practices. The NVIDIA NeMo Guardrails library can use inference endpoints such as NVIDIA Build (`build.nvidia.com`). If you use NVIDIA Build or another third-party endpoint, that endpoint's terms of service and privacy practices apply independently of the library. Any telemetry opt-out in the NVIDIA NeMo Guardrails library does not extend to the endpoint you choose. NVIDIA Build is intended for evaluation and testing only and must not be used in production environments. Do not submit confidential information or personal data when using NVIDIA Build.

## Contributing and Support

Refer to [CONTRIBUTING.md](https://github.com/nvidia-nemo/guardrails/blob/develop/CONTRIBUTING.md) and [AI_POLICY.md](https://github.com/nvidia-nemo/guardrails/blob/develop/AI_POLICY.md) for contribution requirements. Ask usage questions in [GitHub Discussions](https://github.com/NVIDIA-NeMo/Guardrails/discussions), and follow [SECURITY.md](https://github.com/nvidia-nemo/guardrails/blob/develop/SECURITY.md) to report vulnerabilities.

The library is licensed under the [Apache License, Version 2.0](https://github.com/nvidia-nemo/guardrails/blob/develop/LICENSE-Apache-2.0.txt). If you use it in research, cite the [EMNLP 2023 paper](https://aclanthology.org/2023.emnlp-demo.40).
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    654
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    490
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    395
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    336
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    258
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    252

探索所有工具

浏览我们的工具集合

查看所有工具 →