Asset map kit for Cloudflare: what you own, declared in code versus found live

Status: in development. Nothing here is released or deployed.

The Asset map kit keeps a picture of what you have on Cloudflare: zones, hostnames, Workers, routes and Access applications, and how they connect. It only reads your Cloudflare account; its writes are to its own database.

Purpose

When a signal names a hostname, the useful next question is what it belongs to and what depends on it. The Asset map answers that. It also compares what you declared in code with what is live, and raises a finding for anything that exists but is not declared, or has drifted. Every asset has an id of the form cf:kind:name, one grammar shared by all kits. A source that fails to read never causes a deletion: the previous picture is kept.

What it deploys on Cloudflare

Sources are pluggable. The first two are a JSON file of what you declare and a Cloudflare source. The sync also raises findings: a reachable hostname with no Access application, an Access policy that is open to everyone, a token or certificate that expires within 30 days, and a zone with no WAF ruleset.

Capability entrypoint

AssetRead is a read-only door for a peer Worker. Its methods are asset, byHostname, downstream (what breaks if it fails), upstream (what it needs) and find. Every asset has an access level, and by default it is owner-only. A caller reads up to a ceiling you set in configuration, and anything above it is simply absent from the answer. With no ceiling set, every call is refused. The default entrypoint has none of these methods.

HTTP routes

Behind Cloudflare Access apart from health. The scheduled sync is not an HTTP route.

Until you set the Access team domain and application audience, every /v1 route answers 503. There is no route that writes to your Cloudflare account and no operator capability.

How a person approves things

There is nothing to approve: the kit changes nothing in your account. The only write is a person ignoring a finding, which a service token cannot do and which is recorded against the verified person. Declaring an asset is a change to a file in the kit's repository, which goes through review.

Stop switches

The Asset map has no stop switch. It only reads, with a read-only token. Leaving the token unset leaves the Cloudflare source unconfigured, and the kit keeps the last picture.

Peers

Optional. Enrichment can look up an asset by hostname if you bind it to AssetRead. Without the Asset map, Enrichment skips the asset layer and says so in the case.