Skip to content

Security: fskulimo/scaffld

SECURITY.md

Security Policy

Scaffld is a local-first tool. You run it on your own machine; it is not a hosted service. This document explains what it does and does not do with your code, and how to report a vulnerability.

Reporting a vulnerability

Please do not open a public issue for security reports.

Use GitHub's private vulnerability reporting instead: Security → Report a vulnerability.

You'll get an acknowledgement within a few days. Once a fix is available it will be released and the report credited (unless you'd rather stay anonymous).

Threat model & guarantees

Scaffld analyzes untrusted repositories, so it is built to treat every repo as hostile. The design guarantees:

  • Repository code is never executed. Files are parsed into an abstract syntax tree with tree-sitter (WASM grammars). Scaffld reads source; it never runs, imports, builds, or evaluates it.
  • The clone target cannot be hijacked. The URL you paste is parsed into a strictly validated owner/name (owner is [A-Za-z0-9_-]+, host must be github.com), and the clone URL is rebuilt as https://github.com/<owner>/<name>.git. git is spawned with an argument array (never a shell), so tricks like ext::, file://, or command injection through the URL cannot reach the clone.
  • Hardened git. Clones are shallow (--depth 1), single-branch, no tags, with GIT_TERMINAL_PROMPT=0 (never blocks on a credential prompt) and GIT_LFS_SKIP_SMUDGE=1 (no LFS payloads).
  • Bounded work. Symlinks are skipped (no escaping the clone directory), and there are hard caps on the number and size of files parsed. Clones and AI calls run under timeouts.
  • Local by default. The API server binds to 127.0.0.1 only — it is not exposed to your LAN. Clones go to a temporary directory that is deleted after analysis. Only the resulting graph is persisted, under ./data/.

Privacy: what leaves your machine

  • The diagram is built 100% deterministically on your machine. No telemetry, no analytics, no code is ever sent to us — there is no Scaffld server.
  • AI labels use your own Claude, and are announced. Scaffld auto-detects a local claude CLI: if you have Claude Code installed, it uses your account to rewrite node/edge labels for readability (short code excerpts go to Anthropic under your plan). This is printed at startup every run. It never changes the graph structure. If you have no provider, nothing but the git clone leaves your machine.
  • You control it with SCAFFLD_ENRICH: unset = auto (on when Claude is present), on = force, off = never. See .env.example.

Supported versions

Scaffld is pre-1.0. Security fixes are applied to the latest main and the most recent release. Please make sure you're on the latest version before reporting.

There aren't any published security advisories