Enforce universal security protocols for safe, resilient software. Use when implementing authentication, encryption, authorization, input validation, secret management, or any security-sensitive feature across any language or framework.
69%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/common/common-security-standards/SKILL.mdThe canonical home for this skill is common-security-standards in HoangNguyen0403/agent-skills-standard
Apply these on every code write, regardless of context:
WHERE id = ${userId} always wrong.Activate when: implementing auth, encryption, authorization, input handling, or any security-sensitive feature.
See implementation examples for parameterized queries and secret management.
Privileged Capability Minting: Do not scope ordinary user sessions to a single operation; ordinary sessions follow their own audience, expiry, revocation, and current-authorization policy. Strictly scope privileged mint, seal, restore, or high-risk mutation capabilities to operation-private issuers and single-operation lifetimes. Expose no exported or sibling mint gateway that accepts caller-supplied identity, context, or keys. Never reuse a privileged capability across sibling operations or unrelated processes.
Independently Protected Authority: Keep authority verifiers independent from untrusted client ledgers. Reject cached or stale local authority states; re-verify against the authoritative source. An authorized backup restore still requires post-restore revalidation against current authority.
Authenticated Persisted Evidence: Persist audit records and security artifacts with authentic caller provenance and integrity controls appropriate to the threat model (protected append-only storage, or a verified MAC/signature only where evidence crosses an untrusted boundary). Derive caller principal and operation claims from the operation's resolved authenticated context, never from caller-supplied event fields.
Transaction-Time Revalidation: Re-check authorization, tenancy, enrollment, and permissions inside the writer transaction after acquiring the shared authority-revision lock that every membership, session, enrollment, and ownership change must take and bump. Reject when the locked revision differs from the capability's; never rely on initial connect checks or pre-transaction snapshots.
Alternate Public APIs & Parity: Ensure security controls and rate limits apply identically to alternate public entrypoints, internal aliases, batch routes, and legacy API versions.
Multi-Connection & Concurrency Races: Guard against races across parallel connections or multi-process requests with a shared authority-revision lock that revocation paths also take, atomic conditional updates, and single-use operation-identity consumption. Account-only row locks neither cover concurrent revocation nor reject a replayed operation.
Lifecycle Rejection: Explicitly reject stale ledgers and stale restores, sibling or public capability mints, direct bypass APIs, and cross-enrollment credential retention. Preserved legitimate exceptions: one-time root bootstrap, monotonic gap recovery, authenticated unexpired session resume, and explicit root-authorized backup restore followed by revalidation.
Injection Prevention: Use parameterized queries or ORMs to stop SQL, Command, and XSS injections.
Dependency Management: Regularly scan (npm audit, pip audit) and update third-party libraries to patch CVEs.
Secure Auth: Implement Multi-Factor Authentication (MFA) and secure session management.
Error Privacy: Never leak stack traces or internal implementation details to end-user.
HoangNguyen0403/agent-skills-standard
11c8bd1
Canonical home
since Apr 14, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.