Skip to main content
Glama
sec-audit-swarm
by mesutgungor

sec_audit_scan

Run an offline static security preflight scan on a local repository, covering SAST, IaC, SCA, AI/MCP, CI/CD, and OpenAPI checks, then store results in a SQLite blackboard for audit tracking.

Instructions

Run an offline defensive static preflight security scan (SAST, IaC, SCA, AI/MCP, CI/CD, OpenAPI, custom repo rules) on a local repository and populate the SQLite blackboard.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target_dir": "<target_dir>"
    },
    "name": "sec_audit_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
dbNoBlackboard SQLite path (default: audit_state/blackboard.db)
sinceNoOptional git ref (e.g. main, HEAD~1) for diff-scoped scanning
target_dirYesPath to the local repository to scan
resume_fromNoOptional prior run_id to carry forward unchanged coverage units and finalized verdicts
enable_iac_scannersNoRun Trivy/Checkov IaC scans (default: true)
enable_sca_scannersNoRun Trivy/OSV SCA scans with reachability (default: true)
enable_external_scannersNoRun local external binaries like semgrep/bandit/trivy (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it does disclose that the scan is offline/static/defensive and that it has a side effect ('populate the SQLite blackboard'). It does not state whether the target repository is modified, whether external binaries must be installed, expected runtime, or what a run produces, which matters for a 7-parameter execution tool.

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?

A single front-loaded sentence with the action first and the parenthetical taxonomy second; dense but no redundant filler. The long enumeration is informative rather than wasteful, though it could be trimmed slightly.

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

Completeness3/5

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

There is no output schema, yet the description never says what a call returns (e.g. a run_id referenced by 'resume_from') or that findings are then consumed via sec_audit_list_findings/gate. For a multi-mode scanning tool with seven parameters and no annotations, that leaves an agent guessing about the follow-up workflow.

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 every parameter is already documented. The description adds only light mapping context (the scanner-family list corresponds to enable_iac_scanners / enable_sca_scanners / enable_external_scanners) and says nothing extra about 'since', 'resume_from', or 'db' semantics beyond the schema.

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

Purpose4/5

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

The description states a concrete verb and resource ('Run ... static preflight security scan ... on a local repository') and enumerates the scanner families covered (SAST, IaC, SCA, AI/MCP, CI/CD, OpenAPI, custom rules). It is clearly distinguishable from siblings like sec_audit_list_findings or sec_audit_gate, though it never names an alternative to sharpen the distinction.

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

Usage Guidelines3/5

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

The word 'preflight' and 'offline defensive' imply this is the entry point of an audit workflow run before other steps, but there is no explicit when-to-use, when-not-to-use, or pointer to siblings such as sec_audit_gate or sec_audit_validate_run. Usage must be inferred.

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