Talarurus

HAMMERHEAD / SEPARATE FULL-GIT 0.2.0-dev PREVIEW

Full-Git preview.
Separate from Core.

This page preserves the original experimental full-Git developer preview for controlled testing. It is not the released Core product. Read Core 0.2.0-core.1 documentation →

Core is available separately. Download the experimental macOS ARM64 Core prerelease. Core has six rules and no native Git execution; GIT-002 is NOT EVALUATED. Full-Git functionality remains unqualified; A1-003 is open and B4 is blocked.

Build the separate full-Git developer preview

0.2.0-dev is experimental. Full untrusted-repository security qualification and release CI are still pending. Use controlled fixtures and development environments. A local smoke test is not a security release qualification.

Prerequisites: macOS or Linux, Git, and Go 1.26.0 or newer. This capture used installed Go 1.26.9 on macOS Apple Silicon. The source targets macOS and Linux on ARM64 and AMD64; other native runtimes were not exercised by this demonstration.

Use the existing checkout if already present. For a new checkout, clone the official source below. Pin to the reviewed development commit, then compare git rev-parse HEAD with the full hash before building. Do not substitute a moving branch tip.

Reviewed commit: 4fa1018b13ed4b8b6af194a326105e098dc8118f

git clone --branch v0.2-dev https://github.com/talarurus/hammerhead.git
cd hammerhead
git checkout --detach 4fa1018b13ed4b8b6af194a326105e098dc8118f
git rev-parse HEAD
preview_dir=$(mktemp -d)
go build -mod=readonly -trimpath \
  -ldflags "-X github.com/talarurus/hammerhead/internal/cli.Version=0.2.0-dev -X github.com/talarurus/hammerhead/internal/cli.Commit=4fa1018b13ed4b8b6af194a326105e098dc8118f" \
  -o "$preview_dir/hammerhead" ./cmd/hammerhead
"$preview_dir/hammerhead" version
"$preview_dir/hammerhead" --help

The binary is written to a temporary directory outside the source tree. Go may retrieve module dependencies when they are absent from its local cache. This full-Git preview is source-build only. The separate Core 0.2.0-core.1 binary is now published; it omits native Git execution.

Expected version:

hammerhead version 0.2.0-dev (commit: 4fa1018b13ed4b8b6af194a326105e098dc8118f)

Browse the pinned source ↗ · Core downloads and platform status →

Run a controlled audit

Create demo-repository from the synthetic fixture specification. In the directory containing it, run the temporary binary built above:

"$preview_dir/hammerhead" audit ./demo-repository
"$preview_dir/hammerhead" audit ./demo-repository --quiet

Write JSON outside the audited tree and retain the scanner’s status. The following block uses shell variables from the build step:

report_dir=$(mktemp -d)
if "$preview_dir/hammerhead" audit ./demo-repository --output json > "$report_dir/audit.json"; then
  audit_status=0
else
  audit_status=$?
fi
printf 'Hammerhead exit: %s\nReport: %s\n' "$audit_status" "$report_dir/audit.json"

The intentional Security findings in this fixture produce exit 1. In automation, propagate audit_status after inspecting or storing the report. A setup or output failure may leave no complete JSON document.

Reports and exit status

Default output is terminal. --quiet sends compact findings to stdout and status, coverage, and diagnostics to stderr. --output json writes one hammerhead/v0.2 document to stdout when output succeeds.

  • 0: completed scan; no Security finding met the threshold, or finding failure was disabled.
  • 1: completed scan; a Security finding met --fail-on (high by default).
  • 2: partial, failed, or cancelled scan; invalid invocation; or output failure. This overrides finding status.

--fail-on none suppresses finding exit 1 only. Hygiene and Info never trigger exit 1. Partial results can retain useful findings; they do not establish a completed audit.

Read status, threshold, coverage, and diagnostics together. Coverage records applied exclusions and limits, observed traversal, per-check work, reasons for incomplete work, and truncation. It is not a percentage of repository safety. A completed scan is complete within its declared policy.

Verified demonstration

