मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी48k · #5693

security-and-hardening

यह क्या करती है

यह स्किल आपके कोड को और सुरक्षित बनाने में मदद करती है, ताकि वह हमलों और डेटा लीक से बचा रहे। यह सिस्टम के बाहर से आने वाली जानकारी को संभालने के तरीके सिखाती है, जैसे यूज़र का डेटा या दूसरी सर्विसेज़ के साथ इंटीग्रेशन।

कब इस्तेमाल करें

  • ✓ऐसे फॉर्म बनाते समय जो यूज़र की जानकारी लेते हैं।
  • ✓लॉगिन सिस्टम और अनुमतियाँ (permissions) लागू करते समय।
  • ✓पेमेंट जानकारी जैसा ज़रूरी डेटा स्टोर करने या भेजने के समय।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/security-and-hardening/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/security-and-hardening/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरी वेबसाइट पर फॉर्म में यूज़र जो डेटा भेजते हैं, वह सिक्योरिटी की कोई समस्या न पैदा करे, इसके लिए मैं क्या करूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल आपको हमलावर की तरह सोचना सिखाती है, ताकि कमज़ोर जगहें पहचानी जा सकें। यह सिस्टम में आने वाली हर जानकारी की जाँच करने, पासवर्ड सुरक्षित रखने और सुरक्षित कनेक्शन इस्तेमाल करने का सुझाव देती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Security and Hardening

Overview

Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.

When to Use

  • Building anything that accepts user input
  • Implementing authentication or authorization
  • Storing or transmitting sensitive data
  • Integrating with external APIs or services
  • Adding file uploads, webhooks, or callbacks
  • Handling payment or PII data

Process: Threat Model First

Controls bolted on without a threat model are guesses. Before hardening, spend five minutes thinking like an attacker:

  1. Map the trust boundaries. Where does untrusted data cross into your system? HTTP requests, form fields, file uploads, webhooks, third-party APIs, message queues, and LLM output. Every boundary is attack surface.
  2. Name the assets. What's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
  3. Run STRIDE over each boundary — a quick lens, not a ceremony:
Threat Ask Typical mitigation
Spoofing Can someone impersonate a user/service? Authentication, signature verification
Tampering Can data be altered in transit or at rest? Integrity checks, parameterized queries, HTTPS
Repudiation Can an action be denied later? Audit logging of security events
Information disclosure Can data leak? Encryption, field allowlists, generic errors
Denial of service Can it be overwhelmed? Rate limiting, input size caps, timeouts
Elevation of privilege Can a user gain rights they shouldn't? Authorization checks, least privilege
  1. Write abuse cases next to use cases. For each feature, ask "how would I misuse this?" — then make that your first test.

If you can't name the trust boundaries for a feature, you're not ready to secure it. This is OWASP A04: Insecure Design — most breaches begin in design, not code.

The Three-Tier Boundary System

Always Do (No Exceptions)

  • Validate all external input at the system boundary (API routes, form handlers)
  • Parameterize all database queries — never concatenate user input into SQL
  • Encode output to prevent XSS (use framework auto-escaping, don't bypass it)
  • Use HTTPS for all external communication
  • Hash passwords with bcrypt/scrypt/argon2 (never store plaintext)
  • Set security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
  • Use httpOnly, secure, sameSite cookies for sessions
  • Run npm audit (or equivalent) before every release

Ask First (Requires Human Approval)

  • Adding new authentication flows or changing auth logic
  • Storing new categories of sensitive data (PII, payment info)
  • Adding new external service integrations
  • Changing CORS configuration
  • Adding file upload handlers
  • Modifying rate limiting or throttling
  • Granting elevated permissions or roles

Never Do

  • Never commit secrets to version control (API keys, passwords, tokens)
  • Never log sensitive data (passwords, tokens, full credit card numbers)
  • Never trust client-side validation as a security boundary
  • Never disable security headers for convenience
  • Never use eval() or innerHTML with user-provided data <!-- security-allowlist: defensive hardening guidance -->
  • Never store sessions in client-accessible storage (localStorage for auth tokens)
  • Never expose stack traces or internal error details to users

OWASP Top 10 Prevention Patterns

These are prevention patterns, not a ranking. For a task-focused review checklist, see references/security-checklist.md.

Injection (SQL, NoSQL, OS Command)

// BAD: SQL injection via string concatenation
const query = `SELECT * FROM users WHERE id = '${userId}'`;

// GOOD: Parameterized query
const user = await db.query('SELECT * FROM users WHERE id = $1', [userId]);

// GOOD: ORM with parameterized input
const user = await prisma.user.findUnique({ where: { id: userId } });

Broken Authentication

// Password hashing
import { hash, compare } from 'bcrypt';

const SALT_ROUNDS = 12;
const hashedPassword = await hash(plaintext, SALT_ROUNDS);
const isValid = await compare(plaintext, hashedPassword);

// Session management
app.use(session({

…
अक्सर पूछे जाने वाले सवाल

'vulnerabilities' क्या होती हैं?

ये कोड में मौजूद खामियाँ होती हैं, जिनका फायदा उठाकर बुरे इरादे वाले लोग डेटा चुरा सकते हैं, सिस्टम को नुकसान पहुँचा सकते हैं या बिना अनुमति एक्सेस पा सकते हैं।

यूज़र इनपुट की जाँच (validate) करना क्यों ज़रूरी है?

क्योंकि बाहर से आने वाली जानकारी में खतरनाक कोड या गलत डेटा हो सकता है, जो सिस्टम को तोड़ सकता है या हमले में इस्तेमाल हो सकता है।

'पासवर्ड को प्लेन टेक्स्ट में स्टोर न करें' का क्या मतलब है?

इसका मतलब है कि पासवर्ड को डेटाबेस में सेव करने से पहले hash function से 'स्क्रैम्बल' कर देना चाहिए, ताकि डेटाबेस तक पहुँच होने पर भी कोई असली पासवर्ड न पढ़ सके।

जानकारी

लेखक का मूल विवरण

Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services.

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#5693
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills