Skip to main content
ShareLint — local privacy preflight for everything you share

Scan before you share.
A local, fail-closed privacy preflight for files, folders, and nested archives.
Catch secrets, PII, speaker notes, hidden sheets, and location metadata without uploading them.

CI CodeQL PyPI version Python 3.11+ No third-party Python package dependencies MIT license

Quick start · Coverage · Docs · Threat model · 简体中文

Quick start

No Python: standalone archive

Download a matching archive from a completed GitHub Release. Standalone archives include ShareLint and its Python runtime, so they do not require Python, pip, uv, or pipx on the destination computer. ShareLint 1.0.0 is available for four natively built and verified targets:

Computer Release target
x86-64 Linux with glibc Download Linux
64-bit Windows Download Windows
Intel Mac Download Intel Mac
Apple silicon Mac Download Apple silicon Mac

Release v0.1.2 and earlier do not contain these standalone archives. Use only files attached to a completed release, not ordinary CI artifacts. Download the archive and its same-named .sha256 file, then follow the verification and first-run instructions.

Run with uv

Alternatively, uv can obtain a compatible Python automatically. Install uv for your operating system, then run the synthetic demo without persistently installing ShareLint:

uvx sharelint demo

For regular use, install the tool persistently and make its command available to a new shell:

uv tool install sharelint
uv tool update-shell

Open a new terminal after uv tool update-shell, then run sharelint demo. In the current shell, uvx sharelint demo continues to work immediately.

If Python 3.11+ and pipx are already installed, pipx remains a supported alternative:

pipx install sharelint
sharelint demo

Preview the same synthetic scan as a self-contained local HTML report:

sharelint demo --format html --report sharelint-demo.html

A standard virtual environment and pip also work. See the OS-specific installation and troubleshooting guide for installing uv from zero, standalone archive verification, upgrades, PATH fixes, and externally managed Python environments.

For development, install from a source checkout:

git clone https://github.com/jasonzhang06-source/sharelint.git
cd sharelint
python -m pip install -e .

Platform support

You do not need to switch operating systems to use or develop ShareLint. On Ubuntu, use the Linux target or the Python package and let CI exercise the native Windows and macOS jobs. A standalone binary is specific to its listed OS and architecture, so a Windows .exe does not run on Linux; manual validation of Windows-only host behavior still requires a Windows host.

The Python 3.11+ package is tested on Ubuntu, Windows, and macOS. The standalone matrix covers the four native targets listed above. Check the CI result for the exact commit or release you use. A configured target does not imply that every filesystem, OS version, shell, locale, or security policy has been verified.

Writing reports, bundles, archives, and receipts requires hard-link support in the destination filesystem so ShareLint can preserve its no-overwrite contract. See platform support for the validation matrix, Windows notes, and filesystem limitations.

ShareLint 5.0. Add an explicit private detector pack for organization-specific markers and token prefixes, without executable plugins or arbitrary regex. Configured scans use fully hidden paths/previews and bind the detector policy into native v2 reports and pack receipts. Run sharelint staged to inspect the actual changed Git index blobs before committing, with optional pre-commit integration. It never substitutes working-tree bytes or fetches missing objects. Keep a private local review ledger with expiring decisions, aggregate reports, and a passive HTML dashboard. Review decisions never suppress findings or authorize sharing. Inspect explicitly marked Base64, hexadecimal, and percent-encoded UTF-8 text with bounded decoding and nested provenance. Encoding coverage and limits are explicit; unlabeled encodings and encoded binary documents are not covered. Review a text-redaction plan, then create a new, rescanned derivative without changing the original. Unconfigured native reports remain schema 1.0.0 and ZIP receipts remain 2.0.0; custom detector reports use schema 2.0.0. Redaction has separate plan/receipt contracts. Read the compatibility review. PDF pages and image pixels are not OCR-scanned; incomplete coverage still blocks pack.

You are about to send a ZIP. The code is clean, but the deck still has speaker notes, the workbook contains a very-hidden sheet, the PDF names its author, and an image records a location. Git-focused secret scanners do not see that entire boundary. ShareLint does.

It recursively follows a finding through nested containers, hides the matched value in every report, and says when a surface was only partially inspected. Its pack command creates a deterministic ZIP only after the configured policy and coverage checks pass, then reopens and rescans the output.

Why ShareLint

Most tools inspect one layer of a handoff. ShareLint treats the selected file, directory, and every supported nested container as one disclosure boundary:

Approach Strong at What ShareLint adds
Repository secret scanning Credentials in source and history Office/PDF/image surfaces, filenames, and nested delivery bundles
Metadata inspection or cleanup Individual format fields Cross-format provenance, content rules, and an explicit coverage ledger
Hosted DLP Organization-wide policy and managed channels A zero-upload personal preflight with no service or account
Manual ZIP review Human context Repeatable limits, masked evidence, output rescan, and hash-bound receipts

It is intentionally composable with those controls rather than a replacement for all of them.

Demo output

The demo builds a disposable, entirely synthetic handoff bundle in a temporary directory. Its console output starts with a banner confirming that the data is synthetic and no personal files were read. It shows nested Office content, PDF metadata, active content, redacted evidence, and an explicit PDF coverage gap without touching your files. Abridged Linux output (filesystem metadata surface counts may vary by platform):

SYNTHETIC DEMO · generated sample only
No personal files were read; this run scanned only files created by ShareLint.

ShareLint 1.0.0 · local privacy preflight
INCOMPLETE · 5 policy-blocking finding(s) · 9 total · 14 surface(s)
Coverage · 13 scanned · 1 partial · 0 skipped · 0 error(s)

CRITICAL SL.SECRET.AWS_ACCESS_KEY · AWS access key identifier
         client-handoff.zip -> deck.pptx -> ppt/embeddings/clients.xlsx
         evidence <secret:20 chars> [report-scoped fingerprint]

Coverage gaps
  PARTIAL client-handoff.zip -> report.pdf · rendered-page OCR is not enabled

Original untouched · 0 bytes uploaded · matched values hidden
Incomplete means one or more listed surfaces were not fully inspected.

Found it useful? Star ShareLint, report a false positive, or request a format.

Use it

Use a repeatable policy (ShareLint 1.1+):

sharelint scan ./client-handoff --profile public
sharelint config init -o sharelint.toml
sharelint config show --config sharelint.toml --profile client

See the configuration guide. Configuration is explicit, never auto-discovered inside untrusted input.

Scan a file, directory, ZIP, or Office document:

sharelint scan ./client-handoff

Write a machine-readable report or a static HTML review:

sharelint scan ./client-handoff --format json  -o sharelint.json
sharelint scan ./client-handoff --format sarif -o sharelint.sarif
sharelint scan ./client-handoff --format html  -o sharelint.html

Report outputs are owner-only where supported, never overwrite an existing path, and must sit outside a scanned directory. demo --report follows the same rule; demo -o writes the reusable synthetic ZIP bundle and also refuses to overwrite an existing path.

Make coverage gaps fail a normal scan in automation:

sharelint scan ./client-handoff --strict --fail-on high

Create a share bundle only if it passes the fail-closed gate:

sharelint pack ./approved-files -o release.zip

On success, this writes release.zip, the minimized receipt release.zip.sharelint.json, and its exact companion report release.zip.sharelint.report.json. The receipt binds the output hash, policy, measured coverage, and companion report digest. On failure, no archive is published. An explicit --receipt blocked.json may write blocked.json plus blocked.report.json for the blocked attempt; it is never a success receipt. Companion reports include masked findings and contextual filenames, so protect them as sensitive records even though matched values remain hidden. Successful receipts use ZIP entry indices instead of repeating filenames and should still be protected.

pack always rejects partial, skipped, or errored coverage. There is deliberately no bypass flag: a pack receipt is only meaningful when every required surface was inspected.

Discover the current rule set from the installed checkout:

sharelint rules
sharelint explain SL.OFFICE.NOTES

Exit codes

Code Meaning
0 Command completed and the selected gate did not block.
1 Findings met the threshold, strict coverage failed, or pack was blocked.
2 Invalid usage, unreadable input, or another operational error.

sharelint demo intentionally returns 0 after rendering its synthetic blocked example.

The console and HTML report use REVIEW when a completed scan found something below the selected --fail-on threshold. That is a prompt for human review, not a blocking verdict: the exit code is still 0, and JSON/SARIF keep summary.verdict: "pass" for the stable automation contract. PASS means no findings were retained; neither label is a guarantee that the input is safe.

What it checks

Surface Current inspection Coverage semantics
Directories Stable recursive walk, path/name checks, regular files Symlinks are not followed; skipped or unsupported entries stay visible.
ZIP archives Bounded in-memory member inspection, archive/entry comments, extra fields, nested archives, path traversal, links, encryption, duplicates, bomb limits Members are never extracted to disk. A limit, unreadable member, or unknown extra-field type is a gap.
Office Open XML DOCX/XLSX/PPTX properties, comments, revisions, hidden text/sheets/slides, notes, external relationships, macros, custom XML, previews, embedded objects OOXML receives the same archive limits; embedded packages retain their full source chain.
PDF Static metadata, active-content markers, attachments, encryption, and incremental history Incomplete: rendered pages are not OCR-scanned and no viewer is invoked.
Images JPEG/PNG/WebP/TIFF metadata, including identity, device, text, and GPS fields where supported Incomplete: pixels are not OCR-scanned; “metadata scanned” does not mean “image content scanned.”
Text Common credentials, private-key markers, emails, US SSNs, payment cards, and revealing local paths Pattern-based detection can have false positives and false negatives.

Run sharelint rules for the installed rule registry and read Rules and identifiers for stability and severity semantics.

Designed around the share boundary

files / folders / nested containers
                 │
                 ▼
        bounded local traversal
                 │
       ┌─────────┼──────────┐
       ▼         ▼          ▼
    secrets   document   coverage
      + PII    surfaces     gaps
       └─────────┼──────────┘
                 ▼
       privacy-safe findings
                 │
          scan ──┴── pack gate
                         │ pass only
                         ▼
               deterministic ZIP
                  + hash receipt
                  + output rescan

The core scan path has no network feature, telemetry, or runtime dependency outside Python's standard library. It does not execute macros or JavaScript, invoke Office/PDF applications, follow external relationships, or extract archive members to disk.

The architecture guide maps these guarantees to module boundaries and documents safe extension points for contributors.

Findings carry a nested logical source chain such as:

handoff.zip -> deck.pptx -> ppt/embeddings/customers.xlsx -> xl/workbook.xml

Matched evidence is reduced immediately to a type-aware mask and a keyed, report-scoped fingerprint. The ephemeral HMAC key is never serialized, so the fingerprint cannot be used as a stable cross-report identifier. Reports are still sensitive because filenames, structure, finding types, and counts can reveal context.

What ShareLint does not promise

ShareLint is a preflight, not a proof system. A pass means only that no configured blocker was found on the surfaces listed in that report under that policy.

  • It cannot guarantee that a bundle is safe, anonymous, compliant, or free of sensitive data.
  • It does not currently OCR PDF pages or image pixels.
  • It never modifies originals. Text redaction creates a separately reviewed derivative; other formats need manual fixes in a copy.
  • It cannot determine whether a detected credential is live or whether personal data was intended.
  • Unsupported, encrypted, malformed, or budget-limited content remains a visible coverage gap.

The security boundary and residual risks are documented in the threat model. Machine-output consumers should use the report and receipt contract, not parse console text. JSON Schema files for automated validation live in schemas/.

Verify a delivered bundle offline

sharelint verify release.zip --receipt release.zip.sharelint.json --report release.zip.sharelint.report.json

Version 1.2 checks exact report/archive bytes, recomputed report summaries, recorded policy settings, and ZIP file manifests. It does not upload or extract files. Integrity is not a signature, producer authentication, a new privacy scan, or a guarantee of safe sharing. See the verification contract for blocked receipts, independent digest pinning, budgets, and exit codes.

Review what changed

sharelint diff before.json after.json
sharelint diff before.json after.json --format html -o comparison.html

Version 1.3 compares rule/severity counts and coverage. It flags increased blockers, incomplete coverage, reduced inspection, and changed settings for review. It never treats report-scoped fingerprints as stable evidence IDs, and fewer findings do not prove a particular issue was fixed. See the comparison guide.

Review before export

sharelint plan create ./handoff -o handoff.plan.json
sharelint plan inspect handoff.plan.json
sharelint pack ./handoff -o delivery.zip --plan handoff.plan.json

Packing repeats all strict checks and rejects changed source, policy, or scan snapshots. A plan is a private review record, not approval or a signature. See handoff plans.

Check several handoffs

sharelint batch ./handoff-a ./handoff-b --format html -o batch.html

Each input has a separate result and shares a finite inspection-byte budget. Failures and unattempted targets remain visible; aggregate output uses input-order IDs, not filenames. See batch preflight.

Create a reviewed text derivative

sharelint redact plan private.log --name public.log -o redaction.plan.json
sharelint redact inspect redaction.plan.json
sharelint redact apply private.log --plan redaction.plan.json -o public.log

UTF-8 text only, bounded to 4 MiB. Plans contain positions and rules, not original text. The source is rechecked and a reopened output rescan must have complete coverage and no known findings before publication. Private-key blocks and document/image containers are not automatically cleaned. See text derivatives.

Keep a private review history

sharelint review init private-review
sharelint review import private-review --report scan.json
sharelint review decide private-review r000001 --decision needs-fix --reason confirmed-finding --reviewer operator-1
sharelint review list private-review --format html -o review.html
sharelint review verify private-review

Import an existing native scan report; the workspace keeps counts and hashes, not its filenames, matched evidence, or prose. Decisions are append-only; risk-acceptance and false-positive decisions require a future expiry. Original scan verdicts remain visible and unchanged. No local server is started. See review workspaces for byte limits, trusted-tip verification, permissions, and recovery boundaries.

Project status and direction

ShareLint adds explicit policy profiles, offline receipt verification, report comparison, batch checks, handoff plans, reviewed UTF-8 text derivatives, and private review workspaces to the scanning/packaging workflow. The maintenance priority is synthetic regression tests, conservative coverage, and compatibility. Local OCR, policy exceptions, pre-send hooks, and a desktop interface remain future work. See the roadmap.

The project stays useful by keeping three promises measurable: input remains local, evidence remains hidden, and incomplete coverage never masquerades as a clean scan.

Help shape the next release

The most useful early feedback is a real sharing workflow described with synthetic data: a format that ShareLint cannot inspect yet, a false positive that can be reproduced safely, or a report that was hard to act on. Open a focused feature request or bug report. If ShareLint fits a problem you care about, starring the repository helps more people discover it.

Contributing and security

Issues and pull requests are welcome, especially for narrowly scoped format coverage, synthetic regression fixtures, false-positive reductions, and hostile-input tests. Start with CONTRIBUTING.md and never attach real secrets or personal documents.

Report a possible vulnerability privately through GitHub's Security → Report a vulnerability flow, as described in SECURITY.md. General help is covered by SUPPORT.md; project decisions follow GOVERNANCE.md.

License

MIT © ShareLint contributors.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharelint-5.0.0.tar.gz (341.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharelint-5.0.0-py3-none-any.whl (119.3 kB view details)

Uploaded Python 3

File details

Details for the file sharelint-5.0.0.tar.gz.

File metadata

  • Download URL: sharelint-5.0.0.tar.gz
  • Upload date:
  • Size: 341.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sharelint-5.0.0.tar.gz
Algorithm Hash digest
SHA256 8cf4d109d2d97cfb8a9bb3ead292538907679be3394b73762bca49a235fca0f2
MD5 1b2069d90cca60ff592ab6f87519bea1
BLAKE2b-256 eea5bd2dab89706cf2a99839f35fc2e212508827106ed5c0ff9734ec729e6800

See more details on using hashes here.

Provenance

The following attestation bundles were made for sharelint-5.0.0.tar.gz:

Publisher: release.yml on jasonzhang06-source/sharelint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sharelint-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: sharelint-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 119.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sharelint-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaca839490d28cd4b8e821c75b89fe5805c7cccb0edb79359e774b223307bb65
MD5 f0a8bcfdfd6e92d86a52b1ee173d6083
BLAKE2b-256 ce52252695b00cfdef1bbcf9a96d3c4e6d923b84a39b37f00b50a080812cb971

See more details on using hashes here.

Provenance

The following attestation bundles were made for sharelint-5.0.0-py3-none-any.whl:

Publisher: release.yml on jasonzhang06-source/sharelint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

5.1.0

2 files

This release

5.0.0 This release

2 files

4.1.0

2 files

4.0.0

2 files

3.1.0

2 files

3.0.0

2 files

2.1.0

2 files

2.0.0

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.1

2 files

0.1.0

2 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