docker
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/docker/skills with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/docker/skills'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/docker--skills)HTML
<a href="/listings/docker--skills"><img src="/api/listings/docker--skills/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Quick start: the `skills` CLI
The [`skills` CLI](https://skills.sh) installs into every major coding agent (Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf, Cline, Kiro, and more). It reads the [`skills.sh.json`](skills.sh.json) index in this repo, so skills are listed grouped by product:
npx skills add docker/skills
The command prompts for which skills and which agents to install to. Non-interactive variants:
# Browse the catalog without installing anything npx skills add docker/skills --list # Install one skill, no prompts (project scope; add -g for user scope) npx skills add docker/skills --skill docker-compose-patterns --yes # Install every skill into one agent npx skills add docker/skills --skill '*' --agent codex --yes # Install every skill into every detected agent npx skills add docker/skills --all # Keep installed skills current npx skills update # Pin a skill to a reviewed release (replace vX.Y.Z with a release tag) npx skills add https://github.com/docker/skills/tree/vX.Y.Z \ --skill docker-compose-patterns --yes
Install as a plugin
Plugin installs are managed by each agent's marketplace, so updates arrive through the agent rather than through `npx skills update`. Plugin and extension installs also register the remote Docker docs MCP server (`https://ai-backend-service.docker.com/mcp`) used by `docker-docs`. The skills CLI, Docker Sandboxes, and manual copies install skills only.
**Claude Code** (run in the Claude Code prompt):
/plugin marketplace add docker/skills /plugin install docker-skills@docker
See [Claude Code plugins docs](https://code.claude.com/docs/en/discover-plugins)
**OpenAI Codex**
codex plugin marketplace add docker/skills codex plugin add docker-skills@docker
Start a new Codex session after installing. See [Codex skills docs](https://developers.openai.com/codex/skills)
**GitHub Copilot CLI** (run in the Copilot CLI prompt):
/plugin marketplace add docker/skills /plugin install docker-skills@docker
See [Copilot CLI plugins docs](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing)
**Gemini CLI**
gemini extensions install https://github.com/docker/skills
Restart Gemini CLI to discover the installed skills. See [Gemini CLI extensions docs](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md)
**Cursor**
Select the `docker-skills` plugin from Cursor's marketplace where available, or use the `skills` CLI above with `--agent cursor`. Importing a repository into a team marketplace requires team administrator access. See [Cursor plugins docs](https://cursor.com/docs/plugins)
Docker Sandboxes
Docker Sandboxes also offers experimental product-native installation with the standalone `sbx` CLI:
sbx skills add docker/skills --skill docker-compose-patterns sbx skills ls sbx skills update
Omit `--skill` to install every skill. The shared skill store makes installed skills available to sandboxes on their next start; check `sbx skills --help` because this experimental interface may change. See the [Docker Docs installation guide](https://docs.docker.com/ai/skills/install/#docker-sandboxes) for more detail.
Clone or copy
For a reviewed snapshot, choose a tag from [Docker Skills releases](https://github.com/docker/skills/releases) and replace `vX.Y.Z` below. Clone into a separate directory, then copy complete skill folders from its `skills/` directory into the appropriate agent path in the table. Alternatively, if the cloned repository **itself** is your project root, its discovery symlinks let supported agents find skills without copying; a clone inside a project subdirectory is not a discovery path. Manual copies have no managed updater, so replace complete folders when updating.
git clone --branch vX.Y.Z --depth 1 https://github.com/docker/skills.git docker-skills
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 27 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "$schema": "https://json.schemastore.org/claude-code-marketplace.json",
- "name": "docker",
- "owner": {
- "name": "Docker, Inc."
- },
- "metadata": {
- "description": "Docker-authored knowledge skills for AI coding agents across Dockerfiles, Compose, Docker Agent, Docker Sandboxes, and safe Docker workflows.",
- "version": "0.3.1"
- },
- "plugins": [
- {
- "name": "docker-skills",
- "source": "./",
- "description": "Docker-authored knowledge skills for AI coding agents across Dockerfiles, Compose, Docker Agent, Docker Sandboxes, and safe Docker workflows.",
- "version": "0.3.1",
- "author": {
- "name": "Docker, Inc."
- },
- "homepage": "https://www.docker.com/",
- "repository": "https://github.com/docker/skills",
- "license": "Apache-2.0",
- "keywords": ["docker", "dockerfile", "compose", "containers", "devops"],
- "category": "development"
- }
- ]
- }
README.md · README · 251 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # Docker Skills for AI Coding Agents
- [](https://github.com/docker/skills/actions/workflows/ci.yml)
- [](https://agentskills.io/specification)
- [](LICENSE)
- [](https://skills.sh/docker/skills)
- [](https://scorecard.dev/viewer/?uri=github.com/docker/skills)
- [](https://github.com/docker/skills/releases)
- Docker-authored knowledge skills that improve AI coding agent output for Docker-related tasks. Skills are authored once as portable `SKILL.md` directories and discovered automatically by any compliant agent through standard skill paths.
- The installation steps below are self-contained; the catalog-generated inventory also records Docker Docs guidance for each distribution surface.
- ## Skills
- Skills are grouped by the Docker product they cover. The table is generated from [`catalog.yaml`](catalog.yaml) by `task catalog`; edit the catalog, not the table.
- <!-- catalog-start -->
- | Product | Description | Skills |
- |---------|-------------|--------|
- | **[Dockerfile & Build](https://docs.docker.com/build/)**<br>[source](https://github.com/docker/buildx) | Containerize a project and write, optimize, and harden Dockerfiles and images. | [`docker-project-foundations`](skills/docker-project-foundations) — Guidance for initializing and structuring a Dockerized project.<br>[`docker-build-strategies`](skills/docker-build-strategies) — Strategies for efficient, secure, and optimized Docker image builds. |
- | **[Docker Compose](https://docs.docker.com/compose/)**<br>[source](https://github.com/docker/compose) | Wire multi-container stacks with robust, maintainable Compose configurations. | [`docker-compose-patterns`](skills/docker-compose-patterns) — Patterns for robust, maintainable Docker Compose configurations. |
- | **[Docker Sandboxes](https://docs.docker.com/ai/sandboxes/)** | Run AI coding agents in isolated microVMs with the sbx CLI, including network policy, credentials, and kits. | [`docker-sandboxes-lifecycle`](skills/docker-sandboxes-lifecycle) — Create, reattach to, and tear down local `sbx` sandboxes; choose workspace bind-mount vs --clone isolation.<br>[`docker-sandboxes-network-credentials`](skills/docker-sandboxes-network-credentials) — Configure sandbox network egress policy and provision service/registry credentials safely through the proxy-injection model.<br>[`docker-sandboxes-kits`](skills/docker-sandboxes-kits) *(experimental)* — Author, verify, publish, and compose sandbox kits with the v3 descriptor (workload/mixin, capabilities, buildx, kit-tck), and reference them from sbxenv.yaml. |
- | **[Docker Agent](https://docs.docker.com/ai/docker-agent/)**<br>[source](https://github.com/docker/docker-agent) | Author, run, and ship AI agents with Docker Agent, from agent.yaml to serving and distribution. | [`docker-agent-config`](skills/docker-agent-config) — Reference and rules for authoring agent.yaml configs for Docker Agent (cagent) — agents, models, providers, toolsets, and multi-agent teams.<br>[`docker-agent-run`](skills/docker-agent-run) — Rules for running Docker Agent locally — safety/approval modes, sandbox isolation, aliases, worktrees, and troubleshooting a run.<br>[`docker-agent-deploy`](skills/docker-agent-deploy) — Rules for exposing Docker Agents as servers, distributing them via OCI registries, and evaluating them for regressions in CI. |
- | **Cross-Product** | Documentation lookup, guardrails, and policies that apply across every Docker product. | [`docker-docs`](skills/docker-docs) *(experimental)* — Answer questions about any Docker product from current, cited official Docker documentation, using the Docker docs MCP search tool or the docs.docker.com llms.txt and Markdown fallback.<br>[`docker-destructive-guardrails`](skills/docker-destructive-guardrails) — Cross-product policy for confirming irreversible or destructive Docker operations before running them. |
- <!-- catalog-end -->
- Each skill triggers directly from its own description; there is no entry-point skill to load first.
- When a task spans several skills, load them in the order their outputs feed each other: `docker-project-foundations` before `docker-build-strategies` or `docker-compose-patterns` when the project has no Docker setup yet; `docker-build-strategies` before `docker-compose-patterns` when both a `Dockerfile` and a `compose.yaml` change; `docker-sandboxes-lifecycle` before `docker-sandboxes-network-credentials`, and both before `docker-sandboxes-kits`; `docker-agent-config` before `docker-agent-run` before `docker-agent-deploy`.
- Skills marked *experimental* cover features whose schemas may still change.
- ## Installation
- ### Quick start: the `skills` CLI
- The [`skills` CLI](https://skills.sh) installs into every major coding agent (Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf, Cline, Kiro, and more). It reads the [`skills.sh.json`](skills.sh.json) index in this repo, so skills are listed grouped by product:
- ```bash
- npx skills add docker/skills
- ```
- The command prompts for which skills and which agents to install to. Non-interactive variants:
- ```bash
- # Browse the catalog without installing anything
- npx skills add docker/skills --list
- # Install one skill, no prompts (project scope; add -g for user scope)
- npx skills add docker/skills --skill docker-compose-patterns --yes
- # Install every skill into one agent
- npx skills add docker/skills --skill '*' --agent codex --yes
- # Install every skill into every detected agent
- npx skills add docker/skills --all
- # Keep installed skills current
- npx skills update
- # Pin a skill to a reviewed release (replace vX.Y.Z with a release tag)
- npx skills add https://github.com/docker/skills/tree/vX.Y.Z \
- --skill docker-compose-patterns --yes
- ```
- ### Install as a plugin
- Plugin installs are managed by each agent's marketplace, so updates arrive through the agent rather than through `npx skills update`.
- Plugin and extension installs also register the remote Docker docs MCP server
- (`https://ai-backend-service.docker.com/mcp`) used by `docker-docs`. The
- skills CLI, Docker Sandboxes, and manual copies install skills only.
- **Claude Code** (run in the Claude Code prompt):
- ```text
- /plugin marketplace add docker/skills
- /plugin install docker-skills@docker
- ```
- See [Claude Code plugins docs](https://code.claude.com/docs/en/discover-plugins)
- **OpenAI Codex**
- ```bash
- codex plugin marketplace add docker/skills
- codex plugin add docker-skills@docker
- ```
- Start a new Codex session after installing. See [Codex skills docs](https://developers.openai.com/codex/skills)
- **GitHub Copilot CLI** (run in the Copilot CLI prompt):
- ```text
- /plugin marketplace add docker/skills
- /plugin install docker-skills@docker
- ```
- See [Copilot CLI plugins docs](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing)
- **Gemini CLI**
- ```bash
- gemini extensions install https://github.com/docker/skills
- ```
- Restart Gemini CLI to discover the installed skills. See [Gemini CLI extensions docs](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md)
- **Cursor**
- Select the `docker-skills` plugin from Cursor's marketplace where available, or use the `skills` CLI above with `--agent cursor`. Importing a repository into a team marketplace requires team administrator access. See [Cursor plugins docs](https://cursor.com/docs/plugins)
- ### Docker Sandboxes
- Docker Sandboxes also offers experimental product-native installation with the standalone `sbx` CLI:
- ```bash
- sbx skills add docker/skills --skill docker-compose-patterns
- sbx skills ls
- sbx skills update
- ```
- Omit `--skill` to install every skill. The shared skill store makes installed skills available to sandboxes on their next start; check `sbx skills --help` because this experimental interface may change. See the [Docker Docs installation guide](https://docs.docker.com/ai/skills/install/#docker-sandboxes) for more detail.
- ### Clone or copy
- For a reviewed snapshot, choose a tag from [Docker Skills releases](https://github.com/docker/skills/releases) and replace `vX.Y.Z` below. Clone into a separate directory, then copy complete skill folders from its `skills/` directory into the appropriate agent path in the table. Alternatively, if the cloned repository **itself** is your project root, its discovery symlinks let supported agents find skills without copying; a clone inside a project subdirectory is not a discovery path. Manual copies have no managed updater, so replace complete folders when updating.
- ```bash
- git clone --branch vX.Y.Z --depth 1 https://github.com/docker/skills.git docker-skills
- # Example: install one skill for Claude Code (use another path from the table as needed)
- mkdir -p ~/.claude/skills
- cp -R docker-skills/skills/docker-compose-patterns ~/.claude/skills/
- ```
- | Agent | Skill directory | Docs |
- |-------|-----------------|------|
- | Claude Code | `~/.claude/skills/` | [docs](https://code.claude.com/docs/en/skills) |
- | OpenAI Codex | `~/.codex/skills/` or `~/.agents/skills/` | [docs](https://developers.openai.com/codex/skills) |
- | Cursor | `~/.cursor/skills/` | [docs](https://cursor.com/docs/context/skills) |
- | GitHub Copilot | `.github/skills/` in the project | [docs](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills) |
- | Gemini CLI | `~/.gemini/skills/` | [docs](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md) |
- | Google Antigravity | `.agents/skills/` in the project or `~/.gemini/antigravity/skills/` | [Docker Docs](https://docs.docker.com/ai/skills/install/#google-antigravity) |
- | OpenCode | `~/.config/opencode/skills/` | [docs](https://opencode.ai/docs/skills/) |
- Google Antigravity uses the `skills` CLI (`--agent antigravity`) or manual copy; it has no dedicated plugin manifest. See [Docker Docs guidance for Antigravity](https://docs.docker.com/ai/skills/install/#google-antigravity) for more detail. Docker Agent consumes skills installed in supported project or user paths.
- ## Published surfaces
- This inventory is generated from [`catalog.yaml`](catalog.yaml). It records the canonical Docker Docs installation links for each surface; the instructions above provide a self-contained installation path.
- <!-- distributions-start -->
- ### Native marketplaces
- - **[Claude Code marketplace](https://docs.docker.com/ai/skills/install/#claude-code).** Client-managed plugin installation from Docker's marketplace.
- - **[GitHub Copilot CLI marketplace](https://docs.docker.com/ai/skills/install/#github-copilot-cli).** Client-managed plugin installation from Docker's marketplace.
- - **[Cursor marketplace](https://docs.docker.com/ai/skills/install/#cursor).** Client-managed installation through Cursor's documented plugin interface.
- - **[Codex marketplace](https://docs.docker.com/ai/skills/install/#codex).** Client-managed installation where the Codex marketplace is available.
- ### Extensions
- - **[Gemini CLI extension](https://docs.docker.com/ai/skills/install/#gemini-cli).** Repository-backed extension installation managed by Gemini CLI.
- ### skills CLI
- - **[skills CLI](https://docs.docker.com/ai/skills/install/#skills-cli).** Cross-client project or user installation with explicit skill selection.
- ### Docker products
- - **[Docker Sandboxes *(experimental)*](https://docs.docker.com/ai/skills/install/#docker-sandboxes).** Product-native installation into the shared sandbox skill store.
- - **[Docker Agent](https://docs.docker.com/ai/skills/install/#docker-agent).** Consumer of skills installed in supported project or user paths.
- ### Sources and fallback
- - **[Git clone or manual copy](https://docs.docker.com/ai/skills/install/#git-clone-or-manual-copy).** Auditable fallback when no managed installer fits the client.
- <!-- distributions-end -->
- ## Releases
- `main` is the rolling development channel; skills installed from it through the
- `skills` CLI or a clone or copy can be refreshed as updates merge. Tags such as
- `v0.3.0` are immutable, reviewed snapshots. Pin a release tag for reproducible
- installs and periodically review and advance that pin. Claude Code and Codex
- plugin updates are gated by the distribution version rendered into their
- manifests, so those marketplaces advance with a versioned release. See the
- [releases](https://github.com/docker/skills/releases) for published tags.
- ## Standards & Compatibility
- Every catalogued skill follows the [Agent Skills specification](https://agentskills.io/specification)
- and passes the upstream [`skills-ref` validator](https://github.com/agentskills/agentskills/tree/main/skills-ref).
- Repository-specific files such as `skill.yaml`, `agents/openai.yaml`, assets, checks,
- and evaluation runbooks add distribution and quality conventions beyond the core
- specification. Discovery and installation support varies by agent; consult the
- [Agent Skills client directory](https://agentskills.io/clients) for current client
- capabilities.
- ## Local Development
- Prerequisites: [Task](https://taskfile.dev/) and Docker.
- ```bash
- task # Run the complete CI/release validation suite
- task validate # Check skill structure, frontmatter, and manifests; run validator tests
- task eval # Static asset and verification-snippet checks, not live agent evals
- task links # Check local Markdown links and heading anchors
- task links:external # Check external HTTPS URLs via live network (opt-in)
- task catalog # Regenerate catalog tables, skills.sh.json, and plugin manifest versions from catalog.yaml
- task catalog:check # Verify generated catalog files are current
- ```
- External checks require public network access. `task links:external` scans Markdown prose
- and catalog/plugin metadata; `python3 scripts/check_external_links.py --base <commit>`
- checks URL occurrences on added lines since the merge base (including repeated URLs).
- CI runs this network-dependent check separately from deterministic `task` validation:
- pull requests check added-line URL occurrences, while the weekly schedule and manual
- dispatch check all URLs. This advisory workflow is **not required for merges during
- initial rollout**. Confirmed HTTP 404/410 and missing Docker Docs anchors are reported
- as failures, except that PR checks with a changed catalog distribution version report
- an unredirected 404 for that version's exact `CHANGELOG.md` compare and release-tag
- links as notices until publication. Full sweeps and all other broken links still fail.
- Access denial, rate limiting, server/network errors, and uncertain anchors are warnings.
- When an HTTPS proxy is configured, the checker warns rather than bypassing
- it; these warnings cannot confirm link availability. Redirects are reported so maintainers
- can update moved links. An intentional session-dependent Slack invitation
- (`https://dockr.ly/slack`) is excluded from automated checks.
- ## Repository Structure
- ```
- skills/ — Canonical skill directories (SKILL.md + supporting files)
- .agents/skills — Symlink to skills/ (Codex, cross-agent convention)
- .claude/skills — Symlink to skills/ (Claude Code)
- .gemini/skills — Symlink to skills/ (Gemini CLI)
- .github/skills — Symlink to skills/ (Copilot CLI)
- catalog.yaml — Distribution version and skill registry: product families, skill ids, per-skill versions, and status
- skills.sh.json — Product-grouped index read by the skills CLI (generated from catalog.yaml)
- scripts/render_catalog.py — Renders catalog tables, skills.sh.json, and plugin manifest versions from catalog.yaml
- evals/ — Evaluation runbooks
- .claude-plugin/ — Claude Code plugin + marketplace manifests
- .codex-plugin/ — Codex plugin manifest
- .agents/plugins/ — Codex marketplace manifest
- .cursor-plugin/ — Cursor plugin + marketplace manifests
- .github/plugin/ — Copilot CLI plugin + marketplace manifests
- gemini-extension.json — Gemini CLI extension manifest (declares the docs MCP server inline)
- plugin-mcp.json — Docker docs MCP server referenced by the Claude Code, Codex, Cursor, and Copilot CLI plugin manifests
- Taskfile.yml — CI and validation tasks
- scripts/ci.sh — Shared CI and release validation entrypoint
- ```
- ## Contributing
- See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution process and DCO
- sign-off requirements. When changing a skill, keep its catalog and skill
- versions synchronized; [AGENTS.md](AGENTS.md) summarizes the repository
- contracts. Run `task` from the repository root before submitting a change.
- ## License
- This project is licensed under the Apache License 2.0 — see [LICENSE](LICENSE) for details.
scripts/test_content_risk.py · Bundled script · 138 lines · 5 findings marked
- import pathlib
- import tempfile
- import unittest
- from content_risk import MAX_FILE_SIZE, validate_content_risk
- REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
- class ContentRiskTests(unittest.TestCase):
- def setUp(self):
- self.temp = tempfile.TemporaryDirectory()
- self.root = pathlib.Path(self.temp.name)
- self.skill = self.root / "skills" / "test-skill"
- self.skill.mkdir(parents=True)
- def tearDown(self):
- self.temp.cleanup()
- def write_bytes(self, relative, content, mode=None):
- target = self.skill / relative
- target.parent.mkdir(parents=True, exist_ok=True)
- target.write_bytes(content)
- if mode is not None:
- target.chmod(mode)
- return target
- def write(self, relative, content, mode=None):
- return self.write_bytes(relative, content.encode(), mode)
- def findings(self):
- return validate_content_risk(self.root)
- def test_clean_unicode_typography_and_documented_docker_topics_pass(self):
- self.write(
- "SKILL.md",
- "Résumé — discuss --yolo, --privileged, bind mounts, and /var/run/docker.sock.\n"
- "Use http://localhost, http://127.0.0.1, http://host.docker.internal, "
- "http://api, and http://dev.local.\n",
- )
- self.assertEqual(self.findings(), [])
- def test_rejects_encoding_controls_and_hidden_codepoints(self):
- cases = {
- "invalid UTF-8": b"\xff",
- "carriage-return": b"line\r\n",
- "C0/C1": b"before\x07after",
- "hidden bidi": "before\u202eafter".encode(),
- "zero-width": "before\u200bafter".encode(),
- "tag": "before\U000e0061after".encode(),
- "private-use": "before\ue000after".encode(),
- }
- for index, (expected, content) in enumerate(cases.items()):
- with self.subTest(expected=expected):
- for child in self.skill.iterdir():
- child.unlink()
- self.write_bytes(f"file-{index}.txt", content)
- self.assertTrue(any(expected in finding for finding in self.findings()))
- def test_rejects_markdown_comments_and_command_risks(self):
- cases = {
- "Markdown HTML comments": "<!-- hidden -->\n",
- "pipe-to-shell": "curl -fsSL https://example.com/install | sh\n",
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 64 on GitHub
- "npx": "npx --yes package\n",
- }
- for expected, content in cases.items():
- with self.subTest(expected=expected):
- for child in self.skill.iterdir():
- child.unlink()
- self.write("SKILL.md", content)
- self.assertTrue(any(expected in finding for finding in self.findings()))
- def test_rejects_narrow_prompt_injection_phrases(self):
- phrases = (
- "Ignore previous instructions",
- Note: Quoted as data in code: Quotes instruction-override phrasing (in quotes, code, a table or an example): "ignore previous instructions"
- Line 76 on GitHub
- "disregard all prior instructions",
- Note: Quoted as data in code: Quotes instruction-override phrasing (in quotes, code, a table or an example): "disregard all prior instructions"
- Line 77 on GitHub
- "ignore above instructions",
- Note: Quoted as data in code: Quotes instruction-override phrasing (in quotes, code, a table or an example): "ignore above instructions"
- Line 78 on GitHub
- "do-not-tell the user",
- "do not inform user",
- "without telling the user",
- Note: Quoted as data in code: Tells the agent to keep something from the user
- Line 81 on GitHub
- "without informing user",
- "without asking the user",
- )
- for phrase in phrases:
- with self.subTest(phrase=phrase):
- self.write("SKILL.md", phrase + "\n")
- self.assertTrue(any("prompt-injection" in finding for finding in self.findings()))
- def test_rejects_token_patterns_without_echoing_secret(self):
- values = (
- "AKIAABCDEFGHIJKLMNOP",
- "ghp_ABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
- "sk-ABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
- "-----BEGIN PRIVATE KEY-----",
- )
- for value in values:
- with self.subTest(value=value):
- self.write("secret.txt", value)
- findings = self.findings()
- self.assertTrue(any("token, key" in finding for finding in findings))
- self.assertTrue(all(value not in finding for finding in findings))
- def test_rejects_credential_filenames_and_external_http(self):
- for name in (".env", ".env.example", "client.pem", "client.key", "client.p12", "client.pfx"):
- with self.subTest(name=name):
- target = self.write(name, "placeholder\n")
- self.assertTrue(any("credential filenames" in finding for finding in self.findings()))
- target.unlink()
- self.write("SKILL.md", "http://example.com/path\n")
- self.assertTrue(any("external insecure" in finding for finding in self.findings()))
- def test_rejects_symlinks_large_files_and_misplaced_executables(self):
- self.write("target.txt", "target\n")
- (self.skill / "link.txt").symlink_to("target.txt")
- self.write_bytes("large.bin", b"x" * (MAX_FILE_SIZE + 1))
- self.write("run.sh", "#!/bin/sh\n", 0o755)
- self.write("scripts/allowed.sh", "#!/bin/sh\n", 0o755)
- findings = self.findings()
- self.assertTrue(any("symlinks" in finding for finding in findings))
- self.assertTrue(any("256 KiB" in finding for finding in findings))
- self.assertTrue(any("executable bit" in finding and "run.sh" in finding for finding in findings))
- self.assertFalse(any("allowed.sh" in finding for finding in findings))
- def test_findings_are_deterministic(self):
- self.write("z.txt", "http://example.com\n")
- self.write("a.txt", "npx -y package\n")
- findings = self.findings()
- self.assertEqual(findings, sorted(findings))
- def test_current_repository_passes(self):
- self.assertEqual(validate_content_risk(REPO_ROOT), [])
- if __name__ == "__main__":
- unittest.main()
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.