Skip to content
Development
Skill

/common-security-standards

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.

From plugin
agent-skills-standard
583200 skills21 agents33 commands1 MCP

Claude Code

$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill common-security-standards --agent claude-code

SKILL.md

common-security-standards.SKILL.md
name: common-security-standards
description: 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.
metadata:
  triggers:
    files:
    - '**/*.ts'
    - '**/*.tsx'
    - '**/*.go'
    - '**/*.dart'
    - '**/*.java'
    - '**/*.kt'
    - '**/*.swift'
    - '**/*.py'
    keywords:
    - security
    - encrypt
    - authenticate
    - authorize

Security Standards

**Priority: P0 (CRITICAL)**

Always-Apply Rules

Apply these on **every code write**, regardless of context:

  • **No hardcoded secrets**: Use environment variables or secret managers. Never commit keys, passwords, or tokens to source control.
  • **No raw SQL strings**: Use parameterized queries or ORMs — `WHERE id = ${userId}` always wrong.
  • **No stacktraces in prod**: Return generic error codes; log full detail server-side only.

Workflow

Activate when: implementing auth, encryption, authorization, input handling, or any security-sensitive feature.

1. **Identify trust boundaries** — map every data entry point (API, UI, CSV, webhook). 2. **Validate and sanitize** all external input at each boundary. 3. **Apply least privilege** to users, services, and containers. 4. **Verify** with SAST/DAST scanners in CI before merge.

Context-Specific Rules

Data Safeguarding

  • **Zero Trust**: Never trust external input. Sanitize and validate every data boundary.
  • **Least Privilege**: Grant minimum necessary permissions to users, services, and containers.
  • **Encryption**: AES-256 for data-at-rest; TLS 1.3 for data-in-transit.
  • **PII Logging**: Never log PII (email, phone, names). Mask sensitive fields before logging.

See [implementation examples](references/implementation.md) for parameterized queries and secret management.

Trust Boundaries & Authority Lifecycle

  • **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.

Continuous Security

  • **Shift Left**: Integrate security scanners (SAST/DAST) early in CI/CD pipeline.
  • **Data Minimization**: Collect and store only minimum data required for business logic.
  • **Audit Logging**: Maintain logs for sensitive operations (Auth, Deletion, Admin changes).

Anti-Patterns

  • **No default passwords**: Force rotation on first use with strong entropy requirements.

References

  • [Injection Testing Protocols (SQLi/HTMLi)](references/INJECTION_TESTING.md)
  • [Vulnerability Remediation & Secure Patterns](references/VULNERABILITY_REMEDIATION.md)

Remediation anchors

  • Remediation anchors: Argon2id, parameterized queries or ORM, rate limiting, HttpOnly Secure cookies
Read more
@hoangnguyen0403
Ships withagent-skills-standard

The portable standards layer for AI coding agents. Sync once, then work in your own runtime.

583200 skills21 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
583
Star history of hoangnguyen0403/agent-skills-standard on GitHub, a chart by star-history.com

Other skills on agent-skills-standard.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about common-security-standards.

Which coding agents can use common-security-standards?
common-security-standards installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.