agentsclimarketplace

Security hardening

Skill SID-SURANGE/cursor-team-ops/skills/community/security-hardening

Enforcement & release-hygiene layer for Cursor agents β€” blocking git/DB/license guardrails, commit hygiene, and docs-ops.

Install
npx -y skills add SID-SURANGE/cursor-team-ops --skill security-hardening

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Apply security-first practices when building or reviewing code β€” input validation, secrets management, auth checks, OWASP Top 10 coverage. Triggered by "security review", "harden this", "is this secure", "security-hardening", "check for vulnerabilities", "audit my code", "run a security check", "is there anything unsafe here", "check for SQL injection", "check for XSS", "are there any security issues".

SKILL.md

6.5 KB, as published. Nobody here has run it

πŸ›‘οΈ Skill: security-hardening

Purpose

Security retrofitted after the fact costs 10Γ— more than security built in. This skill applies a consistent security lens at write-time and review-time β€” not as an afterthought audit. It covers the OWASP Top 10 patterns that appear most frequently in real deliverables.

Trigger phrases

  • "security review"
  • "harden this"
  • "is this secure"
  • "security-hardening"
  • "check for vulnerabilities"
  • "review this for security issues"

Boundary system (apply at all times)

Always do β€” no exceptions

RuleExample
Validate all external input at the system boundaryzod.parse(req.body) before any business logic
Parameterize all DB queries β€” never concatenate user input into SQLdb.query('SELECT * FROM users WHERE id = $1', [id])
Hash passwords with a slow algorithmbcrypt, argon2 β€” never MD5, SHA-1, or plain SHA-256
Use environment variables for all secretsprocess.env.API_KEY β€” never hardcoded strings
Set security headersContent-Security-Policy, X-Frame-Options, X-Content-Type-Options
Enforce HTTPSRedirect HTTP β†’ HTTPS; set Secure flag on cookies

Ask first β€” requires human approval

  • Any change to authentication or session management
  • New endpoints that accept file uploads
  • New third-party integrations that receive user data
  • Any change to user roles or permission logic
  • Storing a new category of sensitive data (PII, payment, health)

Never do

  • Commit secrets, tokens, or credentials to version control β€” even in test files
  • Log passwords, tokens, or PII to stdout/files
  • Trust client-side validation as a security boundary
  • Expose raw stack traces or internal error details to end users
  • Use eval(), exec(), or equivalents on user input
  • Disable security linting rules to make CI pass

Steps

1. Identify the attack surface

Before reviewing or writing code, map:

  • What inputs does this code accept? (HTTP request, file upload, env var, DB read, IPC)
  • What does it output? (HTTP response, DB write, file write, shell command)
  • What trust boundaries does it cross?

2. Check OWASP Top 10 coverage

Work through the relevant categories for the code in scope:

#CategoryWhat to check
A01Broken Access ControlEvery endpoint checks auth AND authorisation (not just "is logged in")
A02Cryptographic FailuresNo sensitive data transmitted unencrypted; no weak algorithms
A03InjectionAll SQL/shell/LDAP inputs parameterised; no string concatenation with user input
A04Insecure DesignBusiness logic can't be bypassed by manipulating request params
A05Security MisconfigurationNo default credentials; debug mode off in production; minimal permissions
A06Vulnerable Componentsnpm audit / pip-audit run; high/critical findings resolved
A07Auth FailuresSessions expire; tokens invalidated on logout; no weak password rules
A08Software/Data IntegrityDependencies pinned; no unverified third-party scripts
A09Logging FailuresSecurity events logged (login, auth failure, permission denied) β€” without logging the secret itself
A10SSRFOutbound HTTP calls validated against an allowlist; no user-controlled URLs fetched server-side without validation

3. Flag findings with severity

For each issue found:

[HIGH]   SQL injection risk β€” user input concatenated into query at api/users.ts:42
[MEDIUM] Missing authorisation check β€” any authenticated user can access /admin/export
[LOW]    Security header X-Frame-Options not set in middleware
[INFO]   bcrypt work factor is 10 β€” consider 12 for new deployments

Severity guide:

  • HIGH β€” exploitable by an unauthenticated user or directly exposes data
  • MEDIUM β€” exploitable by an authenticated user or requires specific conditions
  • LOW β€” defence-in-depth gap, not directly exploitable
  • INFO β€” best-practice recommendation, no immediate risk

4. Pre-deployment security checklist

Run this before any production deployment:

Authentication & Sessions
  [ ] Passwords hashed with bcrypt/argon2 (work factor β‰₯ 12)
  [ ] Session tokens expire and are invalidated on logout
  [ ] MFA available for admin accounts

Authorisation
  [ ] Every endpoint checks both authentication AND authorisation
  [ ] No IDOR β€” IDs in requests are validated as belonging to the requesting user

Input Validation
  [ ] All external input validated at the boundary (schema validation)
  [ ] File uploads: type checked, size limited, stored outside web root

Data Protection
  [ ] No secrets in code, config files, or logs
  [ ] PII encrypted at rest if stored
  [ ] HTTPS enforced; HSTS header set

Dependencies
  [ ] npm audit / pip-audit run with zero high/critical findings
  [ ] No packages with known critical CVEs

Infrastructure
  [ ] Debug mode / verbose errors disabled in production
  [ ] Minimal IAM permissions (least privilege)
  [ ] No default credentials on any service

5. Report

Security review: <filename or scope>

Findings:
  [HIGH]   <description> β€” <file>:<line>
  [MEDIUM] <description> β€” <file>:<line>
  [LOW]    <description> β€” <file>:<line>

Pre-deployment checklist: βœ“ / βœ— (list failed items)

Recommendation: <fix HIGH findings before merging / safe to merge with noted caveats>

Guardrails

  • Never mark a HIGH finding as acceptable without explicit user confirmation.
  • Never add a dependency to fix a security issue without verifying the dependency itself is not a bigger risk.
  • If a security fix requires a design change (e.g. the entire auth model is wrong), surface it as a separate task β€” do not silently work around it.
  • Do not remove or disable security linting rules to make CI pass.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.