Back to skill

Security audit

Aegis Quality Guardian

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent development guardrail tool, but it can persistently change repositories and generated CI while using unsafe dependency and code-generation patterns.

Review this before installing in important repositories. Use the advisory workflow freely, but avoid running setup-guardrails or generated CI on sensitive projects until dependency versions are pinned, Git hook and CI writes require explicit confirmation or dry-run review, and the code-generation injection issues are fixed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (4)

T08 · Insecure Dependencies

Error
Location
.
Finding

Unpinned third-party packages are downloaded and executed

Content
View full analysis
/dev/null; then echo "📦 Installing pyyaml..." python3 -m pip install --user pyyaml --quiet 2>/dev/null || { echo "❌ pyyaml is required but could not be installed. Install manually: pip install pyyaml" exit 1 } fi ``` `scripts/validate-contract.sh:59-65`: ```bash if command -v npx &>/dev/null && [[ -f "$CONTRACTS/api-spec.yaml" ]]; then echo "OpenAPI Validation:" if npx --yes @redocly/cli lint "$CONTRACTS/api-spec.yaml" --skip-rule no-unused-components 2>/dev/null; then echo " ✅ OpenAPI spec is valid" else echo " ⚠️ OpenAPI validation had warnings/errors (non-blocking)" fi ``` `scripts/setup-guardrails.sh:352-359`: ```yaml - uses: golangci/golangci-lint-action@v6 with: version: latest ``` `scripts/setup-guardrails.sh:369-377`: ```yaml - uses: actions/setup-python@v5 with: python-version: "3.12" - run: pip install ruff - run: ruff check . - run: ruff format --check . ``` `scripts/setup-guardrails.sh:463-470`: ```yaml aegis-go-lint: stage: aegis-lint image: golang:1.22 script: - go vet ./... - test -z "$(gofmt -l .)" - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - golangci-lint run ./... ``` `scripts/setup-guardrails.sh:511-516`: ```yaml aegis-python-lint: stage: aegis-lint image: python:3.12 script: - pip install ruff - ruff check . - ruff format --check ...[truncated 1773 chars]
Remediation
View remediation
... npx --yes @redocly/cli@ ... python3 -m pip install --require-hashes -r requirements-tools.txt go install github.com/golangci/golangci-lint/cmd/golangci-lint@ ``` 2. Declare Node.js tools in `devDependencies`, commit the lockfile, and execute them after `npm ci` or `pnpm install --frozen-lockfile`. 3. Declare Python tooling in a locked requirements file with package hashes rather than installing packages automatically from the generator. 4. Replace `version: latest` with a reviewed fixed version. 5. Pin GitHub Actions to immutable commit SHAs where feasible. 6. Separate dependency installation from validation so validation does not silently retrieve executable code. 7. Restrict CI token permissions and do not expose secrets to validation jobs that do not require them. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup-guardrails.sh:411
Finding

Contract filenames can inject JavaScript into generated CI workflows

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/validate-contract.sh:38
Finding

Caller-controlled project path is interpolated into Python source

Content
View full analysis
/dev/null; then if python3 -c "import yaml; yaml.safe_load(open('$file'))" 2>/dev/null; then echo " ✅ YAML valid: $file" else echo " ❌ YAML invalid: $file" ERRORS=$((ERRORS + 1)) fi fi fi } ``` ### Technical Analysis The file path is derived from the script's caller-supplied project path and is inserted into a Python string literal inside `python3 -c`. Shell quoting protects shell parsing but does not escape the value for the Python language. A path containing a single quote and valid Python syntax can terminate the argument to `open()` and inject additional Python statements or expressions. The issue is reachable when validating a project located in a maliciously crafted directory path. ### Attack Path 1. An attacker prepares or distributes a project under a directory name containing Python string-breaking syntax. 2. A victim invokes: ```bash bash scripts/validate-contract.sh "" ``` 3. The script constructs the contract filename from that project path. 4. The filename is interpolated into the Python program passed to `python3 -c`. 5. Python parses and executes the injected expression with the victim's local permissions. This attack requires control over or influence on the project path, making it less broadly exploitable than the CI filename injection. ### Impact Assessment Successful exploitation permits arbitrary Python execution under the user running contract validation. That process can access files and environment variables available to the user, modify the target project, and execute subprocesses. The vulnerability does not independently elevate operating-system ...[truncated 84 chars]
Remediation
View remediation
/dev/null; then echo " ✅ YAML valid: $file" else echo " ❌ YAML invalid: $file" ERRORS=$((ERRORS + 1)) fi ``` Additional hardening should include: 1. Resolve and validate the project path before use. 2. Avoid interpolating paths or file contents into `python -c`, `node -e`, or similar executable source strings. 3. Add regression tests using paths containing quotes, spaces, newlines, and Unicode characters. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate-types.sh:84
Finding

OpenAPI-controlled values are emitted into TypeScript without escaping or identifier validation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This variant of the mismatch finding includes undeclared file writes and possible package installation, which are materially different from the stated high-level guardrail purpose. When a skill presents itself as passive workflow guidance but can alter the environment or install dependencies, users and orchestration systems may grant trust they would not otherwise give, enabling risky side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This variant of the mismatch finding includes undeclared file writes and possible package installation, which are materially different from the stated high-level guardrail purpose. When a skill presents itself as passive workflow guidance but can alter the environment or install dependencies, users and orchestration systems may grant trust they would not otherwise give, enabling risky side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

This variant of the mismatch finding includes undeclared file writes and possible package installation, which are materially different from the stated high-level guardrail purpose. When a skill presents itself as passive workflow guidance but can alter the environment or install dependencies, users and orchestration systems may grant trust they would not otherwise give, enabling risky side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This variant of the mismatch finding includes undeclared file writes and possible package installation, which are materially different from the stated high-level guardrail purpose. When a skill presents itself as passive workflow guidance but can alter the environment or install dependencies, users and orchestration systems may grant trust they would not otherwise give, enabling risky side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This variant of the mismatch finding includes undeclared file writes and possible package installation, which are materially different from the stated high-level guardrail purpose. When a skill presents itself as passive workflow guidance but can alter the environment or install dependencies, users and orchestration systems may grant trust they would not otherwise give, enabling risky side effects.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup-guardrails.sh (reported line 56)May include surrounding context.

sh
HOOK_CONTENT="#!/usr/bin/env bash
# Aegis Pre-Commit Hook — auto-generated, language-adaptive
# Blocks commits that fail hard checks. Bypass with: git commit --no-verify
set -e

echo '🛡️  Aegis pre-commit checks...'

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup-guardrails.sh (reported line 258)May include surrounding context.

sh
HOOK_CONTENT="#!/usr/bin/env bash
# Aegis Pre-Commit Hook — auto-generated, language-adaptive
# Blocks commits that fail hard checks. Bypass with: git commit --no-verify
set -e

echo '🛡️  Aegis pre-commit checks...'

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup-guardrails.sh (reported line 558)May include surrounding context.

sh
HOOK_CONTENT="#!/usr/bin/env bash
# Aegis Pre-Commit Hook — auto-generated, language-adaptive
# Blocks commits that fail hard checks. Bypass with: git commit --no-verify
set -e

echo '🛡️  Aegis pre-commit checks...'

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/design-brief.md (reported line 5)May include surrounding context.

md
# Aegis ID: AEGIS-{project}-{seq}

## Problem Statement
<!-- What problem does this solve? Why now? (1-3 sentences) -->

## Architecture Overview
<!-- Mermaid or ASCII diagram. A newcomer should be able to sketch the system after reading this. -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/design-brief.md (reported line 37)May include surrounding context.

md
**Communication Rules:** Modules communicate only through defined interfaces.

## API Surface (Summary)
<!-- Key endpoints — detailed definitions go in contracts/ -->

- `POST /api/xxx` — Description, input/output summary
- `GET /api/yyy` — Description, input/output summary

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to run shell scripts and initialize or modify project files, but it does not declare any explicit tool scope such as allowed tools or permissions. That creates an authorization gap where a caller may activate a documentation-looking skill that can nonetheless execute shell commands and write into repositories, increasing the chance of unintended command execution or file modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation conditions are extremely broad, covering common development activities such as starting features, reviewing PRs, project setup, and any project containing a contracts/ directory. In a skill that can invoke shell scripts and write files, broad auto-activation increases the chance of the skill running in unrelated contexts and performing unnecessary scanning or modifications, expanding the attack surface and opportunity for misuse.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

This command invokes openapi-typescript through npx without pinning a specific version, which can fetch and execute the latest package version at runtime. That creates a supply-chain risk: a compromised upstream release, typo-squatted dependency path, or breaking version could lead to arbitrary code execution in the developer environment or CI pipeline.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The generated docker-compose file runs npx playwright test without pinning an exact Playwright package/version. npx may resolve and download packages at execution time, which creates a supply-chain risk: future package changes, typosquatting, or registry compromise could cause unreviewed code to execute in the test container. In this skill's context, the script is meant to scaffold development workflows across projects, so the unsafe pattern can propagate broadly and be executed automatically in CI or by developers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs broad, immediate writes into an arbitrary target project path, including hooks and CI files, without interactive confirmation or a dry-run safeguard. In an agent-driven workflow, this increases the chance of unintended repository modification, policy changes, or disruption to developer and CI behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatically copying a generated pre-commit hook into .git/hooks/pre-commit alters repository behavior and can block or influence future commits without a dedicated confirmation step. In the context of an agent skill that may be executed on behalf of a user, silently installing hooks is more sensitive than ordinary file generation because it changes local Git enforcement behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The script executes npx --yes @redocly/cli lint without pinning an exact package version. This can fetch whatever version is current at execution time, creating a supply-chain and reproducibility risk; if the upstream package or dependency chain is compromised, running validation could execute attacker-controlled code on the developer or CI host.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The e2e service runs npx playwright test without pinning the package/version being executed. In many environments, npx may resolve or fetch a package dynamically if it is not already present in the mounted test directory, which creates a supply-chain risk where an unexpected or malicious package version could be executed inside the container.

Content

No source excerpt is available for this finding.