Conversation
|
@cursor bugbot and security agent, I find it hard to believe there were no issues found?? |
|
There were issues. Bugbot was wrong to treat this as clean. The claimed cleartext fix was still bypassable: Hop spend on honest gateways, transport-keyed circuit breakers, and cert-bound colony membership hold. Residuals I did not change: the hop count is still unauthenticated wire data, claimed |
|
Security review of this PR found real issues; they are not “no findings.” Fixed on this branch
Looked at, not a regression in this commit
Residuals (pre-existing / design)
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f270acb. Configure here.
f270acb to
e6f52cd
Compare



Summary
A hand-written
RouterPolicycould decode an encrypted or compressed body, because the cleartext guard lived only inside theroutes!macro expansion rather than on the trait. This branch closes that along with the rest of the phase 1-2 audit findings, then moves every domain operation onto an owner type so each invariant it relies on has exactly one home.Related Issues
None
Changes Made
RouterPolicy::dispatchnow rejects encrypted and compressed bodiesTesting
make test-all: passesBreaking Changes
RouterPolicy::dispatch_cleartext, notdispatch. The guard runs indispatch.canonical_bytes(&urn)becomesurn.canonical_bytes().Note
Medium Risk
Changes federation gateway registration, signer binding, and relay hop accounting on security-sensitive paths; most other edits are API relocation with matching test updates.
Overview
This PR finishes the phase 1–2 audit follow-up: tighten cluster control-plane identity and move dozens of loose helpers onto the types that own their invariants, with fuzz harnesses and clients updated to the new method style (
urn.canonical_bytes(),Version::V0.compose(), etc.).Hive registration and updates now require a DER signer on every
registercall;HiveEntry.signer_idis mandatory and re-registration only accepts the originally bound signer. Unsigned registration frames are refused, andHiveRegistry::signer_matchescentralizes update attribution (CWE-639).Relay forwarding spends hop budget when minting
HopBudget::relayed_work/relayed_route, andClusterError::forward_statusmaps forward failures to the rightTransitStatusfor callers. Colony membership and certificate helpers live onColonyNamespaceandCertificate::fingerprint_id; work wrapping usesClusterWorkRequest::transport_frame/ClusterWorkResponse::served_reply.Gateway runtime consolidates TLS identity (
ClusterTlsConfig::identity), outbound pools (PoolConfig::build_cluster_pools), address-update parsing, export warnings, and gossip advertise/reconcile intoGossipBeat/ClusterConfigmethods—behavior preserved, structure grouped by owner.Reviewed by Cursor Bugbot for commit e6f52cd. Bugbot is set up for automated code reviews on this repo. Configure here.