Security scan

From Fmarzochi/EGC · View interactive version

Security scan is an AI agent skill from the GitHub repository Fmarzochi/EGC. Scan the configuration of an AI coding tool (Claude Code, Gemini, Codex, OpenCode) for security vulnerabilities and misconfigurations with the built-in egc harness-audit and the Guardian, plus a review checklist for permissions, hooks, MCP registrations, instructions and agents. Installs nothing bey

How to use this skill

Skill file

Security Scan Skill

Audit the configuration of an AI coding tool for security issues with what EGC already ships: the deterministic harness audit (egc harness-audit) for the scorecard, the Guardian MCP server for every file you then write, and a review checklist for the surfaces no scanner reads for you. Nothing else is installed: a scan that begins with npx of a package nobody vetted is itself a supply-chain risk.

When to Activate

Prerequisites

EGC installed (npm install -g @egchq/egc): the harness audit and the Guardian come with it. Nothing else.

Usage

Deterministic scorecard

# The current project; EGC repository mode or consumer-project mode is detected
egc harness-audit

# One scope, machine-readable
egc harness-audit hooks --format json

# Another checkout
egc harness-audit repo --root /path/to/project

The audit scores tool coverage, context strategy, quality gates, memory, evaluation, security guardrails and cost, and in a consumer project also the security policy, the secret hygiene of the config and the guardrails of the hooks. Read the security lines first: checks[] names each check with its file and whether it passed, and top_actions carries the fix for the three biggest gaps.

Review by hand

The audit says what is missing, not what a file says. Open each surface and apply its check:

| Surface | Check |

|---|---|

| CLAUDE.md, GEMINI.md, AGENTS.md | hardcoded secrets, instructions that run commands without asking, prompt injection patterns |

| settings.json | allow lists broader than the work needs, no deny list, bypass flags |

| .mcp.json, opencode.json, other MCP configs | servers with shell or filesystem reach, remote transports, unpinned npx, secrets in env |

| hooks/ and the hook entries of the settings | command injection through interpolation, data leaving the machine, errors silenced |

| agents/*.md | unrestricted tool access, prompts that handle untrusted content without defenses, no model named |

Fixing what you find

Fix by hand, one surface at a time. With the Guardian registered in your tool (egc init or egc install does that; a global npm install alone does not), it judges every Write and Edit and refuses the protected paths (keys, credentials, the settings of the tool itself). Re-run egc harness-audit afterwards and compare the score.

CI

egc harness-audit repo --format json > harness-audit.json
node -e "const r = require('./harness-audit.json'); if (!(r.overall_score / r.max_score >= 0.75)) process.exit(1)"

The audit exits 0 even when checks fail, so the second line is what fails the job: here under 75 percent of the points, with the Node every runner already has. checks[] names each check with its file and whether it passed; top_actions carries the fix for up to three failed checks.

Severity Levels

The score below is overall_score as a percentage of max_score; the raw points depend on the scope (the repo scope has 70, so 63 of 70 is 90).

| Grade | Score | Meaning |

|-------|-------|---------|

| A | 90-100 | Secure configuration |

| B | 75-89 | Minor issues |

| C | 60-74 | Needs attention |

| D | 40-59 | Significant risks |

| F | 0-39 | Critical vulnerabilities |

Interpreting Results

Critical Findings (fix immediately)

High Findings (fix before production)

Medium Findings (recommended)

Info Findings (awareness)

Links

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.