Internet exposure inventory
The Assets view includes Internet entries: a read-only inventory of listener bindings and configured forwarding, proxy and tunnel relationships. A public address, an open local socket or a complete configuration association is not proof of internet reachability. This release performs no external probes, cloud API discovery, vulnerability exploitation or network changes.
Collection and supported formats
Collection follows the existing asset collector identity, host permissions, schedule and manual collection action. Basic metadata collection uses fixed POSIX shell commands and is independent of Python: ss (or BusyBox netstat), narrowly formatted docker ps, nft -j, iptables -S, and a field-filtered uci show firewall. These outputs are parsed and projected immediately in server memory; raw command output is never persisted, logged, notified or sent to a model. Firewall metadata can contain arbitrary comments, so it is not considered inherently secret-free; comments and unknown fields are discarded by the server projection. UCI removes non-routing fields on the host.
Credential-bearing configuration projection runs on the host under Python 3. It discards headers, authentication material and credential references before crossing SSH. Without Python only those adapters are unavailable; the basic collectors still run. Fixed read-only commands are invoked without shell interpolation of discovered arguments. No container is started, no privilege is escalated, and no package is installed.
| Adapter | Supported evidence | Unresolved cases |
|---|---|---|
listen | TCP/UDP bindings from ss -H -tuln; IPv4 and IPv6 are separate | Wildcards without current interface evidence; service identity and external reachability |
docker | Explicit scalar published ports from docker ps | Port ranges and container destination IPs remain incomplete |
nft | Scalar DNAT rules with equality destination-port matches, optional source CIDR | Dynamic maps, ranges, chain/filter acceptance and rule reachability |
iptables | Simple IPv4 DNAT rules from the NAT table with explicit TCP/UDP port and destination | Negation, ranges, custom jumps and filter acceptance |
uci | Enabled OpenWrt redirect objects with scalar source/destination ports | Configured rules are not evidence that the runtime firewall accepted them |
nginx | Static server/listen/location/proxy_pass relationships, declared TLS listeners | Dynamic upstreams, Unix sockets, rewrite effects and access policy |
ingress | Kubernetes v1 Ingress HTTP rules with numeric backend ports and declared TLS hosts | Named ports, default backends, controller realization, DNS and access policy |
tailscale | Web proxy handlers explicitly enabled in AllowFunnel | Serve alone is not public; foreground/TCP configurations are incomplete |
frp | TCP/UDP proxies in /etc/frp/frpc.toml | Uses tomllib where available, with a conservative scalar TOML fallback on older Python; includes and plugins are incomplete; server binding and runtime state are unverified |
cloudflared | Static ingress hostname/service rules in /etc/cloudflared/config.yml, .yaml, or /usr/local/etc/cloudflared/config.yml | Uses PyYAML where available, with a conservative scalar ingress fallback; remotely managed tunnels, DNS, edge TLS/access policy and runtime state are unverified |
frp parsing follows its configuration format and TCP/UDP proxy fields. Cloudflared projection follows the locally managed tunnel configuration format. frp/cloudflared configuration locations are also discovered from the running executable's --config/-c argument through /proc; other arguments (including tokens) never leave the host. Relative paths resolve against that process's working directory. Only regular files are read, with at most 16 paths per adapter. Credential files and frp include files are not followed. Legacy frp INI, complex fallback TOML/YAML syntax, cloud-managed tunnel configuration, WireGuard routing and arbitrary socat process command lines are not covered.
Host Caddy collection first uses a fixed loopback GET /config/ on port 2019 (IPv4, then IPv6). The HTTP client ignores proxy settings, does not resolve external names or follow redirects, limits each attempt to two seconds and the response to two million bytes, and projects only routing evidence inside the host process. Runtime DNS API tokens and other credentials never cross SSH. This avoids needing systemd environment variables to adapt the Caddyfile. Entries carry an explicit runtime-config provenance constraint. Custom admin addresses and Unix sockets are not queried.
If the local admin interface is unavailable or invalid, Caddy HTTP reverse proxies fall back to native JSON or caddy adapt --config ... --adapter caddyfile, without --validate, reload, mutating API calls or configuration writes. Custom paths use the running Caddy process's config argument. Dynamic upstreams, effective access policies, automatic TLS realization and non-HTTP apps remain unverified.
container_proxy inspects up to 32 running Docker containers using only command identity, network mode and port bindings. Recognized nginx/Caddy processes use fixed docker exec read commands. Published ports are projected onto host bindings; unpublished ports retain a synthetic container endpoint. Host networking is explicit; other container loopback backends never link to host loopback. CRI-only workloads, unusual wrapper entrypoints and container-managed cloudflared configurations are not covered by this adapter.
A host takes at most two SSH sessions per collection. The first runs the five portable sources and checks for python3, each source in its own section with a five-second limit (where timeout exists), a two-million-byte output limit and its own exit status; it stays small enough for dropbear, which refuses exec commands over about 9000 bytes. The second runs the secure Python projection, only where python3 exists, with a sixty-second limit and a fifty-second subprocess budget. A source whose tool is missing (exit 127) is unsupported, as are the Python sources when python3 is missing; other failures, and a section cut short, remain failed. No more than four hosts run concurrently. Each source keeps at most 300 projected records. Missing Python, unavailable tools/libraries, denied access, failure, invalid data, truncation and incomplete parsing are coverage gaps, not evidence that there are no entries. No software is installed automatically and privileges are never escalated.
Evidence and paths
The new exposure_observations, exposure_entries and exposure_changes tables store immutable observations, current entries, and a durable change/notification outbox. Migrations are supplied for SQLite, PostgreSQL and MySQL. Snapshot updates and change events commit in one transaction.
Each source object has one stable rule identity per owner and host. Wildcards collect same-family observed interface bindings into a bindings list instead of producing a row per interface. reachedVia is not used to guess a NAT mapping. Private/local listeners stay visible as backend evidence. Every entry displays its binding scope and external reachability: not tested.
Paths follow exact explicit endpoint mappings, never depends_on or established connections. Localhost endpoints are scoped to their source host. Unresolved names, ambiguous endpoints, stale evidence, cycles and paths exceeding eight hops remain incomplete. Constraints, route hostname/path conditions and observation IDs remain attached to each hop. Proxy routes at one endpoint form conditional branches, including multiple upstreams for the same route. A listener at that endpoint supports the forwarding evidence instead of creating a competing route. Hop endpoints show the explicit matched binding. Expansion stops at a second ambiguous branch selection rather than inventing a Cartesian product of possible HTTP requests. Each entry is limited to 128 paths and eight hops, with truncation explicit. Complete configuration association does not imply firewall acceptance or exploitability.
A complete successful source collection is required before an old entry can be marked no longer observed. Failed collections preserve old entries as stale. Partial collections keep successfully parsed records fresh and mark only missing previous records stale; an incomplete snapshot never proves disappearance. Unsupported rules have bounded per-rule coverage issues. Unknown wildcard address families remain explicit record constraints, and Docker interface negation is represented rather than failing the source. Evidence older than 48 hours is also shown as stale. The first snapshot is a baseline; notices are grouped per collection/owner and retried using a stable batch deduplication key.
Review, permissions and interpretation
assets.view is required to read entries. Every response, historical change and notice is additionally filtered by current connection access to the source and known target hosts. A path involving a hidden host is omitted rather than leaking its address through a partial diagram. Counts and pagination are calculated after this filtering. Permission revocation affects already stored evidence as well.
assets.manage is required to set or unlock a review priority and request AI interpretation. Rule priorities are review hints, not vulnerability verdicts. A user override is preserved by subsequent collection. AI interpretation is an optional single bounded call with no tools, no execution capabilities and only the selected authorized evidence. Its output is labeled separately, is not persisted as a fact, and cannot update an entry's priority or verification state. Access and evidence are checked again before the interpretation is returned.
The UI defaults to Internet entry candidates: observed public bindings, OpenWrt DNAT with the explicit wan source-zone hint, and configured cloudflared/Funnel public tunnels. WAN is a configuration hint, not proof of a routable address or firewall acceptance. Hostnames alone and Kubernetes Ingress alone do not establish public exposure. Loopback/internal/bridge evidence is available under All evidence, and unknown bindings have a separate view; these records are not deleted. Counts and search include authorized grouped bindings and route branches. High-priority entries sort first.
High review priority applies to internet candidates exposing sensitive entry/backend service ports (including SSH, PostgreSQL, DNS and management services), or a critical asset. Known internal-only evidence is low; unknown exposure stays medium. Every priority has an explanation, and none is a vulnerability verdict. Manual choices are preserved. The UI offers address, zone, source, priority and freshness filters, paginated entries, evidence details and recent changes. A failed refresh clears previously displayed data rather than leaving inaccessible rows visible. Notifications contain only counts and a link to the authorized view.
History retention defaults to 90 days and is configurable from 7 to 365 days in the plugin admin settings. Pending notices, the latest coverage record per source and observations referenced by current entries are retained. Existing asset collection times are interpreted in UTC; this feature does not silently change the scheduler's timezone.
Validation and rollout
Seven anonymized audit snapshots reconstruct 193 listener records for parser replay (not a new live-host acceptance). A shell test runs OpenWrt collection with no Python on PATH. Dependency-free fallbacks, Caddy nested routes and container port projection have dedicated fixtures. Fixture tests exercise parser projections, credential exclusion, partial results, exact paths, loopback isolation, transactional rollback, change deduplication, manual priority locks, permission revocation, notification retry and the UI's uncertainty labels. Provider interpretation tests use a mocked model and account for the usage supplied by it.
Database migration tests exercise SQLite; PostgreSQL/MySQL migrations are generated and validated but require their own runtime acceptance. Real-host output, host Python/library availability and externally observed reachability have not been validated by these local tests. Deploying this branch and collecting authorized host samples is a separate rollout step.
Kube-proxy DNAT records inherit the original port/address only through explicit KUBE-* chain jumps from a matching TCP/UDP port rule. Multiple backends remain separate conditional candidates, with load-balancing and chain acceptance unverified. Missing parents and negated entry conditions remain coverage gaps; cycles, more than 16 hops, 10,000 traversal steps or 300 expanded bindings prevent a complete snapshot. Backend ports are never substituted for unknown original ports.
Compatibility and inventory replay
Legacy interface-expanded rows are grouped on read, so deployment does not require waiting for a full collection. The next write replaces only that owner/host/source's current rows inside the existing snapshot transaction; immutable observations and historical changes remain intact. Equivalent regrouping does not generate add/remove events. First-seen times and manual overrides survive; if old bindings have conflicting manual overrides, the highest manual priority wins. Partial snapshots retain missing binding evidence as stale and pin its observation IDs for retention. No new schema migration is required.
AI interpretation stays within the existing input budget; oversized inventories select a bounded subset of paths and report omitted path/binding counts explicitly. Authorization and current evidence are checked before returning an interpretation.
scripts/replay-exposure.ts reads a local export and prints only aggregate diagnostics. It does not connect to any host. Replaying the supplied 11,025-row export yielded 2,098 grouped rules and 42 internet candidates (17 high, 25 medium); Caddy collapsed from 456 rows to 76 routes. WAN TCP/443 linked to 69 conditional branches, while UDP/443 remained partial without matching proxy evidence. These are offline replay results, not a new production acceptance.