Built and run on macOS Apple Silicon on 14 October 2026 from commit 4fa1018b13ed. The ordinary synthetic directory contains four files and no Git metadata; the key header is deliberately invalid key data.

  • Terminal, quiet, and JSON: completed, exit 1; 4 findings (2 Security/high, 1 Hygiene/low, 1 Info/info).
  • Coverage: 5 examined entries, 4 files, 2 directories including the root; inventory and root listing complete.
  • 7 checks attempted: 6 completed, GIT-002 not applicable. No truncation, incomplete reasons, or diagnostics.
  • The same scan with --fail-on none: completed, exit 0. A separate depth-limit fixture: partial, exit 2 even with that flag. A nonexistent target: exit 2.

Full terminal capture · Quiet stdout · Quiet stderr · Full JSON report · Fixture · Capture provenance

Only the absolute fixture root is normalized to <fixture-root>/demo-repository in the full terminal and JSON captures. Findings and counts are unchanged. The product page shows quiet stdout, an explicitly labeled stderr excerpt, and selected JSON fields. Historical v0.1.0 output retains its original wording and schema.

Security model

Hammerhead inspects the working tree without running the target’s build scripts, package managers, hooks, or binaries. It reads repository data and can invoke the installed Git executable for constrained repository context. Native guarded reads and traversal policy are defense in depth; Hammerhead is not an OS sandbox.

Use a trusted Git installation and ordinary controlled local filesystems. Hard links, mount crossings, filesystem behavior, and uninterruptible kernel I/O limit containment and cancellation guarantees. Do not use this preview as authorization to execute an untrusted repository.

Seven full-Git developer-preview checks

Seven checks in the separate full-Git 0.2.0-dev preview
RuleChecks forClass
FILE-001Potential sensitive files by filenameSecurity
FILE-002Files above the configured size thresholdHygiene
GIT-001Root .gitignore and supported textual patternsHygiene
GIT-002Dirty worktree and detached HEAD context, when applicableInfo
PROJ-001Recognized root README and license filenamesHygiene
PROJ-002Project ecosystem hints from manifest filenamesInfo
SEC-001Supported private-key headers and credential patterns in eligible textSecurity

This table describes the separate preview. Core includes six rules and omits GIT-002.

Full-Git preview limitations

  • Current working tree only; no Git-history, CVE/dependency-database, or semantic SAST scan.
  • Filename, header, assignment, and manifest observations are heuristics. Credentials are not validated; validity, pairing, exposure, tracking, and compromise are not established.
  • Gitignore checks inspect supported textual patterns; they do not evaluate Git’s full ignore behavior. License filename detection does not evaluate legal suitability.
  • Archives are not unpacked. Binary content and SEC-001 files above 5 MiB are outside normal secret-content inspection. Built-in and user exclusions reduce scope.
  • Default bounds include depth 50, 100,000 examined entries, 10 MiB per native read, 256 MiB aggregate native reads, 10,000 retained findings, and a five-minute scan deadline. --max-file-size changes FILE-002’s large-file threshold, not those content-read bounds.
  • Unreadable or changed eligible files, exhausted budgets, check failures, and available Git operations that fail can make the scan partial. No whole-process memory cap or guaranteed interruption of blocked I/O is promised.

The seven full-Git preview checks → · Report vulnerabilities privately →

Command help

Actual hammerhead audit --help output from this build:

Audit inspects the target directory for security risks including
sensitive files, credential exposure, and repository hygiene issues.

Completed scans exit 1 when a Security finding meets --fail-on (high by default).
Incomplete scans and output failures exit 2, including with --fail-on none.
Quiet mode sends compact findings to stdout and status/coverage to stderr.

Usage:
  hammerhead audit [path] [flags]

Flags:
  -e, --exclude stringArray    Exclude paths matching pattern (repeatable)
      --fail-on string         Security severity for exit 1: critical, high, medium, low, info, none (operational failures exit 2) (default "high")
  -h, --help                   help for audit
      --max-file-size string   Override large file threshold for FILE-002 (e.g. 50MB, 10MB)
  -o, --output string          Output format: terminal, json (default "terminal")
  -q, --quiet                  Quiet mode: print compact findings without decorative banners