richfrem/agent-plugins-skills / plugins/agent-exploration-cycle/.apm/skills/running-exploration-cycle
running-exploration-cycle
VerifiedRuns the business exploration cycle end to end: starts or resumes a session (intake interview, session brief), enforces the Discovery Plan HARD-GATE, routes the four phases (Discovery Plan, Visual Blueprinting, Prototype, Handoff) to the sibling skills and keeps session state. Use when the user says "let's explore this idea", "I have an idea I want to explore", "help me plan this out", "start discovery", "resume my exploration", "where did we leave off", or starts any conversation about a need, problem or idea before building. Not for hardening an existing prototype (use reengineering-vibe-code) or for engineering build work.
scripts/test_path_traversal.py
View on GitHub"""
Purpose:
Unit tests for sandbox_runner._assert_under_root, verifying that path
traversal attacks (sibling-prefix, parent-escape, symlink-escape) are
rejected and only genuinely contained paths are allowed.
Key Input Dependencies:
- sandbox_runner.py module (_assert_under_root function)
- pytest tmp_path fixture
"""
import pytest
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).parent))
from sandbox_runner import _assert_under_root
def test_valid_path_passes(tmp_path):
"""Verify a genuinely contained path passes without raising."""
allowed = tmp_path / "work"
allowed.mkdir()
f = allowed / "file.txt"
f.touch()
_assert_under_root(f, allowed) # must not raise
def test_sibling_prefix_rejected(tmp_path):
"""The classic bypass: /tmp/work_evil passes a naive startswith('/tmp/work') check."""
allowed = tmp_path / "work"
allowed.mkdir()
evil = tmp_path / "work_evil"
evil.mkdir()
evil_file = evil / "secret.txt"
evil_file.touch()
with pytest.raises(PermissionError, match="Path traversal rejected"):
_assert_under_root(evil_file, allowed)
def test_parent_escape_rejected(tmp_path):
"""Verify a path outside the allowed root is rejected."""
allowed = tmp_path / "work"
allowed.mkdir()
with pytest.raises(PermissionError):
_assert_under_root(tmp_path / "outside.txt", allowed)
def test_symlink_escape_rejected(tmp_path):
"""Verify a symlink pointing outside the allowed root is rejected."""
allowed = tmp_path / "work"
allowed.mkdir()
outside = tmp_path / "outside.txt"
outside.write_text("secret")
link = allowed / "escape_link"
link.symlink_to(outside)
with pytest.raises(PermissionError):
_assert_under_root(link, allowed)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |