Skip to main content

platform-claim-audit

Version 0.1.0. A stdlib-only, offline static CLI for Python 3.9+. Works on Windows, macOS and Linux.

It compares platform promises in root README.md and docs/**/*.md with production Python source. It never imports or executes target code, uses the network, or opens .env files. Test files and tests/, fixtures/, docs/ trees are excluded from code evidence. Malformed Python files are skipped.

pip install .
platform-claim-audit path/to/project --json
python -m platform_claim_audit path/to/project --verbose

Exit codes: 0 PASS, 2 FAIL, 1 usage/input error. --version prints 0.1.0. --fail-on HIGH|MEDIUM defaults to MEDIUM; the sole rule is HIGH. --ignore documented-platform-unsupported suppresses that rule. --verbose adds OK platform <platform> lines to human output. JSON includes status, findings, verified_claims, and summary counts. Findings contain rule, severity, docs_file, docs_line, claim, code_file, code_line, and api; ordering is deterministic. Ignored findings do not make contradicted claims verified.

Claims include cross-platform/cross platform, works on/runs on/supports/ support for/supported on followed by platform names, platform support, platform-only, requires platform, and platform required. Aliases: win32/win, mac/osx/darwin. Negative claims (not supported on, no platform support, platform not supported, does not support) remove platforms globally; negative lines never add claims. Fenced examples are excluded; inline code counts. First positive claim provenance is retained across README then sorted docs paths.

The sole rule, documented-platform-unsupported (HIGH), reports one finding per claimed platform and incompatible API, with the first offending source location. Silent docs pass. Claims with no production Python sources produce one finding per platform, using <no-source> and code line 0.

API table

Available on Modules Attributes
Windows winreg, msvcrt, _winapi, winsound, nt os.startfile, ctypes.windll, ctypes.WinDLL, ctypes.oledll
POSIX (macOS/Linux) fcntl, pwd, grp, termios, resource, syslog os.fork, os.setsid, os.getuid, os.geteuid, os.getgid, os.uname

Imports, from-imports, aliases, calls, and bare attribute references count. try blocks catching ImportError (including tuples or bare except) suppress evidence. Resolved sys.platform equality and startswith checks recognize win/win32/cygwin, darwin, linux; os.name checks recognize nt/posix. Resolved branches restrict evidence to their platforms; wrong guards still fail. Negated, compound, or unresolved tests are conservatively unguarded.

Limits and neighbours

The table is deliberately small; unknown APIs and platforms such as FreeBSD and Android are ignored. No honest macOS-only stdlib row is included, though macOS promises can fail on Windows-only APIs. This is static evidence, not proof of runtime compatibility. Aliases are tracked per file, without full control-flow or variable rebinding analysis. Source text is never executed.

CI matrices execute real code across operating systems. readme-claim-audit checks install names, flags, links and versions; dep-claim-audit checks dependencies and Python versions; api-claim-audit checks promised symbols and signatures; privacy-claim-audit checks network/telemetry evidence. Bandit and Ruff check code issues. This tool complements these tools by checking documentation platform promises.

Development

Run PYTHONPATH=src python3 -m unittest discover -s tests -v. Build with python3 -m build. Both wheel and sdist contain package metadata; the sdist also includes the tests and good/bad fixtures. No runtime dependencies.

Metadata

Release files for platform-claim-audit 0.1.0

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

Source distribution (sdist)

Source distribution for platform-claim-audit 0.1.0
File Size Uploaded Provenance Actions
platform_claim_audit-0.1.0.tar.gz 10.2 kB Without provenance Details for platform_claim_audit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for platform-claim-audit 0.1.0
File Interpreter ABI Platform Actions
platform_claim_audit-0.1.0-py3-none-any.whl Python 3 none any Details for platform_claim_audit-0.1.0-py3-none-any.whl

Total release size: 18.3 kB

Release files / platform_claim_audit-0.1.0.tar.gz

Download URL platform_claim_audit-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
055af2950dbbd0da36dec16fb3632f4a164c1cf4b125b5b719bee593193a23e2
BLAKE2b-256 checksum
How to use checksums
b1c6a0afbcf4330db36ad66c70cb8d1a8753e96439339d6b351d644db9612d2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / platform_claim_audit-0.1.0-py3-none-any.whl

Download URL platform_claim_audit-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52db5de1ab09a657c226999c39eec872ce04d48dc422629bf393042021899690
BLAKE2b-256 checksum
How to use checksums
c48ad6f8425c5c78fd4de0da9e027f5b9121a38ba8feeb66605de3d5520528c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for platform-claim-audit 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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