AIPM
Theme

AIPM package

Gravitas Security

@udaysharmadev/gravitas-security@1.0.0

>

Scanned · no issues · Oct 18, 2026

GitHub stars: ★ 243

LinkedInPost

Install Skill

Pins this version in aipm.package.json and aipm-lock.json.

aipm add @udaysharmadev/gravitas-security@1.0.0

Without project tracking

Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.

aipm add @udaysharmadev/gravitas-security@1.0.0 --no-init

How to use

Install the skill above, then run this in your AI tool:

/gravitas-security <your description>

About

Deep security review mode. Load in addition to `skills/gravitas/SKILL.md`. All security tasks are **Tier 2** minimum. No exceptions.

Source

What gets added to your project

Preview every file this package writes on install before you run the command above.

Summary

>

Skill instructions

GRAVITAS — Security Extension

Deep security review mode. Load in addition to skills/gravitas/SKILL.md. All security tasks are Tier 2 minimum. No exceptions.


Security Recon Additions

Beyond standard recon, always check:

bash
# SQL injection patterns
grep -rn "query.*\$\{" src/ --include="*.ts"
grep -rn "execute.*+.*req\." src/ --include="*.ts"
grep -rn "\.raw\|\.execute\|\.query" src/ --include="*.ts" | grep -v parameterized

# XSS patterns
grep -rn "innerHTML\|outerHTML\|document\.write\|insertAdjacentHTML" src/ --include="*.ts"
grep -rn "dangerouslySetInnerHTML" src/ --include="*.tsx"

# Hardcoded secrets
grep -rn "password\s*=\s*['\"]" src/ --include="*.ts"
grep -rn "api.key\s*=\s*['\"]" src/ --include="*.ts"
grep -rn "secret\s*=\s*['\"]" src/ --include="*.ts"
grep -rn "token\s*=\s*['\"]" src/ --include="*.ts"

# Auth bypass
grep -rn "skipAuth\|bypassAuth\|noAuth\|isAdmin.*=.*true" src/ --include="*.ts"

# Mass assignment
grep -rn "Object\.assign.*req\.body\|spread.*req\.body\|\.create(req\.body)" src/

# Insecure direct object reference
grep -rn "req\.params\.id\|req\.query\.id" src/ -A 3 | grep -v "userId.*session"

# Path traversal
grep -rn "readFile.*req\.\|__dirname.*req\." src/

OWASP Top 10 Checklist

For every security change, verify:

code
□ A01 Broken Access Control    — auth checked before data access
□ A02 Cryptographic Failures   — no plaintext passwords/secrets
□ A03 Injection                — parameterized queries everywhere
□ A04 Insecure Design          — threat model considered
□ A05 Security Misconfiguration— no debug mode in prod, no default creds
□ A06 Vulnerable Components    — no known-vulnerable dependencies
□ A07 Auth/Session Failures    — session invalidated on logout
□ A08 Software/Data Integrity  — dependencies verified, no eval()
□ A09 Security Logging         — auth failures logged, no PII in logs
□ A10 SSRF                     — no unvalidated URL fetching

Security Anti-Patterns

Injection (A03)

typescript
BAD:  db.query(`SELECT * FROM users WHERE id = ${req.params.id}`)
BAD:  db.query("SELECT * FROM users WHERE id = " + id)
GOOD: db.query('SELECT * FROM users WHERE id = $1', [id])

Broken Auth (A07)

typescript
BAD:  if (req.headers['x-admin'] === 'true') { grantAdmin(); }
BAD:  const user = { ...req.body, isAdmin: false }; // mass assignment — override possible
GOOD: const user = { username: req.body.username, email: req.body.email }; // explicit allowlist

Hardcoded Secrets (A02)

typescript
BAD:  const JWT_SECRET = 'mysecretkey123';
GOOD: const JWT_SECRET = process.env.JWT_SECRET;
      if (!JWT_SECRET) throw new Error('JWT_SECRET not set');

