Skip to main content

borehole

Technical due diligence, read from your repository on your own machine.

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, dates, names of dependencies, and matched lines of up to 120 characters. The repository stays on your machine, and whole files are never sent. 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; from 0.7.0, whether its line was a comment, named a local or example host, or was an environment fallback The line
Names found in lines the history added or removed (a feature-flag key, an API version, a dependency, a CI platform), with dates (0.6.0) The line itself
Which packages of your published Go dependencies the code imports (0.6.1) Your own package paths
Which tracked paths are symbolic links (0.6.1) Where they point
Which vendored files open with a licence notice, and which phrase (0.6.2) The notice itself
Which vendored components a notices file names, and which file (0.6.2) The notices file's text
A status line on the README's first screen, such as "no longer maintained", without addresses or handles (0.7.0) The rest of the README
Where a contributing, security or governance file states a policy: a mirror, no pull requests, one maintainer, an AI policy, a named foundation (0.7.0) The line itself
The licence identifier of each past version of the root licence file, with its commit and date (0.7.0) The licence text
Submodule paths (0.7.0)
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 and bands, never a name, an address or one person's exact share.

One honest caveat. Four checks quote the line they matched, because for those the line is the evidence — a TODO's wording, a commit subject, an unpinned dependency, and (from 0.7.0) a status line on the README's first screen such as "no longer maintained". If somebody wrote a colleague's name in a TODO, that text crosses; addresses and @handles are removed from a README status line before it does. --dry-run shows you, and the report's owner can strip quoted evidence afterwards.

What this rests on

The detection patterns come from Borehole's server on each run, so what is sent also depends on what the server asks for. From 0.6.1 the collector does not take that on trust:

  • It refuses a pattern that matches ordinary text rather than something a check looks for, before reading anything.
  • It refuses to send a bundle carrying more than 6,000 characters of matched text from any one file, or 1,000,000 in all.
  • A history pattern can send back only a short name, never a line.

The connection uses TLS; the collector does not pin a certificate. And --dry-run shows you the whole bundle before anything is sent.

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

Metadata

Release files for borehole 0.7.2

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.7.2
File Interpreter ABI Platform Actions
borehole-0.7.2-py3-none-any.whl Python 3 none any Details for borehole-0.7.2-py3-none-any.whl

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

Download URL borehole-0.7.2-py3-none-any.whl
Size 87.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37917f1bcae8a8be3e091c1a26251632a8bda3bcfcf67d1f10c86a7f5bc3118c
BLAKE2b-256 checksum
How to use checksums
300d6c57e78a1423571e5688db66b7fc1e598191a13f6908c912067512e4420e
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 27, 2026.

Transparency log

Security for borehole 0.7.2

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for borehole-0.7.2-py3-none-any.whl

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 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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