원클릭으로
security-review
10-category security checklist for agent-core: secrets, input validation, sandbox, and prompt injection.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
10-category security checklist for agent-core: secrets, input validation, sandbox, and prompt injection.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Runtime extension 验证规范 — 验证 harness package 中 tools、rails、skills 是否能真实热加载并可运行
实现阶段主操作手册 — 指导 agent 完成改码与局部验证,并把提交留给独立 commit phase
扩展实现阶段 — 在 worktree 中生成运行时扩展代码
扩展方案设计 — 将能力缺口转化为 ExtensionDesign 结构
Generates a multimodal Skill markdown file from a source URL. Use this Skill when a user wants to turn a web tutorial, product support article, or software guide into a reusable agent Skill with concise steps and embedded screenshots.
Comprehensive step-by-step workflow for navigating the Booking.com mobile site to search for destinations, select dates/occupancy, browse results, and extract detailed hotel information including pricing and facilities.
| name | security-review |
| description | 10-category security checklist for agent-core: secrets, input validation, sandbox, and prompt injection. |
Comprehensive security checklist for agent-core. Run through all 10 categories before any security-sensitive change or PR.
See .claude/rules/python/security.md for tool-specific guidance (bandit, pip-audit).
See .claude/rules/security.md for credential, sandbox, and shell execution rules.
Rule: Credentials never enter source code.
.py filesos.getenv().env files not committed (already in .gitignore — do not remove)settings.json deny rules block Read(./.env) and Read(./**/secrets/**)os.getenv("KEY", "mock-key-for-tests")# Bad
API_KEY = "sk-1234567890abcdef"
# Good
import os
API_KEY = os.getenv("OPENAI_API_KEY") # Must be set in environment
Rule: Validate all external input before use.
safe_path utilities.. or resolve outside allowed scopeFor sys_operation:
from openjiuwen.core.common.security import safe_path
def execute_command(user_path: str, working_dir: Path) -> None:
validated = safe_path(user_path, allowed_base=working_dir)
if validated is None:
raise SecurityError(f"Path outside allowed scope: {user_path}")
# Proceed with validated path
Rule: Use parameterized queries for all database operations.
f"SELECT * FROM {table}" is forbidden"WHERE id = ?", (id,)# Bad
cursor.execute(f"SELECT * FROM {table_name} WHERE id = {user_id}")
# Good
cursor.execute(
"SELECT * FROM sessions WHERE id = ?",
(session_id,)
)
Rule: Access control must be enforced server-side, not just client-side.
core/security/openjiuwen/core/security/ verify permissions before executionRule: openjiuwen/harness/prompts/ must guard against injected user content.
openjiuwen/harness/rails/) correctly blocks dangerous patternsPrompt injection is agent-core's most unique security concern. Attackers may try to inject instructions into conversation history to manipulate agent behavior:
# Bad — user content injected into system prompt
system_prompt = f"You are a helpful assistant. User said: {user_message}"
# Good — user content kept in separate context slot
system_prompt = SYSTEM_INSTRUCTIONS
context = {
"user_message": sanitize_for_display(user_message),
"conversation_history": conversation,
}
Rule: All mutating requests include validation.
core/session/ validates that requests originate from legitimate sessionssecrets.token_urlsafe())Rule: Protect core/runner/ and core/runner/ resources from exhaustion.
Runner.resource_mgr enforces limits on concurrent agent executionsRule: Logs must not expose credentials, tokens, or sensitive data.
openjiuwen.core.common.logging used instead of print()# Bad
logger.info(f"Authenticated user {user_id} with token {token}")
# Good
logger.info("User authenticated", extra={"user_id": user_id})
Rule: All dependencies scanned before merging PRs.
pip-auditbandit -r openjiuwen/ -ll passes (no HIGH/CRITICAL findings)core/sys_operation/ and core/security/ minimized# Run before merging dependency changes
pip-audit
bandit -r openjiuwen/ -ll
Rule: core/sys_operation/sandbox/ must provide genuine isolation.
../)For sandbox implementations, verify:
# Path isolation
def sandbox_read(path: Path, allowed_base: Path) -> str:
resolved = (allowed_base / path).resolve()
if not resolved.is_relative_to(allowed_base):
raise SecurityError(f"Escape attempt: {path}")
return resolved.read_text()
Before marking a security-sensitive PR as ready for review, run through all 10 categories above. Document the review in the PR description:
Security Review
===============
Secrets: PASS (no hardcoded credentials)
Input Val: PASS (safe_path used for all user paths)
SQL Injection: PASS (parameterized queries only)
Auth/RBAC: PASS (guardrails enforce permissions)
Prompt Inject: PASS (user content isolated from system prompts)
CSRF: PASS (session IDs are non-guessable)
Rate Limiting: PASS (resource_mgr enforces limits)
Log Safety: PASS (no credentials in structured logs)
Dependencies: PASS (bandit + pip-audit clean)
Sandbox: PASS (path scoping verified)
For changes to core/security/, core/sys_operation/, or
openjiuwen/extensions/sys_operation/sandbox/, request a dedicated
security review from a second reviewer.