Missing Auth Check (A01)

typescript
BAD:  router.delete('/users/:id', async (req, res) => {
        await deleteUser(req.params.id); // no auth check!
      });
GOOD: router.delete('/users/:id', requireAuth, requireAdmin, async (req, res) => {
        await deleteUser(req.params.id);
      });

Required Security Tests

Every security fix must include tests that demonstrate the vulnerability is fixed:

typescript
describe('SQL injection prevention', () => {
  const payloads = [
    "'; DROP TABLE users; --",
    "' OR '1'='1",
    "' UNION SELECT password FROM admins --",
    "1; UPDATE users SET password = 'hacked'",
    "' OR 1=1 --",
  ];

  payloads.forEach(payload => {
    it(`blocks: ${payload.slice(0, 30)}...`, async () => {
      const result = await searchUsers(payload);
      expect(result).toEqual([]); // no data leaked, no crash
    });
  });
});

describe('Auth protection', () => {
  it('returns 401 on missing auth token', async () => {
    const res = await request(app).delete('/users/1');
    expect(res.status).toBe(401);
  });
  it('returns 403 on insufficient permissions', async () => {
    const res = await request(app)
      .delete('/users/1')
      .set('Authorization', `Bearer ${regularUserToken}`);
    expect(res.status).toBe(403);
  });
});

Security Verification Chain

bash
# Standard chain
tsc --noEmit && eslint . --max-warnings 0 && vitest run

# Security-specific grep checks
grep -rn "query.*\${" src/ --include="*.ts" | wc -l    # should be 0
grep -rn "innerHTML" src/ --include="*.ts" | wc -l     # should be 0
grep -rn "password.*['\"]" src/ --include="*.ts"       # should be 0

# Dependency audit
npm audit --audit-level=high                            # 0 high/critical

# Report
echo "Injection patterns: $(grep -rn "query.*\${"  src/ | wc -l) (want: 0)"
echo "XSS patterns:       $(grep -rn "innerHTML"    src/ | wc -l) (want: 0)"
echo "npm audit high:     $(npm audit --audit-level=high 2>&1 | grep 'found 0')"

VERDICT for Security Tasks

Security VERDICT requires ALL of:

  • Standard: tests pass, lint clean, types clean
  • Security: 0 injection patterns found
  • Security: security tests present and passing
  • Security: no new hardcoded secrets
  • Security: npm audit 0 high/critical
code
VERDICT: PASS (Security)

Tests:     47/47 (5 new security tests)
Lint:      clean
Types:     clean
Injection: 0 patterns found
Secrets:   0 hardcoded found
Audit:     0 high/critical vulnerabilities

Loading package files…

Share this package

Add an Install with AIPM badge

Add this badge to a GitHub README so readers can open the package page and install the same version.

Install with AIPM
[![Install with AIPM](https://www.aipm-registry.com/install-with-aipm.svg)](https://www.aipm-registry.com/skills/udaysharmadev/gravitas-security/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)

Publisher

Uday Sharma

This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.

AI assistant context

What this skill is for

@udaysharmadev/gravitas-security@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: >

Install
aipm add @udaysharmadev/gravitas-security@1.0.0
Use after install
/gravitas-security <your description>

Tool targets

Install command by target

Add --no-init to any of these when you want the skill files without aipm.package.json or aipm-lock.json.

cursor

Run this variant when you want to install the package into cursor.

aipm add @udaysharmadev/gravitas-security@1.0.0 --target cursor --ci

claude

Run this variant when you want to install the package into claude.

aipm add @udaysharmadev/gravitas-security@1.0.0 --target claude --ci

Discussion

Comments (0)

Loading comments…

Package FAQ

Install and compatibility

How to install
Run aipm add @udaysharmadev/gravitas-security@1.0.0 in a project that has AIPM initialized.
Supported tools
@udaysharmadev/gravitas-security@1.0.0 supports All tools.

Before installing

AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.