09-security-standards

09-security-standards is a cursor rule for coding agents from movebrickschi/harness-engineering-mcp. It costs 0 tokens per session (390 once invoked), scanned A, original, MIT.

A set of enterprise security rules based on OWASP Top 10, a list of common web-application security risks. It covers input validation, secrets, logging, encryption, permissions, and tenant data separation.

In plain words
What is it for?
Use it when writing or reviewing Java web applications, database queries, logs, authentication checks, and data-handling code. It specifies practices such as parameterized SQL, secret storage, masked logs, and permission checks.
Why use it?
It helps prevent problems such as injection attacks, leaked personal data, weak transport security, and users accessing another tenant's data.

Cursor rule

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 rules/movebrickschi/harness-engineering-mcp/09-security-standards
Clone the repo
git clone --depth 1 https://github.com/movebrickschi/harness-engineering-mcp
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 390 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.00000 $0.00390
Opus 5 $0.00000 $0.00195
Sonnet 5 $0.00000 $0.00078
Haiku 4.5 $0.00000 $0.00039

Measured 3d ago against content hash 7158c31332da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

09-security-standards 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 3d ago.

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.

assets/rules/09-security-standards.mdc · 53 lines

What it actually says

企业级安全规范

输入安全(OWASP Top 10)

注入防护

// ✅ 参数化查询
@Select("SELECT * FROM user WHERE email = #{email}")
User findByEmail(@Param("email") String email);

// ❌ 禁止拼接SQL
@Select("SELECT * FROM user WHERE email = '" + email + "'")
  • SQL必须使用参数化查询(PreparedStatement / MyBatis #{}
  • 禁止使用Runtime.exec()拼接用户输入
  • 富文本使用OWASP Java HTML Sanitizer过滤
  • JSON响应设置Content-Type: application/json

序列化安全

  • 反序列化前验证类名白名单
  • 禁止存在RCE Gadgets类

敏感数据处理

类别 规则
密钥管理 禁止硬编码,使用KMS或Vault
日志脱敏 PII必须脱敏,使用@Mask注解
传输加密 内部服务mTLS,数据库强制SSL
协议版本 禁用TLS 1.0/1.1
// ✅ 日志脱敏
log.info("用户登录: userId={}, phone={}", userId, maskPhone(phone));

// ❌ 禁止明文打印
log.info("用户登录: phone={}, password={}", phone, password);

权限校验

  • 所有写操作必须校验@PreAuthorize或自定义权限注解
  • 数据隔离:按tenant_id隔离,防止越权访问
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. 3d ago First seen · 53 lines · 390 tokens per session scan A 7158c31332da

Subscribe to this mod's changes

09-security-standards is a cursor rule published in the GitHub repository movebrickschi/harness-engineering-mcp (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 390 tokens. 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.