Skip to main content

Hardpoint

Hardpoint is a static security scanner designed specifically for AI-assisted development environments. It detects the Rules File Backdoor attack - malicious instructions hidden in AI configuration files that are invisible to developers but executed by AI coding assistants.

Why Hardpoint?

AI coding assistants like Cursor, Claude Code, and GitHub Copilot read configuration files to understand your project. Attackers can exploit this by:
  • Hiding malicious instructions in comments that AI models still read
  • Embedding command injection in mcp.json server configurations
  • Encoding payloads in Base64 to evade visual inspection
  • Backdooring git hooks to exfiltrate credentials
Hardpoint scans for these threats with 9 detection rules across 2 specialized scanners.

Quick Start

# Install
go install github.com/dotsetlabs/hardpoint/cmd/hardpoint@latest

# Scan current directory
hardpoint scan

# Scan specific path
hardpoint scan /path/to/project

Detection Rules

RuleSeverityDescription
AI-008CriticalSemantic Hijacking - 80+ obfuscation-resistant patterns
AI-005CriticalCommand Injection in MCP configurations
AI-004MediumEncoded Instructions (Base64 payloads)
GIT-001CriticalMalicious Git Hook Pattern
GIT-002CriticalCredential Exfiltration in Hook
GIT-003MediumNetwork Access in Git Hook
GIT-004HighObfuscated Git Hook Content
GIT-005MediumSuspicious Git Remote URL
GIT-006HighSuspicious Credential Helper

Scanners

ScannerTarget FilesThreats Detected
AI.cursorrules, CLAUDE.md, mcp.json, .github/copilot-instructions.mdSemantic hijacking, command injection, encoded content
Git.git/hooks/*, .git/configMalicious hooks, credential exfiltration, suspicious remotes

Output Formats

# Human-readable (default)
hardpoint scan

# JSON for tooling
hardpoint scan --output json

# SARIF for GitHub Code Scanning
hardpoint scan --output sarif > results.sarif

Key Features

  • Zero network access - All scanning happens locally
  • Semantic analysis - Detects Rules File Backdoor attacks with 80+ patterns
  • Obfuscation resistant - Handles leet speak, homoglyphs, Unicode normalization
  • Trust/verify system - HMAC-SHA256 baselines for AI config integrity
  • CI integration - Exit codes and SARIF output for automated pipelines

Next Steps