scan_repository
Trigger a Level 1 + Level 2 security scan on a GitHub pull request. Returns SAST findings, taint flows, entropy-detected secrets, and (for PRO users) LLM-triaged results. Requires Graneth authentication.
This record as markdown: /tools/com-graneth-mcp-server/scan-repository.md
What scan_repository does on Mcp Server
AI agents invoke scan_repository to trigger actions in Mcp Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
repo | string | Yes | GitHub repository name |
owner | string | Yes | GitHub repository owner |
token | string | Yes | GitHub access token with repo read permissions |
pull_number | integer | Yes | Pull request number to scan |
Parameters from the server's own tool schema.
Why scan_repository is rated High
Triggers external security scan operations on a repository, executing analysis workflows with side effects.
From the tool's definition Trigger a Level 1 + Level 2 security scan on a GitHub pull request
Risk signalsHandles credentials or secrets (token)
Attacks that exploit this kind of access
The rule that runs scan_repository safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For scan_repository, this is the rule to start with:
scan_repository stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Server, apply this rule, and every scan_repository call is checked against it from then on.
Questions about scan_repository
Trigger a Level 1 + Level 2 security scan on a GitHub pull request. Returns SAST findings, taint flows, entropy-detected secrets, and (for PRO users) LLM-triaged results. Requires Graneth authentication. It is categorised as a Execute tool in the Mcp Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
scan_repository accepts 4 parameters: repo, owner, token, pull_number. Required: repo, owner, token, pull_number. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Server MCP server in PolicyLayer and add a rule for scan_repository: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Server. Nothing to install.
scan_repository is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the scan_repository rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for scan_repository. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
scan_repository is provided by the Mcp Server MCP server (@graneth/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Server, and thousands of servers like it.
Across the catalogue