Security

From DNYoussef/context-cascade · View interactive version

Security is an AI agent skill from the GitHub repository DNYoussef/context-cascade. [assert|neutral] Security specialists hub for application security, vulnerability assessment, and secure coding. Routes to specialists for OWASP, penetration testing, and security hardening. Use for security audits, v [ground:given] [conf:0.95] [state:confirmed]

How to use this skill

Skill file

/============================================================================/

/* SECURITY SKILL :: VERILINGUA x VERIX EDITION */

/============================================================================/


name: security

version: 2.2.0

description: |

[assert|neutral] Security specialists hub for application security, vulnerability assessment, and secure coding. Routes to specialists for OWASP, penetration testing, and security hardening. Use for security audits, v [ground:given] [conf:0.95] [state:confirmed]

category: security

tags:

author: system

cognitive_frame:

primary: evidential

goal_analysis:

first_order: "Execute security workflow"

second_order: "Ensure quality and consistency"

third_order: "Enable systematic security processes"


/----------------------------------------------------------------------------/

/* S0 META-IDENTITY */

/----------------------------------------------------------------------------/

[define|neutral] SKILL := {

name: "security",

category: "security",

version: "2.2.0",

layer: L1

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S1 COGNITIVE FRAME */

/----------------------------------------------------------------------------/

[define|neutral] COGNITIVE_FRAME := {

frame: "Evidential",

source: "Turkish",

force: "How do you know?"

} [ground:cognitive-science] [conf:0.92] [state:confirmed]

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

/----------------------------------------------------------------------------/

/* S2 TRIGGER CONDITIONS */

/----------------------------------------------------------------------------/

[define|neutral] TRIGGER_POSITIVE := {

keywords: ["security", "security", "workflow"],

context: "user needs security capability"

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S3 CORE CONTENT */

/----------------------------------------------------------------------------/

Security

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

Central hub for application security, vulnerability assessment, and secure coding practices.

Phase 0: Expertise Loading

expertise_check:
  domain: security
  file: .claude/expertise/security.yaml

  if_exists:
    - Load vulnerability patterns
    - Load OWASP guidelines
    - Apply security baselines

  if_not_exists:
    - Flag discovery mode
    - Document patterns learned

Cognitive Frame Activation

Kanitsal Guvenlik Denetimi (Evidential Security Audit)

Every security finding MUST include evidence. No vulnerabilities without proof.

Evidence Structure:

vulnerability:
  id: VULN-001
  cve_cwe: "CWE-89 (SQL Injection)" or "CVE-2024-12345"
  lokasyon: "[file:line] src/api/users.js:42"
  kanit: |
    Proof of concept:
    curl -X POST /api/login -d "username=admin' OR '1'='1"
    Result: Bypassed authentication
  siddet: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (Score: 9.8)"
  evidence_type: "[DOGRUDAN]"

Evidence Type Taxonomy:

Mandatory Fields:

  1. CVE/CWE: Standard vulnerability reference
  2. LOKASYON: Exact code location [file:line]
  3. KANIT: Proof of concept or exploit evidence
  4. SIDDET: CVSS score with vector breakdown

Al-Itar al-Sarfi lil-Amn (Security Attack Morphology)

Decompose attack vectors into root causes. Fix the ROOT, not symptoms.

Attack Vector Decomposition Template:

attack_morphology:
  vector: "SQL Injection (A03:2021)"

  decomposition:
    ROOT:
      type: "Insufficient Input Validation"
      location: "src/db/queries.js"
      pattern: "String concatenation in SQL queries"

    DERIVED_1:
      from: ROOT
      type: "User-Controlled Query Parameter"
      location: "req.body.username (unvalidated)"

    DERIVED_2:
      from: ROOT
      type: "Missing Parameterized Queries"
      location: "db.query() uses template literals"

    DERIVED_3:
      from: DERIVED_1
      type: "No Allowlist Validation"
      location: "Username accepts special characters"

  remediation:
    target: ROOT
    fix: "Implement parameterized queries (prepared statements)"
    cascading_fixes:
      - "Add input validation schema (Joi/Yup)"
      - "Implement allowlist for usernames"
      - "Remove string concatenation in all queries"

    why_not_symptom: |
      Escaping special characters (DERIVED_3) treats symptom.
      Using parameterized queries (ROOT) prevents vulnerability class.

Morphological Rules:

  1. Identify ROOT cause (the fundamental flaw)
  2. Map DERIVED vulnerabilities (cascading from ROOT)
  3. Target ROOT in remediation (fix once, prevent many)
  4. Explain why not symptom (justify root cause focus)

When to Use This Skill

Use security when:

Security Finding Template (Evidence-Based)

Use this template for ALL security findings:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.