Let AI build.Keep secrets yours.

A local security layer between your project and your AI tools. Detect sensitive data, mask what you share, and stop risky actions before they run.

  • Open source, MIT license
  • CLI for macOS · Windows · Linux
  • No network calls during checks

Works with your coding tools

  • Claude Code
  • Cursor
  • Codex
  • GitHub Copilot
  • Antigravity
  • Windsurf

Catch it before it leaves.

AI tools read your files, take your prompts, and run shell commands. shk adds a check at each of those points, before anything leaves your machine.

$ shk scan .DETECTED
INPUT
src/config.tsOPENAI_API_KEY = "••••••••••••" 
SHK RESULT
HIGH  secret.openai_api_keysrc/config.ts:121 finding · value not displayed

Find the rule and location. The matched secret stays out of the scan output.

Illustrative example only.

Use the same policy from scans to CI.

From your first prompt to your next pull request, keep your security checks connected.

Detection is pattern-based: hand-tuned rules plus rules adapted from the gitleaks defaults. Image-only PDFs are reported as skipped, not scanned. Treat shk as the check at the AI-tool boundary, not as your only secret scanner.

Review your projects in shk Desktop.

The same Rust engine. A thoughtfully simple desktop app. Scan projects, mask prompts, and review blocked AI activity in one place.

  • Quick Setup applies the policy, .gitignore patterns, hooks, .env encryption, and agent skills in one step
  • AI Mask workspace for prompts and Office documents, with a shortcut to the AI app you use
  • OS notifications when a hook blocks an agent, with file paths kept out of the banner
shk DesktopLOCAL
WORKSPACE~/projects

backend-api

Processed on your machine
Project / backend-api3 findings
Blocked AI activity
ToolReasonWhen
cursorpreaction_guardsecret_dump_command2m
claude-codeuser-promptfinding_thresholdsecret.openai_api_key14m
codexprefinding_thresholdpii.ja.my_number1h
windsurfpreaction_guardexternal_transfer3h
Desktop interface preview · illustrative data

LOCAL BY DESIGN

Sensitive data checks.On your machine.

Check sensitive data without sending it away. Scanning, masking, and hook checks all run on your machine.

Explore the safety design
  1. No network access during scans

    Scans, masking, and hook checks read local files only. Update checks happen only when you run shk status or shk doctor version.

  2. Audit logs hold metadata only

    Audit logs record metadata such as finding counts and rule IDs. Matched values, prompt bodies, and command text are never retained.

  3. Verify what you install

    Release archives ship with SHA256 checksums and GitHub artifact attestations. The generated CI workflow verifies both before installing.

Install the CLI

Start with a read-only scan. See the findings, tune your policy, then enable the hooks.

npm install -g security-harness-kit
Install the CLI
  1. 01

    Create the policy

    Writes shk.toml with default rules and thresholds. If package.json is present it can also pin ignore-scripts and a release age gate for npm, pnpm, Yarn, and Bun.

    shk init
  2. 02

    Scan the project

    Prints findings with severity, rule ID, and location. Exit codes are stable, so the same command works in a pre-commit hook and in CI.

    shk scan .
  3. 03

    Install the hooks

    Registers shk as a pre-hook in each AI tool you use. Start with --audit to observe, then remove the flag to block.

    shk hooks install-ai --audit

Questions

Does shk send my code or prompts anywhere?

No. Scanning, masking, hook checks, and MCP audits run on your machine and read local files only. Network access is limited to the optional version check in shk status and shk doctor version, and to commands that exist to talk to a service you choose, such as shk secrets push or the 1Password backend for shk env.

Is shk free?

Yes. shk is open source under the MIT license, and both the CLI and shk Desktop are free to use. The source code and every release archive are published on GitHub.

Which platforms are supported?

The CLI runs on macOS (Intel and Apple Silicon), Linux (x86_64 and aarch64), and Windows x86_64, installed with npm, Homebrew, or the installer scripts. shk Desktop ships for the same platforms. macOS builds are signed and notarized; the Windows installer is not yet code-signed.

How is this different from gitleaks or a hosted secret scanner?

shk is built for the AI-tool boundary: it masks prompts, blocks agent actions, and audits MCP configuration in addition to scanning files. Its detection is pattern-based and includes rules adapted from the gitleaks defaults, so treat it as a local guardrail rather than a replacement for a dedicated scanning platform.

Which files and formats are covered?

Source code, Markdown, plain text, dotenv files, .docx, .xlsx, .pptx, and PDFs with a text layer. Image-only PDFs are reported as skipped rather than silently ignored.

What exactly do the hooks block?

Two things. Content that matches secret or PII rules above your threshold, and actions the guard classifies as dangerous: sensitive file reads and writes, secret and environment dumps, recursive deletes, database mutations, privilege changes, outbound transfers, package manager and system installs, and, in the strict profile, opaque execution such as bash -c. Both are configurable in shk.toml, and --audit mode records without blocking.

Start with a project scan.

Give your AI workflow a local security boundary.