Scan Models
Data models for the MCP security scanner.
Module: munio.scan.models
Finding
Section titled “Finding”Single security finding from a scan layer.
Fields:
| Name | Type | Description |
|---|---|---|
id | str | |
layer | Layer | |
severity | FindingSeverity | |
tool_name | str | |
message | str | |
description | str | |
attack_type | `AttackType | None` |
cwe | `str | None` |
location | str | |
counterexample | `str | None` |
confidence | float |
ScanResult
Section titled “ScanResult”Aggregate scan result across all servers/files.
Fields:
| Name | Type | Description |
|---|---|---|
scan_id | str | |
timestamp | datetime | |
servers | list[ServerScanResult] | |
findings | list[Finding] | |
elapsed_ms | float | |
enabled_layers | frozenset[Layer] | |
skipped_layers | tuple[SkippedLayer, ...] | |
total_findings | int | Total number of findings. |
by_severity | dict[str, int] | Findings count grouped by severity name. |
by_layer | dict[str, int] | Findings count grouped by layer name. |
Methods:
to_json_dict() -> dict[str, object]Serialize to dict including computed properties (safe for JSON output).
ToolDefinition
Section titled “ToolDefinition”MCP tool definition with its JSON Schema.
Fields:
| Name | Type | Description |
|---|---|---|
name | str | |
title | str | |
description | str | |
input_schema | dict[str, Any] | |
output_schema | `dict[str, Any] | None` |
annotations | `dict[str, Any] | None` |
server_name | str |
ServerConfig
Section titled “ServerConfig”Discovered MCP server configuration.
Fields:
| Name | Type | Description |
|---|---|---|
name | str | |
source | str | |
command | str | |
args | list[str] | |
env | `dict[str, str] | None` |
url | `str | None` |
enabled | bool |
Analysis layer identifier (decade-spaced for future insertions).
Fields:
| Name | Type | Description |
|---|---|---|
L0_CONFIG | “ | |
L1_SCHEMA | “ | |
L2_HEURISTIC | “ | |
L2_CLASSIFIER | “ | |
L2_MULTILINGUAL | “ | |
L3_STATIC | “ | |
L4_Z3 | “ | |
L5_COMPOSITIONAL | “ | |
L6_FUZZING | “ | |
L7_SOURCE | “ |
Values:
L0_CONFIG=5L1_SCHEMA=10L2_HEURISTIC=20L2_CLASSIFIER=25L2_MULTILINGUAL=26L3_STATIC=30L4_Z3=40L5_COMPOSITIONAL=50L6_FUZZING=60L7_SOURCE=70
FindingSeverity
Section titled “FindingSeverity”Finding severity level (ordered: CRITICAL=0 highest).
Fields:
| Name | Type | Description |
|---|---|---|
CRITICAL | “ | |
HIGH | “ | |
MEDIUM | “ | |
LOW | “ | |
INFO | “ |
Values:
CRITICAL=0HIGH=1MEDIUM=2LOW=3INFO=4
AttackType
Section titled “AttackType”MCP attack type category.
Fields:
| Name | Type | Description |
|---|---|---|
PROMPT_INJECTION | “ | |
DATA_EXFILTRATION | “ | |
COMMAND_INJECTION | “ | |
PATH_TRAVERSAL | “ | |
SSRF | “ | |
CREDENTIAL_EXPOSURE | “ | |
SYSTEM_PROMPT_EXTRACTION | “ | |
CROSS_SERVER_SHADOWING | “ | |
TOKEN_STUFFING | “ | |
SCHEMA_PERMISSIVENESS | “ | |
RUG_PULL | “ | |
AUTHORIZATION_BYPASS | “ | |
SUPPLY_CHAIN | “ | |
CONFIG_INJECTION | “ |
Values:
PROMPT_INJECTION=1DATA_EXFILTRATION=2COMMAND_INJECTION=3PATH_TRAVERSAL=4SSRF=5CREDENTIAL_EXPOSURE=6SYSTEM_PROMPT_EXTRACTION=7CROSS_SERVER_SHADOWING=8TOKEN_STUFFING=9SCHEMA_PERMISSIVENESS=10RUG_PULL=11AUTHORIZATION_BYPASS=12SUPPLY_CHAIN=13CONFIG_INJECTION=14
OutputFormat
Section titled “OutputFormat”CLI output format.
Fields:
| Name | Type | Description |
|---|---|---|
TEXT | “ | |
JSON | “ | |
SARIF | “ | |
MARKDOWN | “ |
Values:
TEXT='text'JSON='json'SARIF='sarif'MARKDOWN='markdown'
ConfigScanResult
Section titled “ConfigScanResult”Aggregate config scan result across all discovered config files.
Fields:
| Name | Type | Description |
|---|---|---|
scan_id | str | |
timestamp | datetime | |
files | list[ConfigFileResult] | |
elapsed_ms | float | |
total_findings | int | |
all_findings | list[Finding] | |
by_severity | dict[str, int] |
ConfigFileResult
Section titled “ConfigFileResult”Scan result for a single config file.
Fields:
| Name | Type | Description |
|---|---|---|
path | str | |
ide | str | |
servers_count | int | |
findings | list[Finding] | |
permissions | `ConfigPermissions | None` |
ConfigPermissions
Section titled “ConfigPermissions”Unix file permission check result.
Fields:
| Name | Type | Description |
|---|---|---|
mode | int | |
world_readable | bool | |
world_writable | bool |
Auto-generated from source code. Do not edit manually.