Back to skill

Security audit

Grade-A Pipeline

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed multi-agent code-building workflow, but it should be reviewed carefully because it delegates broad repository and shell authority and builds risky commands from user- or model-controlled text.

Run this only on a backed-up, reviewed repository path, preferably in a sandboxed host with minimal credentials and network access. Keep push options disabled unless you explicitly authorize the remote refs, inspect the workflow before use, and expect local branches, tags, commits, root `MAP.md`, and worktree cleanup changes. Avoid paths with shell metacharacters until command construction is hardened.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
examples/grade-a-pipeline.workflow.js:219
Finding

Repository content can hijack downstream agents through the authoritative codebase map

Content
View full analysis
'\n\n===== CODEBASE MAP (authoritative; do not re-derive) =====\n' + MAP + '\n===== END MAP =====\n'; ``` ```javascript const cartographerPrompt = (shard, idx) => 'You are CARTOGRAPHER ' + idx + '. Read ONLY these files inside ' + INTEGRATION_WT + ' (a clean checkout of the repo). Do NOT modify anything.\n' + 'Files (relative to that worktree):\n' + shard.map(f => ' - ' + f).join('\n') + '\n\n' + 'For each file return: path, language, one-line role, and its top-level SYMBOLS (functions, classes, methods, ' + 'exported constants, routes/endpoints, CLI commands) with kind+name+signature+line, plus the modules it depends on. ' + 'Be precise and complete; this map is injected into every downstream worker. Return SHARDMAP.'; ``` ```javascript const mapSynthPrompt = (fileMaps) => 'You are the CARTOGRAPHY SYNTHESIZER. Merge these per-file maps into one coherent MAP.md for the repo.\n' + 'Input file maps (JSON): ' + JSON.stringify(fileMaps).slice(0, 120000) + '\n\n' + // ... 'Produce map_markdown: a clean MAP.md with sections — Overview/architecture, Entry points, ' + 'a per-directory table of files with their key functions/classes/signatures, and a dependency sketch. '; ``` ```javascript const planPrompt = (MAP, variant) => 'You are PLANNER ' + variant + '. Decompose the requested work into an executable DEPENDENCY GRAPH of tasks.\n' + 'REQUEST:\n' + REQUEST + '\n' + modeBlock() + mapBlock(MAP) + '\n' + // ... 'Return PLAN with 3-20 tasks.'; ``` ### Technical Analysis Repository files are untrusted input, but cartographer agents read them and transform their contents into structured file maps. A synthesizer then converts those maps into `MAP`, ...[truncated 2903 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
examples/grade-a-pipeline.workflow.js:73
Finding

Unquoted repository path is interpolated into agent-executed shell commands

