ワンクリックで
securing-mas
Apply OWASP MAESTRO 7-layer security framework to MAS designs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Apply OWASP MAESTRO 7-layer security framework to MAS designs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Compacts verbose context into structured summary. Use after pollution sources (searches, logs, JSON) or at phase milestones.
Create a pull request from the current branch. Analyzes commits, generates title+body from PR template, pauses for approval, then pushes and creates PR. Use after committing changes.
Designs concise, streamlined backend systems matching exact task requirements. Use when planning APIs, data models, system architecture, or when the user requests backend design work.
Audits and aligns project documentation against authority chains (project docs and Claude Code infrastructure). Detects broken references, duplicates, scope creep, and chain breaks. Use when reviewing documentation health, fixing stale references, or enforcing single-source-of-truth.
Interactive Q&A to build UserStory.md from user input. Use when the user wants to create a user story document or start the assisted workflow.
Generates prd.json task tracking file from PRD.md requirements document. Use when initializing Ralph loop or when the user asks to convert PRD to JSON format for autonomous execution.
| name | securing-mas |
| description | Apply OWASP MAESTRO 7-layer security framework to MAS designs |
| compatibility | Designed for Claude Code |
| metadata | {"argument-hint":["component-or-feature"],"allowed-tools":"Read, Grep, Glob, WebSearch, WebFetch"} |
Target: $ARGUMENTS
Trigger this skill when:
MUST READ:
docs/archive/best-practices/mas-security.md
For each new component, verify across all 7 layers:
.env files excluded from version controlBefore marking implementation as complete:
Vulnerable:
prompt = f"Evaluate: {user_input}"
Secure:
result = agent.run(EvalContext(text=user_input))
Vulnerable:
def evaluate(self, context: dict) -> dict:
return {"score": context["data"]}
Secure:
def evaluate(
self, context: EvalContext
) -> EvalResult:
return EvalResult(score=context.compute())
Vulnerable:
def evaluate(self, context):
while True: # Infinite loop
process(context)
Secure:
def evaluate(self, context):
with timeout_context(self.settings.timeout):
return process(context)
Vulnerable:
api_key = "sk-1234..." # Hardcoded
Secure:
api_key = os.environ["API_KEY"] # From env
For each new feature, document threats:
| Layer | Component | Threat | Sev | Mitigation |
|---|---|---|---|---|
| 1 | LLM caller | Prompt inj. | HIGH | Structured out |
| 2 | Plugin | Type confusion | MED | Validation |
| 3 | API | Svc downtime | MED | Degradation |
| 4 | Logs | Log injection | MED | Structured log |
| 5 | Runner | Resource exh. | HIGH | Timeouts |
| 6 | Infra | Secret exposure | HIGH | Env vars |
| 7 | Registry | Hijacking | MED | Static import |
Test security controls explicitly:
def test_input_validation():
"""Layer 2: Reject invalid inputs."""
plugin = MyPlugin(settings)
with pytest.raises(ValidationError):
plugin.evaluate(EvalContext(score=999))
def test_timeout_enforcement():
"""Layer 5: Prevent infinite execution."""
plugin = MyPlugin(settings)
with pytest.raises(TimeoutError):
plugin.evaluate(EvalContext(data="loop"))
def test_error_message_safety():
"""Layer 2: Don't leak internal state."""
plugin = MyPlugin(settings)
result = plugin.evaluate(
EvalContext(data="trigger_error")
)
assert "secret" not in result.error.lower()