Skip to main content
Glama

scan_github

Scan GitHub repositories for leaked secrets in code, issues, and pull requests. Detects credentials and API keys without modifying any GitHub resources.

Instructions

Read GitHub repository code, issues, and pull requests to detect leaked secrets. Never modifies GitHub — no commits, comments, or PRs are created. Auth: requires a personal access token with repo (or public_repo) scope; set GITHUB_TOKEN env var or pass api_key directly. Side effects: a redacted scan report is uploaded to the n0s1 backend; set allow_secret_upload=True to also upload AES-encrypted secret values for AI validation. Returns redacted findings — raw secret values are never included in the output. Subject to GitHub API rate limits (5,000 req/hr authenticated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesGitHub personal access token with repo scope (or set GITHUB_TOKEN env var)
ownerYesGitHub org or user name
repoNoRepository name (optional — omit to scan all repos for owner)
branchNoBranch to scan (optional — defaults to default branch)
scopeNoSearch query e.g. search:org:myorg
report_formatNoOutput report formatn0s1
show_matched_secret_on_logsNoInclude redacted secret snippets in logs (default: false)
ai_analysisNoQueue async AI credential validation after the scan (requires n0s1 Pro)
n0s1_api_keyNon0s1 API key; overrides the N0S1_TOKEN env var
allow_secret_uploadNoUpload AES-encrypted secret values to the n0s1 backend for AI validation (default: false)
report_uuidNoUUID to assign to the scan report; overrides the auto-generated one

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_uuidYes
statusYes
summaryYes
findingsNo
next_cursorNo
usageYes
ai_analysis_statusNo
Behavior5/5

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

The description discloses side effects beyond annotations: uploading a redacted report to n0s1 backend, optional AES-encrypted upload, and rate limits. It also confirms no modifications to GitHub. There is no contradiction with 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 a concise single paragraph that front-loads the purpose. Every sentence adds value, covering what the tool does, what it doesn't do, authentication, side effects, and limitations. No unnecessary repetition or fluff.

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, the description does not need to explain return values. It covers input, authentication, side effects, rate limits, and the tool's role among siblings. It is sufficient for an agent to understand the tool's behavior and constraints.

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

Parameters4/5

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

Since schema description coverage is 100%, the baseline is 3. The description adds value by clarifying authentication (api_key or env var), explaining the side effect of allow_secret_upload, and providing context for the report_format. However, it does not significantly elaborate on individual parameters beyond what the schema already describes.

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 reads GitHub code, issues, and PRs to detect secrets. It explicitly says it never modifies GitHub, distinguishing it from write tools. Among sibling scan tools for different platforms, it uniquely identifies GitHub as the target.

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

Usage Guidelines4/5

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

The description explains when to use (detect secrets in GitHub) and specifies authentication requirements. While it doesn't provide explicit 'when not to use' or alternatives, the sibling tool names imply the context (other platforms), and the description is clear enough for an agent to select appropriately.

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/spark1security/n0s1-mcp'

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