DNS Sentinel
DNS Sentinel is a read-only command-line tool and Python library for a first-pass review of public DNS security configuration. It checks SPF, DMARC, CAA, MX, nameserver count, and DNSSEC record presence. It is an early MVP: results are evidence-based hints, not a compliance certificate or a substitute for a mail/DNS specialist.
Install and run
Requires Python 3.10 or newer.
python -m pip install dns-sentinel
dns-sentinel example.com
dns-sentinel example.com --json
To install the development version from source:
git clone https://github.com/kkevadiya54/dns-sentinel.git
cd dns-sentinel
python -m pip install .
dns-sentinel example.com
dns-sentinel example.com --json
Exit status is 0 when no error-severity findings exist, 1 when an error-severity finding exists, and 2 when input or runtime setup prevents an audit. Warnings can indicate missing controls or incomplete answers. Network timeouts are reported per check and do not discard other results.
Use only for domains you are authorized to assess. The tool sends ordinary DNS queries to the system-configured recursive resolver; it does not scan hosts, change DNS, or send email.
What checks mean
| Check | MVP behavior | Not claimed |
|---|---|---|
| SPF | Detects zero/multiple policies and performs basic token sanity checks | Full RFC 7208 evaluation, include/redirect expansion, DNS lookup limits, or authorization outcome |
| DMARC | Requires one _dmarc TXT policy and validates version, policy, duplicate tags, pct, and basic rua syntax |
Full RFC 9989 semantics, organizational-domain discovery, or report processing |
| CAA | Checks returned CAA tag names and flags | Complete CAA tree-walk inheritance, issuer authorization semantics, or certificate issuance outcome |
| MX | Checks preference/exchange shape, duplicate targets, and RFC 7505 null MX | Whether each mail host is reachable or correctly configured |
| NS | Counts distinct returned NS targets | Independent operators, networks, geographic diversity, or authoritative delegation consistency |
| DNSSEC | Reports whether DNSKEY and DS records were observed at the queried name | Cryptographic validation. The resolver may or may not validate; this tool does not inspect signatures or establish a chain of trust. |
DNS negative answers and resolver failures are different. A timeout, SERVFAIL-like nameserver failure, or local resolver problem produces an unknown/warning result where relevant; it is not reported as proof that a record is absent. DNSSEC checks are strictly record-presence checks.
Python API
from dns_sentinel import Auditor
report = Auditor(timeout=2, lifetime=5).audit("example.com")
for finding in report.findings:
print(finding.check, finding.status, finding.message)
print(report.to_dict())
Development
python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
pytest --cov=dns_sentinel --cov-report=term-missing
ruff check .
mypy
python -m build
Integration checks can query a domain you control, for example dns-sentinel example.com; the unit suite uses deterministic resolver fakes and does not depend on public DNS.
Contributing
Read CONTRIBUTING.md, the Code of Conduct, SECURITY.md, and COMMUNITY.md. Small reproducible fixes, standards-backed tests, documentation improvements, and carefully scoped record checks are welcome. Please do not claim a check validates more than it does.
Browse beginner-friendly issues or join the beta testing invitation. Please comment before starting work on issues that ask for maintainer alignment.
Project status
Alpha software. Version 0.1.0 is available on PyPI. Community growth and protocol coverage remain ongoing work; see ROADMAP.md for the staged plan and limits.
License
MIT; see LICENSE.
Metadata
Release files for dns-sentinel 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dns_sentinel-0.1.1.tar.gz | 15.1 kB | With provenance | Details for dns_sentinel-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dns_sentinel-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dns_sentinel-0.1.1-py3-none-any.whl |
Total release size: 24.9 kB
Release files / dns_sentinel-0.1.1.tar.gz
| Download URL | dns_sentinel-0.1.1.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1b77cd303330aa3b360e0b7a84c9a8e3a4850ee4ed0ab35b370978fa3306a1e
|
|
BLAKE2b-256 checksum How to use checksums |
8e3f3b2d9d5aa9bea25f44f2cdf8dad0be437304653b7af4ac7ac2ccb50d2413
|
| 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 26, 2026.
Transparency logRelease files / dns_sentinel-0.1.1-py3-none-any.whl
| Download URL | dns_sentinel-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dc72925ac0784b4c2d174fa796498014d4edebb371560da1ccc4ae5f34dd6c4
|
|
BLAKE2b-256 checksum How to use checksums |
b9a77265d664c7b3e4d7a72c6ceb6fcd176a1ac1f7a9ec179f5d8537a60e3c86
|
| 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 26, 2026.
Transparency logSecurity for dns-sentinel 0.1.1
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.
Attestation for dns_sentinel-0.1.1.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 26, 2026.
Transparency logA 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.