Skip to main content

NTI Verified

nti-scanner

Professional SAST engine for AI agent compliance and security. AST-based analysis, taint tracking, CWE mapping, and SARIF output for CI/CD pipelines.

License Python Version


Features

  • AST Analysis Engine: Analyzes Python codebases without executing untrusted code.
  • 19 Security & NTI-1 Compliance Rules: NTI-1 compliance pillars plus OWASP AI Agent Security risks.
  • CWE Mapping & SARIF 2.1.0: Generates GitHub Security tab compatible SARIF reports.
  • Framework Detection: Auto-detects LangChain, CrewAI, AutoGen, OpenAI, Anthropic frameworks.
  • MCP & A2A Security Rules: First SAST engine with dedicated MCP protocol and Agent-to-Agent security rules.
  • Post-Quantum Cryptography (PQC) Readiness: Scans for classical asymmetric crypto vulnerable to quantum attack.
  • Agent Behavior Graph: Builds and exports structural behavior graphs of agents and tool sinks.

Installation

pip install nti-scanner

The 1-Command Auto-Patcher

Secure your repository in one command. This will automatically generate the NTI workflow, inject the required dependencies, add the compliance badge, and insert the runtime guardrails.

pip install nti-scanner
nti-scanner --fix

Usage

1. Scan a Codebase

# Terminal output
nti-scanner scan ./my-agent-project

# SARIF output for GitHub Security tab
nti-scanner scan ./my-agent-project --format sarif --output report.sarif

# JSON report
nti-scanner scan ./my-agent-project --format json --output report.json

# HTML report
nti-scanner scan ./my-agent-project --format html --output report.html

# Enforce minimum compliance score in CI/CD
nti-scanner scan . --min-score 80

2. List All Rules

nti-scanner rules

3. Generate Behavior Graph

nti-scanner graph ./my-agent-project --output graph.json

Supported Rules (19 Rules)

Rule ID Category Severity CWE Description
NTI-IDENT-001 Identity High CWE-287 Cryptographic agent identity (PQC signatures)
NTI-GOV-001 Governance Critical CWE-862 Zero-trust capability bounds on tool functions
NTI-CONS-001 Consensus Medium CWE-703 Multi-agent Byzantine Fault Tolerant (BFT) consensus
NTI-AUDIT-001 Audit High CWE-778 Merkle-chained audit trail for agent actions
NTI-PERS-001 Persistence Low CWE-353 Cryptographic state persistence integrity
NTI-CAPDIFF-001 Governance Critical CWE-862 Unauthorized tool capability declarations
NTI-TRUST-001 Security High CWE-1426 Trust boundary crossing without NTI verification
SEC-PROMPT-001 Security High CWE-1336 Unsanitized user input in prompt f-strings
SEC-CMD-001 Security Critical CWE-78 Command injection via os.system / subprocess shell=True
SEC-PATH-001 Security High CWE-22 Path traversal in file operations
SEC-SSRF-001 Security High CWE-918 SSRF via dynamic URLs in HTTP requests
SEC-SQL-001 Security Critical CWE-89 SQL injection in agent tools
SEC-SECRET-001 Security Critical CWE-798 Hardcoded API keys or credentials
SEC-DESER-001 Security Critical CWE-502 Unsafe deserialization (pickle, yaml.load)
SEC-CAP-001 Security High CWE-269 Agent tool with destructive capability
SEC-LLM-001 Security High CWE-1426 LLM output passed to eval() or exec()
SEC-MCP-001 Security High CWE-287 MCP integration without authentication
SEC-A2A-001 Security High CWE-287 Agent-to-Agent protocol missing identity verification
SEC-PQC-001 Identity High CWE-327 Quantum-vulnerable classical cryptography (RSA/ECDSA)

Python API Usage

from pathlib import Path
from nti_scanner.scanner import scan_directory

result = scan_directory(Path("./my-agent-project"))
print(f"Compliance Score: {result.nti1_score}/100")
print(f"Frameworks: {result.frameworks}")
for finding in result.findings:
    print(f"[{finding.severity.upper()}] {finding.rule_id}: {finding.message} ({finding.file}:{finding.line})")

License

Apache License 2.0. See LICENSE.


Architecture

graph TD
    subgraph CLI_Input ["CLI & Input"]
        CLI["CLI Entrypoint<br/>(nti-scanner scan)"]
        TargetDir["Target Directory / File"]
        FileDiscovery["File Discovery & Filter<br/>(*.py Files)"]

        CLI --> TargetDir
        TargetDir --> FileDiscovery
    end

    subgraph Scanner_Core ["Scanner Core"]
        ASTParser["AST Parser<br/>(ast.parse)"]
        FrameworkDetector["Framework Detector<br/>(LangChain, CrewAI, AutoGen, etc.)"]
        TaintTracking["Taint Tracking & Call Graph"]
        RuleEngine["Rule Engine<br/>(19 Security & NTI Rules)"]
        CWEMapping["CWE Mapping"]

        FileDiscovery --> ASTParser
        ASTParser --> FrameworkDetector
        ASTParser --> TaintTracking
        ASTParser --> RuleEngine
        FrameworkDetector --> RuleEngine
        TaintTracking --> RuleEngine
        RuleEngine --> CWEMapping
    end

    subgraph Reporting_Engine ["Reporting Engine"]
        CWEMapping --> Findings["Findings Aggregator"]
        Findings --> ScoringLogic["Compliance Scoring Logic<br/>(NTI-1 Score & Pillar Scores)"]
        ScoringLogic --> SARIFGen["SARIF 2.1.0 Generator"]
        ScoringLogic --> OtherReports["JSON / HTML / Terminal Reporters"]
        SARIFGen --> Output["CI/CD & Report Output"]
        OtherReports --> Output
    end

Metadata

Release files for nti-scanner 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nti-scanner 0.1.1
File Size Uploaded Provenance Actions
nti_scanner-0.1.1.tar.gz 26.6 kB With provenance Details for nti_scanner-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nti-scanner 0.1.1
File Interpreter ABI Platform Actions
nti_scanner-0.1.1-py3-none-any.whl Python 3 none any Details for nti_scanner-0.1.1-py3-none-any.whl

Total release size: 66.7 kB

Release files / nti_scanner-0.1.1.tar.gz

Download URL nti_scanner-0.1.1.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8eafb44729936d0a06ecc71f8d6589131598fec4dce86bfb773d250f53333ebc
BLAKE2b-256 checksum
How to use checksums
a0ca611ddd12df0cc67c76ac11c2d6c5361263d63ed7c124b8a3ef46b75c7e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Release files / nti_scanner-0.1.1-py3-none-any.whl

Download URL nti_scanner-0.1.1-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4a3a1830b08ffe591ff62443fcb107aa80f9391848bcbeb09a37d89d58f4939
BLAKE2b-256 checksum
How to use checksums
38a61b2f27eaa1dda08246a9c60fe09414f2e7ac2be086f201f906c832ce4820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Security for nti-scanner 0.1.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nti_scanner-0.1.1.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 Oct 24, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page