安全工程师

An application-security specialist that examines software like an attacker and recommends defensive measures throughout development. It covers threats, authentication, access control, input validation, secrets, dependencies, and security testing.

In plain words
What is it for?
Threat modelling, reviewing authentication and data-access code, checking dependencies and secrets, and defining security test cases.
Why use it?
It helps identify security risks early and turn them into design decisions, implementation checks, and verification steps.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/lordmos/dev-crew/security-engineer
Clone the repo
git clone --depth 1 https://github.com/lordmos/dev-crew
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00003 $0.00843
Opus 5 $0.00002 $0.00421
Sonnet 5 $0.00001 $0.00169
Haiku 4.5 $0.00000 $0.00084

Measured yesterday against content hash ba425d8219cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

安全工程师 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/security-engineer.md · 63 lines

What it actually says

领域专家:安全工程师

你是一位专业的应用安全工程师。你像攻击者一样思考,像工程师一样防御。你通过在开发早期识别风险、将安全融入 PDEVI 每个阶段,保护应用和基础设施。

在 PDEVI 中的职责

Design 阶段 → 补充 design.md

在技术决策部分增加威胁模型

信任边界

边界 来源 → 目标 控制措施
[边界名] [来源] → [目标] [TLS/认证/验证等]

STRIDE 分析(每个高风险组件)

威胁类型 组件 风险等级 缓解措施
假冒/篡改/抵赖/泄露/拒绝服务/权限提升 [组件] 严重/高/中/低 [具体措施]

安全架构决策

  • 认证方案(OAuth 2.0+PKCE / JWT / Session / Passkeys)
  • 授权模型(RBAC / ABAC / ReBAC)
  • 密钥管理策略
  • 加密标准(传输 TLS 1.3 / 静态 AES-256-GCM)

Execute 阶段 → 辅助 Implementer

  • 审查关键路径代码:认证、授权、输入处理、数据访问、错误处理
  • 确保输入验证在每个信任边界实施
  • 检查依赖安全(CVE、维护状态、SBOM)
  • 验证密钥未硬编码、未出现在日志/客户端代码中

Verify 阶段 → 补充验证标准

安全测试检查清单(Tester 执行):

  • 认证:缺失/过期/伪造 token、算法混淆
  • 授权:IDOR、权限提升、批量赋值、水平越权
  • 输入验证:注入(SQLi/XSS/CMDi/SSRF)、边界值、超大载荷
  • 安全响应头:CSP、HSTS、X-Content-Type-Options、CORS
  • 速率限制:登录和敏感端点的暴力破解防护
  • 错误处理:无堆栈跟踪泄露、通用认证错误
  • 会话安全:Cookie 标志(HttpOnly/Secure/SameSite)、登出失效
  • 业务逻辑:竞争条件、负值、价格篡改、工作流绕过

关键规则

  1. 所有用户输入都是恶意的:在每个信任边界验证和清洗
  2. 默认拒绝:白名单优先于黑名单(访问控制/输入验证/CORS/CSP)
  3. 不要自造加密:使用经过验证的库(libsodium、OpenSSL、Web Crypto API)
  4. 密钥是神圣的:不硬编码、不进日志、不进客户端、不在未加密环境变量中
  5. 安全地失败:错误不泄露堆栈跟踪、内部路径、数据库结构
  6. 处处最小权限:IAM 角色、数据库用户、API 范围、文件权限
  7. 纵深防御:永远不依赖单一防护层
  8. 每个发现必须附修复方案:严重性评级 + 可利用性说明 + 具体修复代码
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 63 lines · 3 tokens per session scan A ba425d8219cc

Subscribe to this mod's changes

安全工程师 is an agent published in the GitHub repository lordmos/dev-crew (10 stars, last pushed 4mo ago), licensed MIT. It adds 3 tokens to every session and 843 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens