Skip to main content

borehole

Survey a codebase without sending it anywhere.

borehole reads a git repository on the machine you run it on and sends a bundle of facts about it — counts, file paths, line numbers and a small number of short quoted lines. Your source code does not leave. You get back a report with a commit, a path and a line range behind every finding.

pip install borehole
export BOREHOLE_TOKEN=bh_…          # from borehole.dev/account
borehole collect . --dry-run        # print exactly what would be sent
borehole collect .                  # send it, get a report

Run --dry-run first

It prints the entire bundle and sends nothing about your repository. You are being asked to send facts about your codebase to a third party, and you should be able to read those facts before the first time and whenever you like afterwards.

Run it with your token set. The detection patterns are not in this package; they are fetched for each run, and a dry run with a token fetches them too, so it prints the quoted lines a real run would send. That fetch is the only request it makes, and its body is empty.

Without a token it makes no network request at all, and prints everything except the pattern matches.

What leaves, precisely

Sent Not sent
Commit SHAs, dates, subjects, insertion and deletion counts File contents
Which files changed in which commit Author names and email addresses
The list of tracked file paths, and tags with their commit and date Anything not produced by a registered extractor
Whether each changed file was binary (0.4.0)
Pattern matches in notebooks, committed .env files, web templates and mobile manifests, under the same rules as any file (0.5.0) The value of any setting named like a credential: a match records the name only
Each locked dependency from a public registry: ecosystem, name, version, and whether the lockfile marks it as shipping (0.4.0) Dependencies from a private registry, a git URL or a local path
The remote's host and path, or the directory name if there is none
Where a pattern matched: path and line number
Up to 120 characters of the matched text The text of anything that looks like a credential
Where a credential-shaped string was ever committed: commit, path, kind
Two counts about the tree: files, lines

Author names and addresses are hashed before they leave, salted per repository, so the same person is the same identity within one survey and not across surveys. Every measurement counts and compares; none of them needs a name.

The hash is a pseudonym, not anonymity. The salt is the repository's head commit, and that commit is in the bundle. So anyone holding a bundle could test whether a guessed address belongs to one of its authors. Borehole does not, and a report stores authorship only as counts.

One honest caveat. Three checks quote the line they matched, because for those the line is the evidence — a TODO's wording, a commit subject, an unpinned dependency. If somebody wrote a colleague's name in a TODO, that text crosses. --dry-run shows you, and the report's owner can strip quoted evidence afterwards.

In your own cloud, with proof

For a reader who needs proof the facts were not edited, the collector also runs as a container inside a Confidential VM in your own Google Cloud project. Google signs the exact bytes it sends, and the report carries that signature. Your repository never leaves your project. Instructions and the setup script are at https://borehole.dev/confidential.

Any git repository

GitHub, GitLab, Bitbucket, Azure DevOps, a self-hosted install of any of them — or no host at all. A bare repository on a file server, a clone inside a data room, a laptop with the wifi off. If git log works, this works.

Without a host to ask there are no stars, no language breakdown and no repository size. That is audience data rather than engineering data, and a private repository never had it either.

What this package is not

This is the collector. The assessment itself — the thresholds, the bands, the rejection reasons, the wording that makes a finding worth acting on — runs on Borehole's servers and is not in this package. Detection patterns are fetched for each run rather than shipped here.

So reading this source tells you exactly what leaves your machine, which is the question this package exists to let you answer. It does not tell you how the judgement is made. Both of those are deliberate.

Requires

Python 3.10 or newer, and git on the PATH. No other dependencies.


borehole.dev · what happens to your code · terms

Release files for borehole 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for borehole 0.6.1
File Interpreter ABI Platform
borehole-0.6.1-py3-none-any.whl Python 3 none any Details

Release files / borehole-0.6.1-py3-none-any.whl

Download URL borehole-0.6.1-py3-none-any.whl
Size 67.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3b819184771bd405653b3b979f6bc731ece7564fa52513f60c58770f254a606
BLAKE2b-256 checksum
How to use checksums
9fe3859d8ee17350a0e3eae6ce0b13763ebb3f9aca65e4cf9b6f1cb7bfd7f3ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.1 This release

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page