Metadata-Version: 2.4
Name: sharelint
Version: 2.0.0
Summary: Local, fail-closed privacy preflight for files, folders, and nested archives.
License-Expression: MIT
Project-URL: Homepage, https://github.com/jasonzhang06-source/sharelint
Project-URL: Documentation, https://github.com/jasonzhang06-source/sharelint#readme
Project-URL: Source, https://github.com/jasonzhang06-source/sharelint
Project-URL: Issues, https://github.com/jasonzhang06-source/sharelint/issues
Project-URL: Changelog, https://github.com/jasonzhang06-source/sharelint/blob/main/CHANGELOG.md
Project-URL: Security, https://github.com/jasonzhang06-source/sharelint/security/policy
Project-URL: Support, https://github.com/jasonzhang06-source/sharelint/blob/main/SUPPORT.md
Keywords: privacy,security,metadata,office,pdf,pii,secrets,data-loss-prevention,document-security,local-first,pii-detection,secret-scanning,cli
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == "dev"
Requires-Dist: jsonschema<5,>=4.23; extra == "dev"
Requires-Dist: mypy<2,>=1.11; extra == "dev"
Requires-Dist: pytest<9,>=8; extra == "dev"
Requires-Dist: pytest-cov<7,>=5; extra == "dev"
Requires-Dist: ruff<1,>=0.8; extra == "dev"
Provides-Extra: standalone
Requires-Dist: altgraph==0.17.5; extra == "standalone"
Requires-Dist: macholib==1.16.4; sys_platform == "darwin" and extra == "standalone"
Requires-Dist: packaging==26.3; extra == "standalone"
Requires-Dist: pefile==2024.8.26; sys_platform == "win32" and extra == "standalone"
Requires-Dist: pyinstaller==6.22.2; extra == "standalone"
Requires-Dist: pyinstaller-hooks-contrib==2026.6; extra == "standalone"
Requires-Dist: pywin32-ctypes==0.2.3; sys_platform == "win32" and extra == "standalone"
Requires-Dist: setuptools==84.0.0; extra == "standalone"
Dynamic: license-file

# ShareLint 2.0.0

Scan before you share. ShareLint is a local privacy preflight for files,
directories, and nested archives. It identifies supported secret, personal-data,
document, and metadata patterns, masks matched values in reports, and makes
incomplete inspection visible.