Content
View full analysis
'WORKTREE RULES (absolute): operate ONLY inside your own worktree. Create it now — a read-only checkout at the ' + 'current integration state, INSIDE the repo (never /tmp):\n' + ' git -C ' + REPO + ' worktree add -f --detach ' + wtPath(name) + ' ' + INTEGRATION_BRANCH + ' && cd ' + wtPath(name) + '\n' + ' (if "worktree add" fails on a lock, wait 2s and retry once.)\n' + 'You MUST NOT touch anything outside ' + wtPath(name) + ' — not the base branch, not other worktrees, not .git internals. ' + 'Set up a venv/deps as the project requires. When finished, REMOVE your worktree: ' + 'git -C ' + REPO + ' worktree remove --force ' + wtPath(name) + '.'; ``` ```javascript const bootstrapPrompt = () => 'You are the BOOTSTRAP scout for an SWE pipeline. The TARGET repo is at ' + REPO + '. We work INSIDE this repo using ' + 'git WORKTREES — never /tmp, never a separate clone. Make NO commits to the base branch and do not push.\n' + '1) RUN_ID = output of: date +%Y%m%d-%H%M%S (a sortable timestamp). Return it as run_id.\n' + '2) If ' + REPO + ' is NOT a git repo (git -C ' + REPO + ' rev-parse --is-inside-work-tree fails): ' + ' git -C ' + REPO + ' init && git -C ' + REPO + ' add -A && git -C ' + REPO + ' commit -m "gap: initial commit" — note this loudly in notes. Set repo_is_git true after.\n' + '3) base_branch = git -C ' + REPO + ' branch --show-current (fall back to main). ' + ' origin_url = git -C ' + REPO + ' remote get-url origin 2>/dev/null (empty string if there is no origin).\n' + '4) Keep the pipeline out of the user status: ...[truncated 2882 chars]
Remediation
View remediation
`. - Prefer filesystem APIs over `rm -rf`. 5. Use capability-based tools that constrain Git operations to a pre-opened repository handle rather than accepting arbitrary path strings. 6. Add tests covering spaces, quotes, semicolons, command substitution, newlines, leading dashes, Unicode separators, and symlinked repository paths. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
examples/grade-a-pipeline.workflow.js:328
Finding

Planner-controlled task metadata is inserted into shell commands without escaping

Content
View full analysis
{ const br = agentBranch(task.id, variant); const wt = wtPath(agentWtName(task.id, variant)); return 'You are IMPLEMENTER ' + variant + ' for task ' + task.id + ': ' + task.title + '.\n' + 'WORKTREE RULES (absolute): operate ONLY inside ' + wt + '. Create YOUR OWN branch + worktree off the integration branch, ' + 'INSIDE the repo (never /tmp):\n' + ' git -C ' + REPO + ' worktree add -b ' + br + ' ' + wt + ' ' + INTEGRATION_BRANCH + ' && cd ' + wt + '\n' + ' (if "worktree add" fails on a lock, wait 2s and retry once.)\n' + 'You MUST NOT touch anything outside ' + wt + ' — not the base branch, not other worktrees, not .git internals.' + mapBlock(MAP) + '\n' + 'TASK BRIEF:\n' + task.brief + '\n' + 'You may ONLY touch these files (create them if missing): ' + task.files.join(', ') + '\n' + 'WORK TEST-FIRST (TDD): (1) write failing tests of the required types [' + (task.test_types || ['unit']).join(', ') + '] ' + 'that pin the acceptance criteria; (2) implement until they pass; (3) run the FULL suite (' + testCmd + ') to confirm no regression. ' + 'Keep the diff minimal and in the surrounding style. No TODO/FIXME, no debug prints, no skipped tests.\n' + 'CHECKPOINT: git add -A && git commit -m "gap ' + task.id + ' (' + variant + '): ' + task.title + '". ' + 'Capture the diff: git -C ' + REPO + ' diff ' + INTEGRATION_BRANCH + '...' + br + '. Record the short commit hash.' + agentPushClause(br) + '\n' + 'FINALLY remove your worktree (the branch ' + br + ' STAYS in the repo): git -C ' + REPO + ' worktree remove --force ' + wt + '.\n' + 'Return IMPL with: branch=' + br + ', pushed, commit, the unified diff, t ...[truncated 2336 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SECURITY.md (reported line 3)May include surrounding context.

md
# Security

Please report vulnerabilities privately through GitHub's security advisory interface. Do not include credentials, private documents, access tokens, internal hostnames, or personal paths in a public issue.

This project provides agent instructions and local helpers. It is not a sandbox, an authorization system, or a guarantee that an external service is secure.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared description presents a complex orchestration skill for planning and executing substantial software changes. In contrast, the provided code does not implement any of that functionality. It is a small test module whose primary behavior is static validation of text in specific files: checking that push-related flags are opt-in and that private paths/names are absent. That is a materially different primary purpose from the declared one, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

The README instructs users to run npx skills add AntreasAntoniou/grade-a-pipeline without pinning a specific version or immutable source. That can cause users to fetch and execute whatever package version is current at install time, which creates a supply-chain risk if the package is later compromised, replaced, or unexpectedly changed.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The bootstrap prompt explicitly instructs the agent to run git init, git add -A, and git commit when the target path is not already a Git repository. That expands the skill from analysis/orchestration into destructive state mutation of arbitrary user-supplied directories, potentially sweeping unrelated files into source control and creating irreversible history without a separate consent gate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill metadata describes a conservative software pipeline, but it does not prominently warn that bootstrap may initialize a non-git directory, add all files, create commits, exclude paths, create branches/worktrees, and possibly push refs. This missing disclosure undermines informed consent and increases the chance a user runs repository-mutating actions they did not expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The cleanup routine force-removes worktrees and then recursively deletes a repository subdirectory, yet the skill’s user-facing metadata does not clearly disclose that filesystem deletion will occur. In a tool that operates on a user-provided repo path, undisclosed forced cleanup is dangerous because users may assume the workflow is limited to Git-managed reversible actions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Line L55 states the live tree is 'read-only to agents; they clone it', which directly conflicts with the surrounding documentation that repeatedly emphasizes the opposite design: agents work inside the target repo using git worktrees, with no disposable clone. This is an active documentation contradiction about where code execution and modification occur.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The cleanup prompt ends with rm -rf WT_ROOT after force-removing worktrees. Because WT_ROOT is derived from repoPath and run state, a bad path value, path confusion, or unexpected variable expansion could recursively delete repository contents or adjacent files inside the user workspace, making this more severe than the 'cleanup' framing suggests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.