Check a repository's public surface before publishing or asking for trust.
Public Surface Sweeper audits public and developer delivery surfaces for GitHub-facing repositories. It checks whether a repo explains itself clearly, has runnable handoff material, carries release/status metadata, avoids secret-shaped values, and can feed proof-surface evidence workflows.
Small public repos often fail on simple delivery details: missing license, unclear README, accidental credential-shaped strings, or unreviewed release claims. This tool makes those checks quick and repeatable.
python -m pip install -e ".[test]"
public-surface-sweeper examples/clean-repo
python -m pytest- Run the clean fixture and expect
No findings. - Run
public-surface-sweeper . --summary. - Emit a proof packet with
--proof-packet.
Python package and CLI. It checks public clarity, developer handoff material, workspace-scale delivery drift, and secret-shaped values; it is not a full security scanner or certification tool.
Audit public and developer delivery surfaces before a repository asks for trust.
Use it before a repository asks a user, customer, reviewer, investor, or future maintainer to trust what it says.
It is intentionally narrow: a release-hygiene gate, not a full security scanner or certification tool.
Download the reviewed wheel or source archive from a GitHub Release, then install the local artifact:
python -m pip install ./public_surface_sweeper-0.1.3-py3-none-any.whlFor local development:
python -m pip install -e ".[test]"
python -m pytestSee USAGE.md for an install line, the full CLI and Python API, worked examples, and expected output.
public-surface-sweeper .
public-surface-sweeper . --json
public-surface-sweeper . --summary
public-surface-sweeper . --summary --json
public-surface-sweeper . --proof-packet
public-surface-sweeper . --fail-on warning
public-surface-sweeper C:/dev/public --workspace --jsonThe command exits with status 1 when error-level findings are present.
In workspace mode, the command also exits with status 1 when discovery is
empty or unverifiable, so a zero-repository matrix does not pass as a clean
portfolio gate.
Use --fail-on warning to fail on warnings and errors, or --fail-on none to
print findings without failing the process.
Run the bundled clean fixture:
public-surface-sweeper examples/clean-repoExpected output:
No findings.
Scan every GitHub-facing repository under a workspace root:
public-surface-sweeper C:/dev/public --workspaceWorkspace mode discovers local repositories with GitHub remotes, deduplicates multiple checkouts of the same remote, runs the single-repo sweep against each one's forward-facing delivery surface, and emits a delivery matrix with separate public, developer, and boundary verdicts. The matrix is public-safe by default: it includes repository names, GitHub slugs, relative paths, scores, counts, and action items, but not absolute local paths, raw secret values, network calls, or filesystem writes.
Discovery reads local Git metadata only. It recognizes standard .git/config
repositories and linked Git worktree .git files whose gitdir: pointer leads
to a Git worktree metadata directory with a matching backpointer and common-dir
relationship. Unvalidated external Git metadata, including symlinked .git
markers, is reported as UNVERIFIABLE before config is read. If a workspace
contains no Git repositories, no GitHub-facing remotes, or unreadable Git
metadata, the matrix reports workspace_status and coverage.empty_reason
instead of treating an empty result as success.
A sweep walks one repository and applies every rule below to what it finds on disk. The order matters at the end, where two filters remove candidate findings that another rule has already accounted for.
The workspace mode runs that same sweep across every GitHub-facing checkout under a root, then reduces each repository to three verdicts and takes the worst of them.
Required project files:
README.mdLICENSEAUTHORS.mdCONTRIBUTING.md
Text hygiene:
- em dash characters in public-facing text
README delivery:
- public value, status, or use-case section
- developer entry point and workflow section
- runnable command block
- substantive non-badge visual asset
Forward-facing repository delivery:
- changelog or release notes for public status
- GitHub funding metadata for sponsor-button support
AGENTS.mdor equivalent agent/developer instructions- standalone
USAGE.mdor docs usage guide - GitHub workflow evidence under
.github/workflows/
Workspace delivery:
- GitHub-facing repository discovery from local
.git/configremotes and validated linked worktree.gitfiles - duplicate-checkout deduplication by GitHub remote
- local wrapper repository traversal for workspaces that contain nested repos
- explicit empty and unreadable-metadata coverage in workspace matrices
- fast delivery-surface scanning instead of full source-tree scanning
- public/developer delivery verdicts per repository
- normalized contract rules for receipt chains and dashboards
- release-readiness counts across a whole local portfolio
- JSON output suitable for receipt chains and dashboard ingestion
Secret-shaped values:
- private key block markers
- GitHub token shaped values
- OpenAI key shaped values
- AWS access key shaped values
- Slack token shaped values
- generic credential assignments such as
token: <value>,api_key=<value>,client_secret=<value>, andpassword=<value>when the value is not an obvious placeholder
The scanner skips common cache, build, virtualenv, dependency, and local
agent-tool state directories such as .superpowers and .telos.
It also skips binary files and text files larger than 1 MB.
Secret-shaped labels and placeholders such as YOUR_API_KEY_HERE, redacted,
or example-token-placeholder are ignored so findings stay value-focused.
Delivery findings are warning-level by default so existing repos can be migrated
without blocking secret and required-file gates.
ERROR LICENSE required-file: missing required file: LICENSE
ERROR README.md:12 em-dash: replace em dash with plain punctuation
[
{
"path": "LICENSE",
"line": 0,
"rule": "required-file",
"severity": "error",
"message": "missing required file: LICENSE"
}
]score: 75
status: blocked
total_findings: 1
errors: 1
warnings: 0
action_items:
- LICENSE: missing required file: LICENSE
Summary mode is the fastest handoff format for release reviews. It gives a bounded readiness score, a status, finding counts, and the first actionable items to fix before publishing or showing the repository to a reviewer.
Use --proof-packet when the scan result should feed repo-proof-index or a
release-readiness report. The packet follows the shared proof-surface interop
shape: claims, checks, and action items in one JSON object. The generated packet
is self-checked before printing so producer drift fails before entering the
pipeline.
public-surface-sweeper . --proof-packet > public-surface.packet.json
repo-proof-index public-surface.packet.json --summary- It does not perform exploit testing.
- It does not audit dependencies for vulnerabilities.
- It does not validate whether a credential is real.
- It does not certify that a repository is safe, compliant, or trustworthy.
- It does not replace a security review.
public-surface-sweeper is the first point in a proof-surface pipeline:
repo public surface -> hygiene findings -> proof index -> release-readiness report
Its job is to catch basic public-surface defects before a repository asks users, clients, employers, or reviewers to trust it.
Zain Dana Harper - small tools with explicit edges. Portfolio · HarperZ9 Built with Claude Code; reviewed, tested, and owned by me.
Zentropy Labs · order out of entropy. An independent lab building evidence-first tools that leave a re-checkable artifact behind. Built by Zain Dana Harper in Seattle. The full workbench is at Project Telos.