This release brings ShareLint **directly from 1.0.0 to 2.0.0**. Its runtime is the
original [v2.0.0 source](https://github.com/jasonzhang06-source/sharelint/tree/v2.0.0).
Wheel build 1 preserves that runtime and updates the package description and
wheel build metadata. The Python package version remains **2.0.0**.

## Install and try it

The Python package requires **Python 3.11 or later** and has **no third-party
runtime Python dependencies**. Choose one installation method:

```sh
pipx install sharelint==2.0.0
```

```sh
uv tool install sharelint==2.0.0
```

Or, inside an activated Python virtual environment:

```sh
python -m pip install sharelint==2.0.0
```

Then verify the version and run the entirely synthetic demonstration:

```sh
sharelint --version
sharelint demo
```

The expected version is `2.0.0`. The demo reads only the synthetic files it
creates. Installation may use the network; scanning stays local and sends no
scanned content, findings, filenames, or telemetry to a service.

Without Python, use the standalone archives for Linux glibc x86-64, Windows
x86-64, macOS Intel, or macOS Apple silicon in the
[GitHub v2.0.0 release](https://github.com/jasonzhang06-source/sharelint/releases/tag/v2.0.0).
Those archives include Python. Verify each download against its matching
SHA-256 file before running it.

## What's new since 1.0.0

- **Explicit policies and configuration.** Use the built-in `public` and
  `strict` profiles, or configure named profiles, thresholds, and resource
  limits in TOML. `config init` creates a configuration; `config show` displays
  the effective settings. Configuration is never auto-discovered inside scanned
  content, and packing still requires complete coverage.
- **Offline receipt verification.** `verify` checks the bindings between a
  delivery ZIP, its private receipt, and its private JSON report without
  extracting or uploading the contents. It checks structure, summaries, hashes,
  policy consistency, and the archive manifest. An optionally pinned receipt
  digest must come from a separately trusted channel. Integrity checks do not
  authenticate a publisher or guarantee privacy.
- **Report comparisons.** `diff` compares aggregate rule and severity counts
  and coverage in two native JSON scan reports, with console, JSON, or standalone
  HTML output. Changed settings and incomplete coverage need review; fewer
  findings do not prove that a specific secret was removed.
- **Reviewable handoff plans.** Create and inspect a private plan before
  packing. `pack --plan` requires the source, effective policy, producer version,
  and scan snapshot to match, and performs fresh scanning and packing checks.
  The receipt binds the exact plan bytes for offline verification.
- **Reliability fixes.** Cancellation returns exit code `130` without a
  traceback; closed output pipes return `2`. Packing strengthens file identity
  and read-size checks, supported reads avoid regular-file-to-FIFO hangs, and
  enum validation is corrected on Python 3.11.

## Receipt migration

New receipts use schema **2.0.0**, with zero-based `files[].entry` ZIP indices
instead of repeating filenames in `files[].path`. Update consumers accordingly,
or use `sharelint verify`, which accepts legacy v1 and new v2 receipts. Native
scan reports remain schema **1.0.0** and SARIF remains **2.1.0**. Existing
scan/pack defaults remain, and handoff plans are optional. The receipt change
does not rename or sanitize input files or ZIP members.

See the [2.0 migration guide](https://github.com/jasonzhang06-source/sharelint/blob/v2.0.0/docs/migration-2.md)
and [changes from 1.0.0](https://github.com/jasonzhang06-source/sharelint/compare/v1.0.0...v2.0.0).

## Plan, pack, and verify

Use a directory containing the files you intend to share. Keep output paths
outside that directory, and choose new paths for every output:

```sh
sharelint scan ./handoff --profile public
sharelint plan create ./handoff -o handoff.plan.json
sharelint plan inspect handoff.plan.json
sharelint pack ./handoff -o delivery.zip --plan handoff.plan.json
sharelint verify delivery.zip --receipt delivery.zip.sharelint.json --report delivery.zip.sharelint.report.json --plan handoff.plan.json
```

`pack` blocks on policy failures or partial, skipped, or errored coverage. A
blocked plan cannot authorize packing. Reports, receipts, and plans are private
working documents: even with matched values masked, contextual filenames and
other details can remain sensitive. Keep them separate from a public handoff.

## What is inspected

ShareLint follows supported nested containers through bounded local inspection:

- **Directories and text:** path and filename checks, common credential and
  private-key patterns, email addresses, US SSNs, and payment-card patterns.
- **ZIP and Office Open XML:** nested members, archive metadata, unsafe member
  properties, document properties, comments, revisions, hidden content,
  notes, external relationships, macros, and embedded objects.
- **PDF:** static metadata and supported active-content, attachment, encryption,
  and incremental-history markers. Rendered-page inspection is incomplete.
- **Images:** supported JPEG, PNG, WebP, and TIFF metadata, including identity,
  device, text, and GPS fields. Image-pixel inspection is incomplete.

Run `sharelint rules` to inspect the installed rule registry. Limits, parser
errors, unsupported surfaces, and encryption appear as explicit coverage gaps.
Archive members are inspected through bounded streams, not extracted to disk.

## Scope and limitations

ShareLint does **not** perform OCR, inspect image pixels, automatically clean or
redact original files, or provide a GUI. Scan commands leave originals unchanged.
Masking evidence in a report does not remove sensitive data from the input or
from files copied into a delivery ZIP. Pattern checks can produce false positives
and false negatives. A passing result describes the configured checks and their
coverage; it is not a guarantee that sharing a file is safe or that all sensitive
data has been found.

Plans and unsigned receipts are neither signatures nor approvals. SHA-256
verification detects byte mismatches, not publisher identity. Writing reports,
archives, and receipts requires hard-link support on the destination filesystem
to preserve the no-overwrite contract.

[Documentation](https://github.com/jasonzhang06-source/sharelint/blob/v2.0.0/docs/README.md)
· [Threat model](https://github.com/jasonzhang06-source/sharelint/blob/v2.0.0/docs/threat-model.md)
· [GitHub release](https://github.com/jasonzhang06-source/sharelint/releases/tag/v2.0.0)
· [Issues](https://github.com/jasonzhang06-source/sharelint/issues)

MIT licensed.
