Skip to main content

Home Assistant Diagnostics Privacy Checker

Scan a Home Assistant integration diagnostics JSON export for likely unredacted API keys, passwords, tokens, emails, addresses, and other personal data. The checker prints JSON paths and rule names only; it never prints the value it found.

Home Assistant recommends diagnostics so users can attach useful data to public issue reports, and its quality guidance requires sensitive values to be redacted. This package gives integration authors a quick local and CI check for exported diagnostics files.

Install

python -m pip install ha-diagnostics-check

Check a diagnostics export

Export diagnostics for a config entry or device from Home Assistant, save the JSON file locally, then run:

ha-diagnostics-check diagnostics.json
ha-diagnostics-check diagnostics.json --json

The command exits 0 when no likely sensitive data is found, 1 when it finds a problem, and 2 when it cannot read the file. Use the JSON output to integrate it with CI.

What it checks

  • Sensitive key names such as api_key, password, authorization, email, address, and coordinates.
  • High-confidence value patterns such as bearer credentials, GitHub tokens, private-key headers, and email addresses.
  • Nested dictionaries and arrays, including Home Assistant **REDACTED** values.

Test in a Home Assistant integration

Use Home Assistant's own get_diagnostics_for_config_entry or get_diagnostics_for_device test helper to create the same JSON users download, then run this checker against that file. The helper verifies the integration path; this checker adds a value-pattern scan. It is a heuristic, so review findings and add domain-specific rules for your integration. It does not replace Home Assistant's diagnostics tests or guarantee that all personal data is detected.

Development

python -m unittest discover -s tests -v

Keywords: Home Assistant integration diagnostics, redact secrets, diagnostics privacy test, API key leak check, Home Assistant CI, Python integration testing.

License

MIT

Metadata

Release files for ha-diagnostics-check 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 ha-diagnostics-check 0.1.0
File Size Uploaded Provenance Actions
ha_diagnostics_check-0.1.0.tar.gz 5.5 kB With provenance Details for ha_diagnostics_check-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ha-diagnostics-check 0.1.0
File Interpreter ABI Platform Actions
ha_diagnostics_check-0.1.0-py3-none-any.whl Python 3 none any Details for ha_diagnostics_check-0.1.0-py3-none-any.whl

Total release size: 11.2 kB

Release files / ha_diagnostics_check-0.1.0.tar.gz

Download URL ha_diagnostics_check-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c57e455b8ffcdebead947f13cbe09d3caa5987326700f01cb48b650a3314833d
BLAKE2b-256 checksum
How to use checksums
c942b8fd233e55c2529e93f80659d766e802d406e6c4fe9a78bd4a7f425b720c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

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

Download URL ha_diagnostics_check-0.1.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cec384afb520e14a9c8cbe34a9efa3dca7f2a50edd57cdf7f028e5a3e1d3ee7f
BLAKE2b-256 checksum
How to use checksums
0b0ceef39f39f1b0e91e22bf24661a609b71e6ce3ea6452a745953af39a7ef64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for ha-diagnostics-check 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ha_diagnostics_check-0.1.0.tar.gz

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 Nov 21, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full 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