Skip to main content
Glama

Audit Network Message Security

audit_net_security
Read-onlyIdempotent

Audit Garry's Mod addon Lua code statically to detect unauthenticated net.Receive handlers, SQL injection risks, and missing net string registrations before deployment.

Instructions

Perform static AST security auditing across an addon's network messaging architecture (Garry's Mod net library) to identify exploitable receivers, SQL injection vectors, and missing network string registrations. Purely static AST analysis requiring no authentication, no network transmission, and zero file modifications. Scans code without executing it. Specify addon_dir (root directory of the addon; defaults to workspace root if omitted). Optionally provide file_paths array to restrict scanning to specific Lua files within that addon. Use this tool before releasing or deploying multiplayer Garry's Mod addons to detect unauthenticated net.Receive handlers (missing ply:IsAdmin or permission checks), client-authoritative SQL queries, and unregistered net strings that crash network channels. Do NOT use for general syntax validation (use lint_glua instead) or rendering performance profiling (use analyze_performance instead). Returns a GModToolResult envelope with status ('success' or 'failed'), summary, and data containing addon_dir, messages_found, registered_strings, network_graph (transmitters and receivers), and categorized vulnerabilities array (severity, type, message_name, file, line, description, recommended_fix, vulnerable_code).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addon_dirNoRoot directory of the Garry's Mod addon to audit. Defaults to current workspace root if omitted.
file_pathsNoOptional list of specific relative or absolute Lua file paths within addon_dir to audit. If omitted, recursively scans all Lua files in addon_dir.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDomain-specific typed payload returned by the tool.
statusYesExecution status of the tool call ('success', 'partial', 'blocked', or 'failed').
summaryYesConcise, human-readable summary of operational findings, diagnostics, or execution outcome.
evidenceYesTraceability evidence including cited documentation and generated artifacts.
warningsYesList of non-fatal warnings, lint advisories, engine caveats, or security notices.
nextActionsNoActionable, ordered recommendations for the agent's immediate next steps.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / addon_dir / description
      Previous value: -"Root directory of addon (defaults to workspace)"New value: +"Root directory of the Garry's Mod addon to audit. Defaults to current workspace root if omitted."
    • changedInput schema / properties / file_paths / description
      Previous value: -"Specific files to scan"New value: +"Optional list of specific relative or absolute Lua file paths within addon_dir to audit. If omitted, recursively scans all Lua files in addon_dir."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "description": "Domain-specific typed payload returned by the tool.",
      +      "properties": {
      +        "addon_dir": {
      +          "description": "Addon root directory audited.",
      +          "type": "string"
      +        },
      +        "messages_found": {
      +          "description": "Total distinct net messages discovered in the AST.",
      +          "type": "integer"
      +        },
      +        "network_graph": {
      +          "description": "Cross-realm messaging graph mapping transmitters to receivers.",
      +          "items": {
      +            "properties": {
      +              "data_types": {
      +                "description": "Inferred payload bitstream types (e.g. 'String', 'UInt').",
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "has_auth_check": {
      +                "description": "True if receiver validates caller permissions.",
      +                "type": "boolean"
      +              },
      +              "message": {
      +                "description": "Network message identifier.",
      +                "type": "string"
      +              },
      +              "received_in": {
      +                "description": "Receiving realm.",
      +                "enum": [
      +                  "client",
      +                  "server",
      +                  "unknown"
      +                ],
      +                "type": "string"
      +              },
      +              "registered_on_server": {
      +                "description": "True if registered via util.AddNetworkString on server.",
      +                "type": "boolean"
      +              },
      +              "sent_from": {
      +                "description": "Transmitting realm.",
      +                "enum": [
      +                  "client",
      +                  "server",
      +                  "unknown"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "message",
      +              "sent_from",
      +              "received_in",
      +              "has_auth_check",
      +              "registered_on_server",
      +              "data_types"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "registered_strings": {
      +          "description": "Network strings registered via util.AddNetworkString.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "vulnerabilities": {
      +          "description": "Identified networking security vulnerabilities and exploitable handlers.",
      +          "items": {
      +            "properties": {
      +              "description": {
      +                "description": "Analysis of the vulnerability and attack vector.",
      +                "type": "string"
      +              },
      +              "file": {
      +                "description": "Relative file path where the issue occurs.",
      +                "type": "string"
      +              },
      +              "line": {
      +                "description": "Line number of the vulnerable receiver.",
      +                "type": "integer"
      +              },
      +              "message_name": {
      +                "description": "Identifier of the net message (e.g. 'AdminNuke').",
      +                "type": "string"
      +              },
      +              "recommended_fix": {
      +                "description": "Code remediation instructions.",
      +                "type": "string"
      +              },
      +              "severity": {
      +                "description": "Exploitation severity rating.",
      +                "enum": [
      +                  "critical",
      +                  "high",
      +                  "medium",
      +                  "low"
      +                ],
      +                "type": "string"
      +              },
      +              "type": {
      +                "description": "Vulnerability classification.",
      +                "enum": [
      +                  "unauthenticated_net_receiver",
      +                  "missing_network_string",
      +                  "sql_injection",
      +                  "runstring_exposure",
      +                  "bitstream_mismatch",
      +                  "unbounded_payload"
      +                ],
      +                "type": "string"
      +              },
      +              "vulnerable_code": {
      +                "description": "Vulnerable code snippet.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "severity",
      +              "type",
      +              "message_name",
      +              "file",
      +              "line",
      +              "description",
      +              "recommended_fix"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "messages_found",
      +        "registered_strings",
      +        "vulnerabilities"
      +      ],
      +      "type": "object"
      +    },
      +    "evidence": {
      +      "description": "Traceability evidence including cited documentation and generated artifacts.",
      +      "properties": {
      +        "artifacts": {
      +          "description": "Files, packages, or manifests generated on disk or in memory.",
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "description": "Descriptive label of the generated artifact.",
      +                "type": "string"
      +              },
      +              "sha256": {
      +                "description": "SHA-256 hash of the generated file.",
      +                "type": "string"
      +              },
      +              "uri": {
      +                "description": "File path or URI of the generated artifact.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label",
      +              "uri"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputsDigest": {
      +          "description": "SHA-256 digest of normalized tool inputs for auditability.",
      +          "type": "string"
      +        },
      +        "sources": {
      +          "description": "Cited documentation, wiki pages, or external web sources supporting the result.",
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "description": "Display name or title of the cited resource.",
      +                "type": "string"
      +              },
      +              "retrievedAt": {
      +                "description": "ISO-8601 timestamp of source retrieval.",
      +                "type": "string"
      +              },
      +              "uri": {
      +                "description": "Canonical URI or URL of the documentation or source.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "sources",
      +        "artifacts"
      +      ],
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Actionable, ordered recommendations for the agent's immediate next steps.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Execution status of the tool call ('success', 'partial', 'blocked', or 'failed').",
      +      "enum": [
      +        "success",
      +        "partial",
      +        "blocked",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "description": "Concise, human-readable summary of operational findings, diagnostics, or execution outcome.",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "List of non-fatal warnings, lint advisories, engine caveats, or security notices.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "summary",
      +    "data",
      +    "warnings",
      +    "evidence"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly, idempotent, and non-destructive annotations, the description discloses that the tool requires no authentication, performs no network transmission, makes zero file modifications, and does not execute code. It also explains that scanning is purely static AST analysis, giving the agent an accurate safety and side-effect profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded with the core purpose and explicitly organized with usage guidance and exclusions. The return envelope detail is somewhat redundant given that an output schema exists, but the overall structure remains efficient and each major section earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, scope, parameters, safety profile, output envelope shape, and concrete detection categories. With rich annotations and an output schema present, nothing an agent needs to correctly select and invoke this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the structured schema already documents both parameters and their defaults. The description adds context about scoping file_paths to 'specific Lua files within that addon,' but it largely restates what the schema provides rather than introducing new semantic depth.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Perform static AST security auditing') and resource ('network messaging architecture'), and enumerates concrete outcomes: exploitable receivers, SQL injection vectors, and missing network string registrations. It clearly differentiates from sibling tools by naming what it is not for, such as syntax validation or performance profiling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells the agent when to use the tool: before releasing or deploying multiplayer Garry's Mod addons to detect unauthenticated net.Receive handlers, client-authoritative SQL, and unregistered net strings. It also names alternatives for related but distinct tasks: lint_glua for syntax validation and analyze_performance for rendering profiling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.