PyNetworkIntel
Discover what's on your network, map how it's connected, and triage vulnerabilities — a pure-Python wrapper around nmap, SSH config grabs, rule checks, and live NVD lookups.
Before you scan anything: this tool actively probes network hosts. Only scan networks and devices you own or have explicit written permission to test. Unauthorized scanning may be illegal in your jurisdiction.
scan/analyzerefuse to run without--i-am-authorized,PYNETWORKINTEL_I_AM_AUTHORIZED=1, or an interactive confirmation.
Not to be confused with PyAPICheck: PyNetworkIntel maps devices, services, and vulnerabilities on a network; PyAPICheck focuses on API security and policy.
Which project do I need?
Part of the Mullassery open-source family. These tools have similar names — here is the short version of who does what:
| If you need to… | Use |
|---|---|
| Build a repository's dependency graph and match it against vulnerability advisories (Python, Rust, Node, containers) | PyDeepMesh |
| Understand why a Python dependency exists, who added it, and whether it is actually used | PyDependencyCheck |
| Statically analyze a dbt project (risky tests, test blast radius, cost) | PyDBTGuard |
| Statically analyze Apache Beam / Dataflow pipelines (cost, hot keys, reliability) | PyBeamGuard |
| Validate Airflow DAGs and dbt runs | PyAirflowTester |
| Simulate cascading-failure blast radius across infrastructure, data pipelines, and AI systems | PyBlastRadius |
| Check the quality of the data itself at runtime (schema, drift, anomalies) | StatGuardian |
| Discover devices, services, and vulnerabilities on a network | PyNetworkIntel |
| Discover and score API security risk (real traffic, agent/MCP, Cedar policy) | PyAPICheck |
| Trace and root-cause AI agent failures | PyAgentHound |
| Diagnose RAG retrieval failures | PyVectorHound |
| Orchestrate local, dependency-aware tasks (DAG scheduler + content-addressed cache) | PyTaskWireCheck |
What it is
PyNetworkIntel is a CLI and library that runs nmap -sV against a target, parses
the results into devices and services, optionally grabs configuration files from
reachable devices over SSH, checks discovered services against rule-based checks
and the NVD CVE database, and derives a subnet/gateway topology graph from the
results. An optional --summarize step produces a plain-English findings summary
via the Anthropic API.
It is pure Python with no bundled Rust engine, no trained ML models, and no
cloud-hosted service. Beyond nmap, SSH, NVD, and (only if you opt in) Anthropic,
it makes no hidden network calls.
Features / Highlights
- Device discovery —
nmap -sV-based host/port/service discovery (pynetworkintel.discovery). - Topology mapping — a real nodes/edges graph, not a flat list: devices are
grouped into inferred subnets with gateway-style edges derived from IP
addressing (
pynetworkintel.topology); export to GraphML or d3-json. - Vulnerability detection — config-based rule checks (weak SSH settings,
telnet exposure, etc.) plus live NVD CVE lookups by service/version
(
pynetworkintel.analysis). - Optional SSH config grabbing — pulls
sshd_config, firewall rules, and similar from devices you have credentials for, concurrently across hosts. - Change tracking — detects new/removed devices across scans, backed by a
local SQLite/SQLAlchemy history (
pynetworkintel.changes,pynetworkintel.db). - Reports & alerts — Markdown/JSON reports and chat-webhook/email/generic
webhook alert channels (
pynetworkintel.reporting,pynetworkintel.alerts). - Optional AI summary — a plain-English findings summary via the Anthropic
API, only when
--summarize/summarize=Trueis used. - Shipped extensions — cloud, Kubernetes, IoT, statistical-baseline ("ml"), and DevOps/IaC static-scanning modules (real, but lighter-tested — see Module status).
Who it's for / Use cases
- A one-off network inventory —
pynetworkintel scan <subnet>for "what's actually on this network right now," with a real topology graph. - Recurring drift/change detection — repeated scans against the same SQLite history to catch new/removed devices between runs.
- Pairing discovery with vulnerability triage —
analyzecross-checks discovered services against config rules and live NVD CVEs in one pass. - Homelab, lab, and small-office operators who want a structured, versioned, CVE-annotated, graphable asset inventory instead of scrollback text.
What it is not
- Not a replacement for
nmap. Its discovery step is annmap -sVsubprocess call. Raw nmap is lighter-weight if all you want is "what's listening where." - Not an enterprise platform. Multitenancy, HA, auth, and a REST API
(
enterprise) and a conversational architecture advisor (architect) are not shipped — excluded from the package entirely. - SARIF output —
pynetworkintel analyze ... -o sarifemits SARIF 2.1.0 for GitHub code scanning/SARIF viewers. One result per finding. - CVE data is cached, not bundled. NVD lookups are live REST calls written
to a local cache (default
~/.pynetworkintel/cve_cache.json, TTL viaPYNETWORKINTEL_CVE_CACHE_TTL). SetPYNETWORKINTEL_OFFLINE=1to forbid network calls; uncached services are skipped rather than failing the scan. The optional summary is still a live Anthropic call. - Not benchmarked. There is no committed benchmark script or results file, so no throughput/latency numbers are claimed here.
- Not uniformly hardened. Several shipped modules have thin test coverage (see Module status); the core scan → analyze → topology path is where the meaningful coverage lives.
Project status
Beta (v1.5.0). The core discovery → analysis → topology → reporting path is
implemented and tested. The cloud, kubernetes, iot, ml, and devops
extensions ship but are lighter-tested. enterprise and architect are excluded
from the distributed package. See ROADMAP_HONEST.md for the
current honest status and CLAUDE.md for an accurate architecture
description.
Installation
pip install pynetworkintel
The nmap binary must be installed separately and on PATH (the package wraps
it via subprocess). Without it, discovery returns no results, but the rest of
the API still works.
Optional extras for the lighter-tested cloud/Kubernetes asset-discovery modules:
pip install "pynetworkintel[cloud]" # boto3, azure-mgmt-*, google-cloud-*
pip install "pynetworkintel[kubernetes]" # kubernetes python client
Quick start
pip install pynetworkintel
# nmap must also be installed and on PATH (brew install nmap / apt install nmap / etc.)
pynetworkintel scan 192.168.1.0/24
# -> prompts to confirm you're authorized to scan this target, then runs
from pynetworkintel import Scanner
scanner = Scanner() # no SSH by default
result = scanner.scan("192.168.1.0/24")
for device in result.devices:
print(f"{device.ip} ({device.hostname or 'unknown'})")
for service in device.services:
print(f" - {service.name} {service.version or ''} on port {service.port}")
print(result.topology().to_dict()) # subnet groupings + inferred gateway edges
Usage
CLI:
# Scan a subnet (prompts for scan authorization the first time)
pynetworkintel scan 192.168.1.0/24
# Grab SSH config from reachable devices (explicit --ssh-user required)
pynetworkintel scan 192.168.1.0/24 --ssh-user admin --ssh-key ~/.ssh/id_rsa
# Non-interactive / CI use: skip the confirmation prompt explicitly
pynetworkintel scan 192.168.1.0/24 --i-am-authorized
# Full pipeline: scan + vulnerability analysis + AI summary
pynetworkintel analyze 192.168.1.0/24 --summarize
# JSON output (devices, findings, and the topology graph)
pynetworkintel scan 192.168.1.0/24 --output json
# Save results to a file
pynetworkintel analyze 192.168.1.0/24 --output-file results.json
SSH passwords are never accepted as a CLI flag. Use --ssh-key or set
PYNETWORKINTEL_SSH_PASSWORD in the environment.
Python pipeline API:
from pynetworkintel import Pipeline
pipeline = Pipeline(
ssh_username="admin", # optional; omit to skip SSH config grabbing
ssh_key_path="~/.ssh/id_rsa",
)
result = pipeline.run("192.168.1.0/24", summarize=False)
print(result["summary"]) # counts: devices, findings by severity, subnets
print(result["topology"]) # {"nodes": [...], "edges": [...], "subnets": [...]}
for finding in result["findings"]:
print(finding["severity"], finding["title"])
Module status
Being direct about what is tested vs. real-but-lighter-tested vs. not shipped:
| Module | Status | Notes |
|---|---|---|
models, topology, topology_export, analysis/cve, analysis/rules, db, config |
Core, well-tested | 83–100% line coverage (pytest --cov); primary meaningful coverage lives here. |
discovery/scanner |
Core, tested | ~64% coverage; XML parsing, target validation, per-record error isolation covered. |
core, discovery/ssh_config, analysis/llm |
Core, partially tested | 34–48% coverage; security-relevant paths covered by tests/test_security.py. |
cli, dashboard, scheduler, alerts, changes, reporting |
Core, thin coverage | 10–52% coverage; reporting.py is ~10%. |
cloud, kubernetes, iot, ml, devops |
Shipped, lighter-tested | Real code, lazy-imported SDKs; 11–45% coverage. The ml module is statistics-based, not a trained model. |
enterprise, architect |
Not shipped | Excluded from the package in pyproject.toml; enterprise-platform scope, unrelated to network discovery. |
Security
- Scan authorization is required —
--i-am-authorized,PYNETWORKINTEL_I_AM_AUTHORIZED=1, or interactive confirmation. - No default SSH user —
--ssh-usermust be passed explicitly. - No
--ssh-passwordflag — use--ssh-keyor thePYNETWORKINTEL_SSH_PASSWORDenvironment variable. - SSH passwords are never persisted to disk — the config file
(
~/.pynetworkintel/config.yaml) is chmod'd0600. - SSH host key verification uses
paramiko.WarningPolicy. - Scan targets are validated before reaching the
nmapargv.
See SECURITY.md for how to report a vulnerability.
Documentation
- docs/DASHBOARD.md — the live terminal stats viewer
(
--dashboard). - CLAUDE.md — accurate architecture description for engineers working on the codebase.
- ROADMAP_HONEST.md — current honest status and technical debt with file:line specifics.
- CHANGELOG.md, CONTRIBUTING.md, SECURITY.md.
docs/ARCHITECTURE.md, docs/PRODUCT_VISION.md, and docs/ROADMAP.md are
stale/placeholder documents from earlier planning, each carrying an in-file
banner saying so — refer to CLAUDE.md and ROADMAP_HONEST.md instead.
Contributing
Contributions are welcome — see CONTRIBUTING.md. Development workflow:
pip install -e ".[dev]"
pytest tests/ -v
CI (.github/workflows/tests.yml) runs pytest tests/ -v on Python 3.10/3.11/3.12
and fails the build on any test failure.
License
This project is licensed under the Apache License 2.0.
Metadata
Release files for pynetworkintel 1.7.0
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 |
|---|---|---|---|---|
| pynetworkintel-1.7.0.tar.gz | 127.1 kB | Without provenance | Details for pynetworkintel-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynetworkintel-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for pynetworkintel-1.7.0-py3-none-any.whl |
Total release size: 249.1 kB
Release files / pynetworkintel-1.7.0.tar.gz
| Download URL | pynetworkintel-1.7.0.tar.gz |
|---|---|
| Size | 127.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee48823be825be690c983e8ad7548e24eb4415b282428a29864103855ad7d455
|
|
BLAKE2b-256 checksum How to use checksums |
356225507462c95d26ec7e3c7d17f2434379cc5e0274916fad5617f4eff348d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / pynetworkintel-1.7.0-py3-none-any.whl
| Download URL | pynetworkintel-1.7.0-py3-none-any.whl |
|---|---|
| Size | 122.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f16d1a6bb73bae2619fec57b21aa57b73409a235460955bd8241c6ad1e78b0c
|
|
BLAKE2b-256 checksum How to use checksums |
d0129f3d9730538e353acea4076df758a2d114b58e58455c25eac676d96cd7ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for pynetworkintel 1.7.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.