AB
AiBoss
project

AI-Infra-Guard - Tencent's open-source AI infrastructure security assessment tool

AI-Infra-Guard is an open-source, efficient, lightweight, and easy-to-use security assessment tool for AI infrastructure developed by Tencent. It can discover and detect potential security risks in AI systems. AI-Infra-Guard supports 28 AI frameworks...

What is AI-Infra-Guard?

AI-Infra-Guard is an open-source, efficient, lightweight, and easy-to-use security assessment tool for AI infrastructure developed by Tencent. It can discover and detect potential security risks in AI systems. AI-Infra-Guard supports fingerprint recognition for 28 AI frameworks, covers a database of over 200 security vulnerabilities, and enables rapid scanning and vulnerability identification. The tool is ready to use out of the box, requiring no complex configuration, and provides flexible YAML rule definitions and matching syntax. AI-Infra-Guard's core components are simple, efficient, and resource-efficient, supporting cross-platform use. Users can perform security assessments using various methods, including local scanning, specifying targets, or reading targets from files, and can further enhance detection capabilities by combining AI analysis functions.

The main functions of AI-Infra-Guard

  • High-efficiency scanningSupports fingerprint recognition for 28 mainstream AI frameworks, quickly locating AI components used in the system. Covers a database of over 200 security vulnerabilities, comprehensively detecting known security risks.
  • Indirect suggestion injection detection: Identify attack methods that indirectly inject malicious commands from external data.
  • Multilingual code analysisIt supports multiple languages such as Python, TypeScript, and Java, eliminating the need for developing separate detection rules.
  • Vulnerability DetectionProvides detailed vulnerability information, including vulnerability descriptions, severity ratings, and remediation recommendations. Supports security assessments for various AI components, such as Gradio, JupyterLab, and Triton.
  • Detailed security reportGenerates a report that includes a risk description, technical details, and remediation recommendations.
  • Flexible usageSupports WEBUI and command-line operations, local scanning, multi-target scanning, and file reading.
  • Lightweight designThe core components are simple and efficient, with small binary file size and low resource consumption. It supports cross-platform use, including Windows, Linux, and macOS.
  • Easy to expandUsers can customize rules as needed. It provides flexible matching syntax, supporting various methods such as fuzzy matching and regular expression matching.

The technical principle of AI-Infra-Guard

  • AI-driven dynamic detectionBased on the ReAct (Reasoning + Acting) framework, it combines AI's reasoning and action capabilities to support AI's interaction with external tools, obtain additional information, and provide more reliable detection results.
  • Dynamic execution and simulated attacksAI-powered intelligent systems can autonomously execute system commands (such as reading files, starting services, and accessing networks), simulating an attacker's perspective to analyze potential attack chains and exploitability.
  • Multilingual code analysisLeveraging AI-powered natural language processing and code understanding capabilities, it supports multiple programming languages (such as Python, TypeScript, and Java) without requiring the development of separate static code analysis (SAST) rules for each language. It analyzes code logic based on semantic understanding to identify potential security vulnerabilities (such as command injection and arbitrary file read/write), avoiding false positives associated with traditional keyword-based matching methods.
  • Indirect suggestion injection detectionTo address indirect suggestion injection attacks commonly found in MCP services, the AI agent analyzes the data flow within the code to examine how external data is introduced into the AI dialogue context. Through a comprehensive evaluation of documents, code, and output data, it identifies malicious instructions hidden within external data (such as web page content, files, etc.).
  • Risk model mappingBased on nine predefined categories of MCP security risk models, the AI agent autonomously understands these risk patterns and plans detailed detection strategies. It dynamically adjusts these strategies according to the characteristics of different MCP services to ensure comprehensive and accurate detection.
  • Fingerprint matching and vulnerability databaseBased on web fingerprinting technology, it quickly identifies AI components and frameworks used in target systems. Combined with a predefined vulnerability database (over 200 vulnerability fingerprints), it rapidly matches known vulnerabilities and provides detailed vulnerability information and remediation suggestions.

AI-Infra-Guard project address

Application scenarios of AI-Infra-Guard

  • AI Development and DeploymentIt helps development teams quickly detect security vulnerabilities in frameworks and components when developing and deploying AI models, and to fix risks in advance to ensure system security.
  • Cloud service securityThe cloud platform scans AI services to promptly identify and fix vulnerabilities, ensuring the security of user data and the platform.
  • Security Audit and ComplianceIt supports enterprises in conducting security audits, generating vulnerability reports, and meeting industry compliance requirements.
  • IT Operations and Maintenance ManagementThe enterprise operations and maintenance team regularly scans the AI system to monitor its security status and respond to and fix problems quickly.
  • Security research and community contributionResearchers and the community explore new vulnerability detection methods and contribute new fingerprints and vulnerability rules.