Skip to main content
Glama

Code Audit

code_audit
Read-only

Scan source code for vulnerabilities and secrets using Semgrep and gitleaks, then generate structured JSON and Markdown audit reports.

Instructions

Run the white-box code audit over source in the engagement workspace.

Scans path (relative to the workspace, default source — the directory source_fetch clones into) with Semgrep's parsing rules and gitleaks, then writes a merged deliverable:

  • code-audit.json — structured, redacted records from both tools.

  • code-audit.md — human-readable audit with attack-surface implications.

Semgrep hits are filed as CANDIDATE findings (reachability is a later question — static analysis finds sinks, not exploits). Gitleaks hits are redacted and kept in the deliverable only: unvalidated regex matches are not findings, and the secret-scanning phase owns that class.

With no source in the workspace the phase reports count: 0 — run source_fetch(repo_url=...) first and confirm the repository belongs to the program.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNosource
wait_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds valuable behavioral context beyond annotations: it explains that Semgrep hits are filed as CANDIDATE findings (not exploits) and that gitleaks hits are redacted and kept only in the deliverable, not as findings. It also details the output files. This enriches the agent's understanding without contradicting annotations.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core action, followed by concise bullets and clarifying notes. It avoids fluff—every sentence adds either behavioral detail, parameter context, or usage guidance. The formatting (code blocks, bullets) makes it scannable.

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?

Given the presence of an output schema (not shown but indicated), the description sufficiently covers what an agent needs: it explains the tool's inputs (path), outputs (two files with their formats), the distinction between findings and candidates, and the prerequisite for using it (source_fetch). It also addresses the no-source case. This is comprehensive for a read-only audit tool with clear annotations.

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 coverage is 0%, so the description carries the burden. It explains the 'path' parameter (relative to workspace, default 'source') and its relationship to source_fetch, but does not mention 'wait_seconds' at all. Since wait_seconds is a numeric parameter with a default, its purpose is inferable, but the description adds no explicit meaning. Partially compensates but leaves one parameter unexplained.

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 clearly states the tool's purpose: 'Run the white-box code audit over source in the engagement workspace.' It specifies the exact resource (source code) and the two scanning tools (Semgrep and gitleaks), and differentiates itself from siblings like semgrep_scan and secret_scan by describing a merged audit deliverable. The verb 'run' and resource 'white-box code audit' make it unambiguous.

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?

The description provides explicit usage guidance: it instructs the agent to run source_fetch first if no source exists, and to confirm repository ownership. It also clarifies what the tool does NOT do (unvalidated gitleaks regex matches are not findings), preventing misuse. This exceeds basic when-to-use guidance by naming a prerequisite and exclusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iamsecure1920/Cordon-AI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server