pablogore/ego-rs/security
Claude Code and agent skill by pablogore/ego-rs
- community
Checking that the SKILL.md file is still in the repository.
Trigger: security review, audit, SQL, query, user input, auth, JWT, permissions, tenant. Enforce security rules before writing or reviewing code that touches queries, auth, or external input.
Install
npx vskill@latest install pablogore/ego-rs/securitySKILL.md
The same SKILL.md was published earlier as pablogore/ego-rs/security.
Activation Contract
Load this skill when:
- Writing or reviewing any code that constructs a database query
- Writing or reviewing auth, JWT validation, or permission checks
- Handling user-supplied input at any system boundary
- Reviewing persistence, transport, or service-sdk crates
Hard Rules
Rule 1 — No SQL Injection (ABSOLUTE — no exceptions)
Never construct SQL by concatenating or interpolating user input, variables, or external data. This rule holds under ALL contexts: tests, migrations, admin tools, internal services, CLIs.
Forbidden patterns:
Required pattern — always use bound parameters:
If a query cannot be expressed with bound parameters (e.g., dynamic column names), it requires an explicit security review comment AND must use a strict allowlist — never a user-supplied string.
Identifier interpolation (e.g. `CREATE DATABASE`/`DROP DATABASE`, where Postgres cannot bind identifiers) falls under this same carve-out, not under the ABSOLUTE ban above, when — and only when — every interpolated value is provably internal:
The security review comment above the call, and the allowlist being "generated by this process from a counter/fixed constant, never a request/config/env value," are both required at each call site. A value sourced from user input, request data, or external config never qualifies, no matter the comment.
Rule 2 — Tenant Isolation
Every query that touches tenant-scoped data MUST include tenant_id as a bound parameter. Never derive tenant from a mutable or user-controlled field without validation.
Rule 3 — JWT / Auth Boundaries
- Never trust a JWT claim without signature verification first.
- Scope checks (tenant, role) MUST happen after signature verification, not before or in parallel.
- Do not log raw token values or private claims.
Rule 4 — No Privilege Escalation via Self-Referential Calls
Do not allow a service to issue requests on behalf of another tenant using its own credentials. Cross-tenant operations require an explicit CrossTenantPermit (see crates/service-sdk).
Decision Gates
| Situation | Action | |
|---|---|---|
| Query uses user-supplied string in SQL text | Block — rewrite with bind() | |
| Dynamic table/column name from user input | Block — use allowlist only | |
| Tenant field missing from query | Block — add tenant scope | |
JWT claim used before verify() | Block — verify first | |
| Cross-tenant call without permit | Block — add CrossTenantPermit | |
| All params bound, tenant scoped | Pass |
Execution Steps
- Scan every
sqlx::query/sqlx::query_as/sqlx::query_scalarcall in the diff. - Confirm no string interpolation or concatenation reaches the SQL text.
- Confirm every tenant-scoped table has
tenant_idas a bound$Nparameter. - If auth code is touched: verify the signature-first ordering is intact.
- If cross-tenant code is touched: verify
CrossTenantPermitis present and validated. - Report findings as BLOCK (must fix before merge) or WARN (should fix, explain risk).
Output Contract
Return:
- PASS — no violations found
- BLOCK — list each violation with file:line, the forbidden pattern, and the required fix
- WARN — list advisory issues with rationale
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/security/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pablogore/ego-rs/security)