Category: ScannerGoMITv0.1.0

hookjack

Static scanner for commands that AI assistants and IDEs run on their own when you open a repository. It reads hooks, MCP configs, folder-open tasks, devcontainers and install scripts, and it does not execute them.

go install github.com/ucsurf/hookjack/cmd/hookjack@latest

View on GitHubRelease v0.1.0

What it does

Opening a repository can run project-supplied commands before you ask it to. hookjack lists those entry points and the scripts they launch. It parses files. The README says it never runs a hook, task, script or package manager.

The entry points named in the README are Claude Code hooks in .claude/settings*.json, MCP servers in .mcp.json, .cursor/mcp.json, .vscode/mcp.json and .gemini/settings.json, VS Code tasks with runOn: folderOpen (also Cursor and Windsurf), devcontainer commands, agent instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, .cursor/rules and Copilot instructions), and install hooks in package.json, composer.json, binding.gyp and Makefiles. A finding names the file, the command that would run, and a severity.

check and org use unauthenticated HTTPS. The README says no token is read or sent. Remote mode covers GitHub only. check reads the tarball in memory. org uses the public REST API to list repositories.

The README points to an October 2026 JFrog Security Research report, 42 armed GitHub repositories, as the reason the scanner exists. hookjack answers a narrow question: what will run when you open this? The README says it does not replace a secret scanner or a general SAST tool.

Report vulnerabilities in hookjack itself through GitHub private vulnerability reporting.

Limits

The README lists these limits. The check is heuristic: a command that looks ordinary, or that downloads a payload when it runs, may only be reported as something that auto-runs. Remote mode is subject to GitHub’s anonymous API limit of 60 requests an hour. org uses one request per 100 repositories, and tarball downloads do not count toward that. It reads the default branch, or the ref you pass with -ref. It does not disassemble native addons (.node). Scripts are sampled up to 4 MB. The rules in the README are HJ001 through HJ012.

Usage

  1. Scan the current directory

    hookjack
  2. Scan local checkouts

    hookjack path/to/repo other/repo
  3. Inspect a GitHub repository before cloning

    The README says check streams the tarball into memory and writes nothing to disk.

    hookjack check owner/repo
  4. Inspect one Git ref

    hookjack check -ref v1.2 owner/repo
  5. Scan a user or organization’s public repositories

    The README says org lists public repositories that are not forks and not archived.

    hookjack org some-org
  6. Write SARIF

    Formats in the README are text (the default), json and sarif. Exit 0 means nothing at or above --fail-on (default high), 1 means there is a finding, and 2 is a usage or I/O error.

    hookjack -format sarif -o hookjack.sarif .
  7. GitHub Action

    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2
    - uses: ucsurf/hookjack@v0.1.0
      with:
        fail-on: high          # low | medium | high | critical | none
        sarif: hookjack.sarif  # optional, upload with github/codeql-action/upload-sarif
  8. pre-commit

    repos:
      - repo: https://github.com/ucsurf/hookjack
        rev: v0.1.0
        hooks:
          - id: hookjack

Machine-readable: JSON · Markdown · ID hookjack

More tools

  • lockreview

    Reviews GitHub Actions lockfile (actions.lock) diffs and flags repository identity changes, impostor commits, ref rollbacks, new transitive actions, and runs/dist changes.

    ucsurf/lockreview
  • disclose

    Finds where to report a vulnerability.

    ucsurf/disclose
  • repojack

    Finds dependencies that point at a deleted or renamed GitHub account, so someone else could register the name and serve that code.

    ucsurf/repojack
  • vuln-patterns

    Semgrep rules taken from vulnerabilities that are already public.

    ucsurf/vuln-patterns
  • pwnreq

    Finds GitHub Actions workflows where someone without write access can run code that sees repository secrets: pwn requests and script injection.

    ucsurf/pwnreq