# secrets

Secrets: filesystem scan, env variable audit, SSH key sprawl, git history leak detection

Agent View of the PolicyLayer registry record for `secrets`. HTML page: https://policylayer.com/tools/defense/secrets

## Facts

- Tool: `secrets`
- Server: Defense (`defense-mcp-server`) — https://policylayer.com/tools/defense.md
- Install: `npx -y defense-mcp-server`
- Homepage: git+https://github.com/bottobot/defense-mcp-server.git
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 10 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `path` | string | no | Root path to scan |
| `action` | string | yes | Secrets scanning action |
| `dryRun` | boolean | no | Preview only |
| `repoPath` | string | no | Path to git repository |
| `check_env` | boolean | no | Check environment variables for sensitive names |
| `max_depth` | number | no | Maximum directory depth to search |
| `scan_type` | string | no | Type of secrets to scan for |
| `check_files` | boolean | no | Check for exposed .env files on disk |
| `search_path` | string | no | Root path to search for SSH keys |
| `check_authorized_keys` | boolean | no | Also audit authorized_keys files |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "secrets",
    "arguments": {
      "action": "<action>"
    }
  }
}
```

## Why secrets is rated Low

The tool performs scanning and auditing operations — reading the filesystem, environment variables, SSH keys, and git history to detect leaks. These are read/query operations with no stated side effects. However, severity is medium because this tool accesses highly sensitive data (secrets, keys, credentials) and could expose critical information if misused or if results are logged/exfiltrated.

From the tool's own definition: "filesystem scan, env variable audit, SSH key sprawl, git history leak detection"

Risk signals: Accepts file system path (path) · High parameter count (10 properties)

## Use case

AI agents call secrets to retrieve information from Defense without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Defense:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "secrets": {}
  }
}
```

## Other tools on Defense (30)

- `app_harden` — Execute — https://policylayer.com/tools/defense/app-harden.md
- `container_isolation` — Execute — https://policylayer.com/tools/defense/container-isolation.md
- `crypto` — Execute — https://policylayer.com/tools/defense/crypto.md
- `ebpf` — Execute — https://policylayer.com/tools/defense/ebpf.md
- `firewall` — Execute — https://policylayer.com/tools/defense/firewall.md
- `harden_kernel` — Execute — https://policylayer.com/tools/defense/harden-kernel.md
- `honeypot_manage` — Execute — https://policylayer.com/tools/defense/honeypot-manage.md
- `incident_response` — Execute — https://policylayer.com/tools/defense/incident-response.md
- `malware` — Execute — https://policylayer.com/tools/defense/malware.md
- `sudo_session` — Execute — https://policylayer.com/tools/defense/sudo-session.md
- `vuln_manage` — Execute — https://policylayer.com/tools/defense/vuln-manage.md
- `waf_manage` — Execute — https://policylayer.com/tools/defense/waf-manage.md
- `wireless_security` — Execute — https://policylayer.com/tools/defense/wireless-security.md
- `zero_trust` — Execute — https://policylayer.com/tools/defense/zero-trust.md
- `api_security` — Read — https://policylayer.com/tools/defense/api-security.md
- `cloud_security` — Read — https://policylayer.com/tools/defense/cloud-security.md
- `dns_security` — Read — https://policylayer.com/tools/defense/dns-security.md
- `access_control` — Write — https://policylayer.com/tools/defense/access-control.md
- `backup` — Write — https://policylayer.com/tools/defense/backup.md
- `compliance` — Write — https://policylayer.com/tools/defense/compliance.md
- `container_docker` — Write — https://policylayer.com/tools/defense/container-docker.md
- `defense_mgmt` — Write — https://policylayer.com/tools/defense/defense-mgmt.md
- `harden_host` — Write — https://policylayer.com/tools/defense/harden-host.md
- `integrity` — Write — https://policylayer.com/tools/defense/integrity.md
- `log_management` — Write — https://policylayer.com/tools/defense/log-management.md
- `network_defense` — Write — https://policylayer.com/tools/defense/network-defense.md
- `patch` — Write — https://policylayer.com/tools/defense/patch.md
- `process_security` — Write — https://policylayer.com/tools/defense/process-security.md
- `supply_chain` — Write — https://policylayer.com/tools/defense/supply-chain.md
- `threat_intel` — Write — https://policylayer.com/tools/defense/threat-intel.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=defense · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/defense
