{
  "capability_id": "typescript-quality-hooks",
  "capability_type": "skill",
  "status": "FINDINGS",
  "methodology_version": "1.0",
  "categories_tested": [
    "prompt_injection_chains",
    "privilege_escalation",
    "data_exfiltration_side_channels",
    "capability_squatting",
    "context_poisoning",
    "dependency_confusion"
  ],
  "test_counts": {
    "patterns_analyzed": 14
  },
  "findings": [
    {
      "id": "ADV-2026-0001",
      "category": "privilege_escalation",
      "capability_tested": "typescript-quality-hooks",
      "capability_version": "latest",
      "capability_type": "skill",
      "severity": "high",
      "classification": "warn",
      "status": "confirmed",
      "summary": "Quality hook enables blanket suppression of security tooling through configuration",
      "description": "The skill provides extensive configuration options to completely disable security tools including TypeScript compilation checks, ESLint, and Prettier. The configuration system allows blanket suppression via environment variables (CLAUDE_HOOKS_TYPESCRIPT_ENABLED=false, CLAUDE_HOOKS_ESLINT_ENABLED=false) and config files. Additionally, it includes an 'autofixSilent' mode that suppresses error output, hiding security tool findings from users. While the skill doesn't directly suppress security-specific rules, the ability to completely disable TypeScript type checking and ESLint (which includes security rules) creates a significant attack surface where malicious code could bypass all static analysis.",
      "reproduction": {
        "steps": [
          "Analyze skill instructions against adversarial taxonomy"
        ],
        "inputs_used": [],
        "observed_behavior": "typescriptEnabled: process.env.CLAUDE_HOOKS_TYPESCRIPT_ENABLED !== undefined ? process.env.CLAUDE_HOOKS_TYPESCRIPT_ENABLED !== 'false' : (fileConfig.typescript?.enabled ?? true), eslintEnabled: process.env.CLAUDE_HOOKS_ESLINT_ENABLED !== undefined ? process.env.CLAUDE_HOOKS_ESLINT_ENABLED !== 'false' : (fileConfig.eslint?.enabled ?? true), autofixSilent: process.env.CLAUDE_HOOKS_AUTOFIX_SILENT !== undefined ? process.env.CLAUDE_HOOKS_AUTOFIX_SILENT === 'true' : (fileConfig.general?.autofixSilent ?? false)",
        "expected_behavior": "No adversarial patterns in skill instructions"
      },
      "impact": "The skill provides extensive configuration options to completely disable security tools including TypeScript compilation checks, ESLint, and Prettier. The configuration system allows blanket suppression via environment variables (CLAUDE_HOOKS_TYPESCRIPT_ENABLED=false, CLAUDE_HOOKS_ESLINT_ENABLED=false) and config files. Additionally, it includes an 'autofixSilent' mode that suppresses error output, hiding security tool findings from users. While the skill doesn't directly suppress security-specific rules, the ability to completely disable TypeScript type checking and ESLint (which includes security rules) creates a significant attack surface where malicious code could bypass all static analysis.",
      "recommendation": "Remove or restrict the ability to completely disable security tooling. Instead of allowing blanket suppression, only allow granular rule-level configuration for non-security rules. Remove the autofixSilent option that hides tool output. Consider making TypeScript and ESLint always-on with only formatting tools like Prettier being optional.",
      "tested_at": "2026-04-01T04:07:58.572Z",
      "tested_by": "llm_assisted",
      "added_to_library": false
    },
    {
      "id": "ADV-2026-0002",
      "category": "dependency_confusion",
      "capability_tested": "typescript-quality-hooks",
      "capability_version": "latest",
      "capability_type": "skill",
      "severity": "high",
      "classification": "warn",
      "status": "confirmed",
      "summary": "Skill executes Node.js commands without declaring Node.js dependencies",
      "description": "The skill's hook configuration executes 'node .claude/hooks/vscode-extension/quality-check.js' but does not declare Node.js or any npm packages as dependencies. The script imports multiple Node.js modules (fs, path, crypto) and attempts to dynamically require project-local packages (eslint, prettier, typescript) without these being listed in the skill's declared dependencies.",
      "reproduction": {
        "steps": [
          "Analyze skill instructions against adversarial taxonomy"
        ],
        "inputs_used": [],
        "observed_behavior": "\"command\": \"node .claude/hooks/vscode-extension/quality-check.js\" and code like \"({ ESLint } = require(path.join(projectRoot, 'node_modules', 'eslint')));\" and \"prettier = require(path.join(projectRoot, 'node_modules', 'prettier'));\" and \"ts = require(path.join(projectRoot, 'node_modules', 'typescript'));\"",
        "expected_behavior": "No adversarial patterns in skill instructions"
      },
      "impact": "The skill's hook configuration executes 'node .claude/hooks/vscode-extension/quality-check.js' but does not declare Node.js or any npm packages as dependencies. The script imports multiple Node.js modules (fs, path, crypto) and attempts to dynamically require project-local packages (eslint, prettier, typescript) without these being listed in the skill's declared dependencies.",
      "recommendation": "Declare all required dependencies in the skill metadata, including Node.js runtime and any npm packages the script attempts to load (eslint, prettier, typescript, glob). Consider making these explicit requirements rather than optional dynamic imports.",
      "tested_at": "2026-04-01T04:07:58.572Z",
      "tested_by": "llm_assisted",
      "added_to_library": false
    }
  ],
  "summary": {
    "patterns_analyzed": 14,
    "categories_tested": [
      "prompt_injection_chains",
      "privilege_escalation",
      "data_exfiltration_side_channels",
      "capability_squatting",
      "context_poisoning",
      "dependency_confusion"
    ],
    "findings_count": 2,
    "findings_by_severity": {
      "critical": 0,
      "high": 2,
      "medium": 0,
      "low": 0,
      "informational": 0
    },
    "findings_by_classification": {
      "block": 0,
      "warn": 2,
      "review": 0,
      "info": 0
    },
    "findings_deduplicated": 0,
    "duration_ms": 29128,
    "api_usage": {
      "total_input_tokens": 58285,
      "total_output_tokens": 825,
      "calls": 6
    }
  }
}