Enable dual-stack Nebula mesh and router exit #307

Merged
nimmo merged 22 commits from feat/router-nebula into main 2026-10-10 10:37:17 +01:00
Owner

The mesh needs dual-stack addressing, a router lighthouse/relay, and a phone internet exit that no longer uses Vega. This change adds shared NixOS wiring, paired credentials and certificate retirement controls; native deployments remain maintained in the separate ~/Projects/router-nebula project.

  • Share router overlay addresses and split-default exit routes through nebula/router.json. Use dual-stack listeners, retain VPS discovery, and opt registered NixOS hosts into router lighthouse/relay bootstrap. Publish IPv6 hosts/DNS records only after confirmed activation.
  • Disable Vega's lighthouse, relay and internet-exit roles while retaining its ordinary mesh services and DNS. Phone full-tunnel bundles use router DNS and the router exclusively.
  • Provision v2 dual-address certificates with SOPS identity fallback; accept bare IPv4/IPv6 or explicit CIDR lists, preserve existing networks/groups by default, and support explicit unsafe-authority removal. IPv6-only bundles and lighthouse DNS binding are supported.
  • Emit explicit empty/populated PKI blocklists consistently in standard and inline mobile exports. Standard bundles do not require router exit metadata. Ignore and clean temporary plaintext bundles.
  • Block retired Chaos/Cosmos fingerprints and disconnect invalid peers; retain public certificates for audit. Refuse provisioning retired names and revocation of registered NixOS hosts. Reissue deliberately leaves old certificates valid during staged activation; #297 tracks retiring Vega's old exit fingerprint after the new pair is live, separately from retired host names.
  • Keep native/OpenWrt scripts and tests external. Native hosts use literal bootstrap endpoints without OS /etc/hosts changes or Docker extra_hosts. NixOS keeps its maintained router-underlay workflow.
  • Enable formal automated approvals as explicitly requested. The trusted-base review policy becomes effective after merge.

Validation: full nix flake check passed after the Nix changes/rebase. Provisioning, revocation and expanded bundle regressions plus ShellCheck pass in the external project. Bundle cases include IPv4/IPv6-only/dual-stack certificates, populated/empty/absent registries, missing/malformed exit metadata, and Nebula config tests for generated configs/imports. The latest automated review on a4ca4ea reports Ready to merge and its CI test passed; the final documentation-only follow-up 50a3e7c clarifies intentional certificate overlap and has focused review/git diff --check validation. Final CI test at 50a3e7c passed. Its automated review is waiting for a runner; main has no required status/approval gates. The last code review at a4ca4ea reports Ready to merge; 50a3e7c changes README only and received focused review.

Live canary: user-run just test at 1d9c3ad preserves Electra's igpu tier, with Nebula 1.10.3 active on both overlay addresses, two blocked fingerprints, authenticated IPv6-underlay router handshake, router IPv4/IPv6 and VPS IPv6 pings, and native-host SSH. This canary predates the review fixes/rebase; follow-ups affect provisioning/export behavior and docs while preserving its Nebula runtime settings. Upstream stdenv deprecation warnings were reviewed.

Already deployed outside NixOS: router, VPS, Nova, NAS, Media1 and Nimmog-de have validated dual-address configurations/credentials and mesh connectivity. Android's rendered config includes both retired fingerprints and SSH works. NAS was recreated through Portainer with latest and no extra_hosts. Temporary plaintext bundles/staging were shredded/removed; protected rollback backups remain.

Remaining live evidence: NixOS credentials/revocations on Vega/Lyra/Lena, persistent deployment and no-op acceptance, host service/relay-path checks, retirement of Vega's superseded exit certificate, public IPv6 router bootstrap and phone IPv6 internet egress. Host/retirement issues remain open; merge alone does not establish fleet-wide revocation.

Relates to #293 and milestone 32; IPv6 follow-up #306. Review-action issue #32 tracks incomplete changed-file pagination and formal-review feedback lookup. The complete MR diff includes paired Vega/phone/router encrypted-file changes, despite their omission from review batches. Reviewer semantic questions were answered with primary sources and deployed-router evidence in comment 2978.

The mesh needs dual-stack addressing, a router lighthouse/relay, and a phone internet exit that no longer uses Vega. This change adds shared NixOS wiring, paired credentials and certificate retirement controls; native deployments remain maintained in the separate ~/Projects/router-nebula project. - Share router overlay addresses and split-default exit routes through nebula/router.json. Use dual-stack listeners, retain VPS discovery, and opt registered NixOS hosts into router lighthouse/relay bootstrap. Publish IPv6 hosts/DNS records only after confirmed activation. - Disable Vega's lighthouse, relay and internet-exit roles while retaining its ordinary mesh services and DNS. Phone full-tunnel bundles use router DNS and the router exclusively. - Provision v2 dual-address certificates with SOPS identity fallback; accept bare IPv4/IPv6 or explicit CIDR lists, preserve existing networks/groups by default, and support explicit unsafe-authority removal. IPv6-only bundles and lighthouse DNS binding are supported. - Emit explicit empty/populated PKI blocklists consistently in standard and inline mobile exports. Standard bundles do not require router exit metadata. Ignore and clean temporary plaintext bundles. - Block retired Chaos/Cosmos fingerprints and disconnect invalid peers; retain public certificates for audit. Refuse provisioning retired names and revocation of registered NixOS hosts. Reissue deliberately leaves old certificates valid during staged activation; #297 tracks retiring Vega's old exit fingerprint after the new pair is live, separately from retired host names. - Keep native/OpenWrt scripts and tests external. Native hosts use literal bootstrap endpoints without OS /etc/hosts changes or Docker extra_hosts. NixOS keeps its maintained router-underlay workflow. - Enable formal automated approvals as explicitly requested. The trusted-base review policy becomes effective after merge. Validation: full nix flake check passed after the Nix changes/rebase. Provisioning, revocation and expanded bundle regressions plus ShellCheck pass in the external project. Bundle cases include IPv4/IPv6-only/dual-stack certificates, populated/empty/absent registries, missing/malformed exit metadata, and Nebula config tests for generated configs/imports. The latest automated review on a4ca4ea reports Ready to merge and its CI test passed; the final documentation-only follow-up 50a3e7c clarifies intentional certificate overlap and has focused review/git diff --check validation. Final CI test at 50a3e7c passed. Its automated review is waiting for a runner; main has no required status/approval gates. The last code review at a4ca4ea reports Ready to merge; 50a3e7c changes README only and received focused review. Live canary: user-run just test at 1d9c3ad preserves Electra's igpu tier, with Nebula 1.10.3 active on both overlay addresses, two blocked fingerprints, authenticated IPv6-underlay router handshake, router IPv4/IPv6 and VPS IPv6 pings, and native-host SSH. This canary predates the review fixes/rebase; follow-ups affect provisioning/export behavior and docs while preserving its Nebula runtime settings. Upstream stdenv deprecation warnings were reviewed. Already deployed outside NixOS: router, VPS, Nova, NAS, Media1 and Nimmog-de have validated dual-address configurations/credentials and mesh connectivity. Android's rendered config includes both retired fingerprints and SSH works. NAS was recreated through Portainer with latest and no extra_hosts. Temporary plaintext bundles/staging were shredded/removed; protected rollback backups remain. Remaining live evidence: NixOS credentials/revocations on Vega/Lyra/Lena, persistent deployment and no-op acceptance, host service/relay-path checks, retirement of Vega's superseded exit certificate, public IPv6 router bootstrap and phone IPv6 internet egress. Host/retirement issues remain open; merge alone does not establish fleet-wide revocation. Relates to #293 and [milestone 32](https://git.nimmog.uk/nimmo/nixos-config/milestones/32); IPv6 follow-up #306. [Review-action issue #32](https://git.nimmog.uk/nimmo/forgejo-auto-pr-review/issues/32) tracks incomplete changed-file pagination and formal-review feedback lookup. The complete MR diff includes paired Vega/phone/router encrypted-file changes, despite their omission from review batches. Reviewer semantic questions were answered with primary sources and deployed-router evidence in [comment 2978](https://git.nimmog.uk/nimmo/nixos-config/pulls/307#issuecomment-2978).
feat(nebula): complete native dual-stack certificate rollout
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m25s
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 12m33s
1d9c3ad88d
clankbot left a comment

Automated code review

Reviewed commit: 1d9c3ad88d7120c8804c2fa579c908536e399172

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The dual-stack Nebula wiring is internally consistent across the changed files: modules/networking/nebula.nix defines routerBootstrapAddresses/routerUnderlayAddresses/ipv6HostMap, and all four registered NixOS hosts (electra, lena, lyra, vega in hosts//default.nix, the only nixosConfigurations in flake.nix:271) set routerBootstrapAddresses = [ "router-underlay:4242" ], matching the README statement that all registered NixOS mesh hosts opt into the router bootstrap. The ipv6HostMap default matches the README inventory (pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone, electra). Every secrets/nebula/.yaml required by the module for an enabled host exists (secrets/nebula contains electra, lena, lyra, vega plus the external nodes), nebula/revoked.json is present and parses as an object of name -> fingerprint arrays, and the module's lib.flatten (builtins.attrValues ...) consumes that shape. The retired-name guards in nebula-reissue/nebula-add-host/nebula-bundle match the README claim that 'Chaos and Cosmos are retired; provisioning recipes refuse those identities', and the removed secrets/nebula/chaos.yaml is consistent with nebula-revoke's key removal. The .gitignore addition (nebula-bundle-/) matches the bundle generator's BUNDLE_DIR="nebula-bundle-$NAME" and no such directory is present in the tree. Remaining issues are confined to the new revocation recipe and to constants duplicated between the justfile and the module.

Blocking findings

None.

Important findings

  • nebula-revoke deletes the node secret file unconditionally, including for still-registered NixOS hosts (justfiles/nebula.just:699; high confidence)
    nebula-revoke now runs rm -f "secrets/nebula/$NAME.yaml" with no confirmation and no check that NAME is a registered flake host; its only guard is jq -e ... 'has($name)' nebula/revoked.json, i.e. it refuses names already recorded as retired. modules/networking/nebula.nix still declares, for every enabled host, sops.secrets."nebula/${hostname}-key" = { sopsFile = ../../secrets/nebula/${hostname}.yaml; ... }, and hosts/vega, hosts/lyra, hosts/lena and hosts/electra all set nixosConfig.nebula.enable = true. The previous recipe asked the operator to confirm and to edit the file in an editor; the new one removes it silently.
    Impact: A first-time just nebula-revoke vega (or any other still-registered host) removes a file that is a Nix path literal in the module, so nix flake check and the next deployment for that host fail on a missing file rather than on an explicit 'this host is still in the fleet' message, and the change is silent rather than the previous prompted edit.
    Suggested fix: Refuse (or require an explicit override flag) when NAME matches a name registered in the flake's nixosConfigurations, and tell the operator that the host must be removed from the fleet in the same change; keep the unconditional removal only for names that are not registered hosts.

Suggestions

  • Router overlay address and full-tunnel constants are duplicated between the justfile and the NixOS module (justfiles/nebula.just:425; medium confidence)
    justfiles/nebula.just hardcodes EXIT_IP=10.10.0.10 at lines 425 and 438 and NEBULA_FULL_TUNNEL_DNS := "10.10.0.10" at line 12, while modules/networking/nebula.nix owns the same value as routerIp = "10.10.0.10" and ipv6HostMap.router = "fd56:f458:569c::10"; the mesh IPv6 subnet is likewise duplicated (NEBULA_IPV6_SUBNET := "fd56:f458:569c::/64" at line 5 vs the module's ipv6HostMap prefix). The justfile already has named constants for the VPS (NEBULA_LIGHTHOUSE_PRIMARY_IP), so the router values are the only ones written as literals.
    Impact: Reallocating the router's overlay address requires coordinated edits in two files; a missed one makes generated native/mobile bundles route through a different node than the NixOS hosts do, with no check to catch the divergence.
    Suggested fix: Introduce NEBULA_ROUTER_IP/NEBULA_ROUTER_IPV6 constants alongside the existing VPS constants and use them for EXIT_IP, NEBULA_FULL_TUNNEL_DNS and the IPv6 firewall line, or add a check that the justfile constants agree with the module's routerIp/ipv6HostMap.router.

Tests and validation

  • No configured deterministic checks.

Questions

  • Should just nebula-bundle <host> standard also emit the router bootstrap (static_host_map, lighthouse hosts, relay entries), or are native/external hosts expected to keep editing those literals outside the recipe? In the current recipe ROUTER_STATIC_MAP_LINES/ROUTER_LIGHTHOUSE_LINES/ROUTER_RELAY_LINES are populated only in the mobile-router-full-tunnel branch, so standard-mode bundles omit the router while all four NixOS hosts now include it.
  • hosts/lyra, hosts/lena and hosts/vega were reissued as V2 certificates in this change, but the module's ipv6HostMap default contains no lyra, lena or vega entry. Are their certificates confirmed to carry no IPv6 overlay address, or should those entries land with this rollout?
  • Is just nebula-revoke ever expected to be run for a name that is still a registered NixOS host, or is retirement of a NixOS host always done by removing it from flake.nix in the same change?
  • The phone bundle note prints just nebula-reissue router 2 "0.0.0.0/1,128.0.0.0/1,::/1,8000::/1", which would rotate the key into secrets/nebula/router.yaml in this repository, while the README states router setup is maintained in ~/Projects/router-nebula. Is that cross-project write intended?

Review limitations

  • I did not run nix flake check, ShellCheck, any just recipe or any Nebula tooling; this is a static reading of the checked-out tree.
  • The certificates under nebula/certs/ are opaque base64, so I could not verify from supplied evidence that the reissued electra/lena/lyra/vega/router/phone certificates actually contain the documented IPv6 overlay addresses or the required unsafe-network authority.
  • tests/ contains no Nebula test (backup-restore, nixos-deploy, nixos-pin-lifecycle, nixos-update-remediation only), so the 'provisioning, bundle and revocation regressions' referenced in the pull-request text are not present in this checkout and could not be inspected.
  • SOPS-managed values were not decrypted; I only confirmed that the encrypted files referenced by the module exist and that .sops.yaml has a creation rule for secrets/nebula/.yaml.
  • I could not inspect Git history or branch state, so I cannot confirm whether previously committed nebula-bundle-* directories are still tracked despite the new .gitignore entry.
  • The separate ~/Projects/router-nebula project, its OpenWrt service and its regression tests are not part of this checkout.

Diff coverage

  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/phone.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 16
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `1d9c3ad88d7120c8804c2fa579c908536e399172` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The dual-stack Nebula wiring is internally consistent across the changed files: modules/networking/nebula.nix defines routerBootstrapAddresses/routerUnderlayAddresses/ipv6HostMap, and all four registered NixOS hosts (electra, lena, lyra, vega in hosts/*/default.nix, the only nixosConfigurations in flake.nix:271) set routerBootstrapAddresses = [ "router-underlay:4242" ], matching the README statement that all registered NixOS mesh hosts opt into the router bootstrap. The ipv6HostMap default matches the README inventory (pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone, electra). Every secrets/nebula/<host>.yaml required by the module for an enabled host exists (secrets/nebula contains electra, lena, lyra, vega plus the external nodes), nebula/revoked.json is present and parses as an object of name -> fingerprint arrays, and the module's lib.flatten (builtins.attrValues ...) consumes that shape. The retired-name guards in nebula-reissue/nebula-add-host/nebula-bundle match the README claim that 'Chaos and Cosmos are retired; provisioning recipes refuse those identities', and the removed secrets/nebula/chaos.yaml is consistent with nebula-revoke's key removal. The .gitignore addition (nebula-bundle-*/) matches the bundle generator's BUNDLE_DIR="nebula-bundle-$NAME" and no such directory is present in the tree. Remaining issues are confined to the new revocation recipe and to constants duplicated between the justfile and the module. ### Blocking findings None. ### Important findings - **nebula-revoke deletes the node secret file unconditionally, including for still-registered NixOS hosts** (justfiles/nebula.just:699; high confidence) nebula-revoke now runs `rm -f "secrets/nebula/$NAME.yaml"` with no confirmation and no check that NAME is a registered flake host; its only guard is `jq -e ... 'has($name)' nebula/revoked.json`, i.e. it refuses names already recorded as retired. modules/networking/nebula.nix still declares, for every enabled host, `sops.secrets."nebula/${hostname}-key" = { sopsFile = ../../secrets/nebula/${hostname}.yaml; ... }`, and hosts/vega, hosts/lyra, hosts/lena and hosts/electra all set `nixosConfig.nebula.enable = true`. The previous recipe asked the operator to confirm and to edit the file in an editor; the new one removes it silently. Impact: A first-time `just nebula-revoke vega` (or any other still-registered host) removes a file that is a Nix path literal in the module, so `nix flake check` and the next deployment for that host fail on a missing file rather than on an explicit 'this host is still in the fleet' message, and the change is silent rather than the previous prompted edit. Suggested fix: Refuse (or require an explicit override flag) when NAME matches a name registered in the flake's nixosConfigurations, and tell the operator that the host must be removed from the fleet in the same change; keep the unconditional removal only for names that are not registered hosts. ### Suggestions - **Router overlay address and full-tunnel constants are duplicated between the justfile and the NixOS module** (justfiles/nebula.just:425; medium confidence) justfiles/nebula.just hardcodes `EXIT_IP=10.10.0.10` at lines 425 and 438 and `NEBULA_FULL_TUNNEL_DNS := "10.10.0.10"` at line 12, while modules/networking/nebula.nix owns the same value as `routerIp = "10.10.0.10"` and `ipv6HostMap.router = "fd56:f458:569c::10"`; the mesh IPv6 subnet is likewise duplicated (`NEBULA_IPV6_SUBNET := "fd56:f458:569c::/64"` at line 5 vs the module's ipv6HostMap prefix). The justfile already has named constants for the VPS (NEBULA_LIGHTHOUSE_PRIMARY_IP), so the router values are the only ones written as literals. Impact: Reallocating the router's overlay address requires coordinated edits in two files; a missed one makes generated native/mobile bundles route through a different node than the NixOS hosts do, with no check to catch the divergence. Suggested fix: Introduce `NEBULA_ROUTER_IP`/`NEBULA_ROUTER_IPV6` constants alongside the existing VPS constants and use them for EXIT_IP, NEBULA_FULL_TUNNEL_DNS and the IPv6 firewall line, or add a check that the justfile constants agree with the module's routerIp/ipv6HostMap.router. ### Tests and validation - No configured deterministic checks. ### Questions - Should `just nebula-bundle <host> standard` also emit the router bootstrap (static_host_map, lighthouse hosts, relay entries), or are native/external hosts expected to keep editing those literals outside the recipe? In the current recipe ROUTER_STATIC_MAP_LINES/ROUTER_LIGHTHOUSE_LINES/ROUTER_RELAY_LINES are populated only in the mobile-router-full-tunnel branch, so standard-mode bundles omit the router while all four NixOS hosts now include it. - hosts/lyra, hosts/lena and hosts/vega were reissued as V2 certificates in this change, but the module's ipv6HostMap default contains no lyra, lena or vega entry. Are their certificates confirmed to carry no IPv6 overlay address, or should those entries land with this rollout? - Is `just nebula-revoke` ever expected to be run for a name that is still a registered NixOS host, or is retirement of a NixOS host always done by removing it from flake.nix in the same change? - The phone bundle note prints `just nebula-reissue router 2 "0.0.0.0/1,128.0.0.0/1,::/1,8000::/1"`, which would rotate the key into secrets/nebula/router.yaml in this repository, while the README states router setup is maintained in ~/Projects/router-nebula. Is that cross-project write intended? ### Review limitations - I did not run `nix flake check`, ShellCheck, any just recipe or any Nebula tooling; this is a static reading of the checked-out tree. - The certificates under nebula/certs/ are opaque base64, so I could not verify from supplied evidence that the reissued electra/lena/lyra/vega/router/phone certificates actually contain the documented IPv6 overlay addresses or the required unsafe-network authority. - tests/ contains no Nebula test (backup-restore, nixos-deploy, nixos-pin-lifecycle, nixos-update-remediation only), so the 'provisioning, bundle and revocation regressions' referenced in the pull-request text are not present in this checkout and could not be inspected. - SOPS-managed values were not decrypted; I only confirmed that the encrypted files referenced by the module exist and that .sops.yaml has a creation rule for secrets/nebula/<external>.yaml. - I could not inspect Git history or branch state, so I cannot confirm whether previously committed nebula-bundle-* directories are still tracked despite the new .gitignore entry. - The separate ~/Projects/router-nebula project, its OpenWrt service and its regression tests are not part of this checkout. ### Diff coverage - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/pangolin-vps.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/phone.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 16 - Previous automated review: none found - Findings: 2 </details>
nimmo force-pushed feat/router-nebula from 1d9c3ad88d
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m25s
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 12m33s
to 3fe3406f2c
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m25s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 9m17s
2026-10-10 06:18:22 +01:00
Compare
Author
Owner

Applied the review follow-up in 3fe3406 (rebased onto current main).

  • nebula-revoke now evaluates registered nixosConfigurations before any mutation and refuses Electra/Lena/Lyra/Vega. Fleet-evaluation failure aborts without changing credentials or the registry. Retire the host's flake/config references before revoking it. Disposable regressions cover all four active hosts, evaluation failure, repeat retirement, retained public certificates and removed retired-node secrets.
  • nebula/router.json now supplies router overlay addresses to the NixOS module and bundle recipe, plus the phone exit route lists. Bundle regressions check the public router certificate against this metadata.
  • Standard bundles intentionally contain credentials and VPS bootstrap defaults; native deployment configs in the separate router-nebula project add router endpoints. README now makes that ownership explicit.
  • Vega/Lyra/Lena IPv6 DNS/hosts metadata remains withheld until their live rollout is confirmed. Signed certificate availability alone is not deployment acceptance. Router CA/certificate provisioning remains owned here; OpenWrt/native setup scripts remain external as requested.

Validation: full nix flake check, provisioning/bundle/revocation regressions and ShellCheck pass. External tests updated in ~/Projects/router-nebula; they are intentionally outside this checkout. No live keys were revoked or rotated by this follow-up. Existing Electra canary evidence is revision 1d9c3ad, before the rebase/review fixes; required remaining live evidence remains in the milestone issues.

Review policy currently has formal_review: true but allow_request_changes: false and allow_approval: false; the action posts advisory COMMENT reviews. Workflow success records execution, not reviewer approval. That policy was not changed by these fixes.

Applied the review follow-up in 3fe3406 (rebased onto current main). - `nebula-revoke` now evaluates registered `nixosConfigurations` before any mutation and refuses Electra/Lena/Lyra/Vega. Fleet-evaluation failure aborts without changing credentials or the registry. Retire the host's flake/config references before revoking it. Disposable regressions cover all four active hosts, evaluation failure, repeat retirement, retained public certificates and removed retired-node secrets. - `nebula/router.json` now supplies router overlay addresses to the NixOS module and bundle recipe, plus the phone exit route lists. Bundle regressions check the public router certificate against this metadata. - Standard bundles intentionally contain credentials and VPS bootstrap defaults; native deployment configs in the separate router-nebula project add router endpoints. README now makes that ownership explicit. - Vega/Lyra/Lena IPv6 DNS/hosts metadata remains withheld until their live rollout is confirmed. Signed certificate availability alone is not deployment acceptance. Router CA/certificate provisioning remains owned here; OpenWrt/native setup scripts remain external as requested. Validation: full `nix flake check`, provisioning/bundle/revocation regressions and ShellCheck pass. External tests updated in `~/Projects/router-nebula`; they are intentionally outside this checkout. No live keys were revoked or rotated by this follow-up. Existing Electra canary evidence is revision 1d9c3ad, before the rebase/review fixes; required remaining live evidence remains in the milestone issues. Review policy currently has `formal_review: true` but `allow_request_changes: false` and `allow_approval: false`; the action posts advisory COMMENT reviews. Workflow success records execution, not reviewer approval. That policy was not changed by these fixes.
clankbot left a comment

Automated code review

Reviewed commit: 3fe3406f2cb8499d2e39a2485611ce7f78e6a94b

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

Scoped review of the dual-stack Nebula rollout against the checked-out tree. The Nix side is self-consistent: modules/networking/nebula.nix reads ../../nebula/router.json and ../../nebula/revoked.json, both of which exist and are tracked (router.json supplies ipv4 10.10.0.10 / ipv6 fd56:f458:569c::10 and the exit-route CIDRs that README restates); routerBootstrapAddresses, routerUnderlayAddresses and ipv6HostMap are declared with defaults, and all four registered nixosConfigurations (flake.nix: electra, lena, lyra, vega) set routerBootstrapAddresses = [ "router-underlay:4242" ], which the module turns into a static_host_map/lighthouse/relay entry for 10.10.0.10; router-underlay is published in networking.hosts from routerUnderlayAddresses. chaos was dropped from hostMap with no remaining 10.10.0.9 or active-chaos reference (only potential/chaos/, docs, and .sops.yaml recipient rules), and nebula/revoked.json holds the chaos/cosmos fingerprints while nebula/certs/{chaos,cosmos}.crt are retained for audit, matching the README. Vega's exitNode.enable = false keeps the module's exitNode assertion satisfiable. The provisioning recipes guard retired names, refuse re-adding an existing cert, and publish the cert only after the key is encrypted (.sops.yaml has a secrets/nebula/[^/]+\.yaml$ admin fallback so new external-node files such as router/phone can be created). Two evidence-backed gaps remain: three re-signed certificates have no matching change to their paired node-key files, and the address normalisation guard does not cover bare IPv6 input.

Blocking findings

None.

Important findings

  • vega/phone/router certificates changed without their paired node-key files (nebula/certs/vega.crt:1; medium confidence)
    The change replaces nebula/certs/vega.crt and nebula/certs/phone.crt and adds nebula/certs/router.crt, but the only secrets/nebula/*.yaml files re-encrypted in the same diff are electra, lena, lyra, mass-storage, media1, nimmog-de, nova and pangolin-vps; secrets/nebula/vega.yaml, phone.yaml and router.yaml all exist in the checked-out tree and are untouched. nebula-add-host always produces the pair together: SIGN_ARGS includes -out-key "$TMPDIR/$NAME.key", and the key is then written to secrets/nebula/$NAME.yaml (new-file branch via sops --encrypt ... > "$TMPDIR/node-secret.yaml"; mv ... "$SECRET_FILE", existing-file branch via sops set), and nebula-reissue delegates to that recipe. The module consumes the pair as cert = ../../nebula/certs + "/${hostname}.crt" and key = config.sops.secrets."nebula/${hostname}-key".path from ../../secrets/nebula/${hostname}.yaml.
    Impact: Vega (a registered NixOS host) would activate a new certificate against the previously stored node key, and phone/router likewise. If those keys were not regenerated with the certificates, the cert/key pair does not verify and the node fails PKI authentication, so Vega loses mesh registration (and with it the relay/DNS paths that the other three hosts now bootstrap through), and the phone loses the router full-tunnel exit.
    Suggested fix: Confirm the pairing per identity before shipping: either re-run the paired provisioning (just nebula-reissue vega 2 none, and the equivalent for phone and router) so the new key is written into the scoped SOPS file, or record explicit live evidence that the currently stored key authenticates against the new certificate.

Suggestions

  • Bare IPv6 addresses are passed to -networks with no prefix length (justfiles/nebula.just:138; medium confidence)
    nebula-add-host normalises only a bare IPv4 argument: if [[ "$IP" != */* && "$IP" != *,* && "$IP" != *:* ]]; then CERT_NETWORKS="$IP/16"; fi, then signs with -networks "$CERT_NETWORKS". A bare IPv6 overlay address matches the *:* exclusion, so it is passed through with no /64. Every IPv6 literal this rollout introduces is bare — nebula/router.json "ipv6": "fd56:f458:569c::10" and ipv6HostMap values in modules/networking/nebula.nix (e.g. phone = "fd56:f458:569c::30") — while README requires the prefixed form fd56:f458:569c::30/64 in the phone certificate.
    Impact: Copying a bare IPv6 address from router.json/ipv6HostMap into the provisioning argument is neither rejected nor normalised, so a run can silently issue a certificate whose IPv6 network is not the intended /64, disagreeing with nebula/router.json and ipv6HostMap.
    Suggested fix: Either reject a bare IPv6 address with an explicit message, or normalise it to '<address>/64' alongside the existing IPv4 /16 case, so the guard covers both address families.

Tests and validation

  • No configured deterministic checks.

Questions

  • The generated mobile-import.yml (justfiles/nebula.just, mobile branch) writes mobile_nebula: and dns_resolvers:; nothing in this repository pins Mobile Nebula's file-import schema, so the key spellings cannot be checked here.
  • Does nix eval --json .#nixosConfigurations --apply builtins.attrNames (justfiles/nebula.just:686) behave as expected on every host that runs nebula-revoke? --apply is not used anywhere else in this tree, and no supplied evidence shows it being exercised.
  • nebula-init's next-steps hint still prints just nebula-add-host vega 10.10.0.2 lighthouse,servers; is that stale hint intentional now that Vega is configured as an ordinary mesh client with the router as the second lighthouse?

Review limitations

  • No commands were run and no files edited: nix flake check, ShellCheck, and the provisioning/bundle/revocation paths were not executed, so evaluation and runtime behaviour are unverified.
  • Nebula certificates are opaque base64 in the diff; I could not decode them, so the networks, groups, unsafe networks and validSince of the reissued vega/lyra/electra/lena/phone/router certificates are unverified, and the cert/key pairing finding is inferred from which files changed rather than from decoded contents.
  • The native host configurations, the OpenWrt/GL.iNet router setup, the Android rendered config and the separate ~/Projects/router-nebula project are outside this repository and were not supplied.
  • Live behaviour is not observable here: router IPv6 bootstrap, phone IPv6 egress, relay paths, and whether the two fingerprints in nebula/revoked.json are loaded by every peer remain unverified.
  • I did not inspect flake.lock, lib/auto-update-policy.nix, or the Attic CI workflow for interaction with the new nebula/*.json files read at eval time by modules/networking/nebula.nix; the review is scoped to the supplied changed files and their direct callers.

Diff coverage

  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • nebula/router.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 17
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `3fe3406f2cb8499d2e39a2485611ce7f78e6a94b` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment Scoped review of the dual-stack Nebula rollout against the checked-out tree. The Nix side is self-consistent: `modules/networking/nebula.nix` reads `../../nebula/router.json` and `../../nebula/revoked.json`, both of which exist and are tracked (router.json supplies ipv4 10.10.0.10 / ipv6 fd56:f458:569c::10 and the exit-route CIDRs that README restates); `routerBootstrapAddresses`, `routerUnderlayAddresses` and `ipv6HostMap` are declared with defaults, and all four registered `nixosConfigurations` (flake.nix: electra, lena, lyra, vega) set `routerBootstrapAddresses = [ "router-underlay:4242" ]`, which the module turns into a `static_host_map`/lighthouse/relay entry for `10.10.0.10`; `router-underlay` is published in `networking.hosts` from `routerUnderlayAddresses`. `chaos` was dropped from `hostMap` with no remaining `10.10.0.9` or active-chaos reference (only `potential/chaos/`, docs, and `.sops.yaml` recipient rules), and `nebula/revoked.json` holds the chaos/cosmos fingerprints while `nebula/certs/{chaos,cosmos}.crt` are retained for audit, matching the README. Vega's `exitNode.enable = false` keeps the module's exitNode assertion satisfiable. The provisioning recipes guard retired names, refuse re-adding an existing cert, and publish the cert only after the key is encrypted (`.sops.yaml` has a `secrets/nebula/[^/]+\.yaml$` admin fallback so new external-node files such as router/phone can be created). Two evidence-backed gaps remain: three re-signed certificates have no matching change to their paired node-key files, and the address normalisation guard does not cover bare IPv6 input. ### Blocking findings None. ### Important findings - **vega/phone/router certificates changed without their paired node-key files** (nebula/certs/vega.crt:1; medium confidence) The change replaces `nebula/certs/vega.crt` and `nebula/certs/phone.crt` and adds `nebula/certs/router.crt`, but the only `secrets/nebula/*.yaml` files re-encrypted in the same diff are electra, lena, lyra, mass-storage, media1, nimmog-de, nova and pangolin-vps; `secrets/nebula/vega.yaml`, `phone.yaml` and `router.yaml` all exist in the checked-out tree and are untouched. `nebula-add-host` always produces the pair together: `SIGN_ARGS` includes `-out-key "$TMPDIR/$NAME.key"`, and the key is then written to `secrets/nebula/$NAME.yaml` (new-file branch via `sops --encrypt ... > "$TMPDIR/node-secret.yaml"; mv ... "$SECRET_FILE"`, existing-file branch via `sops set`), and `nebula-reissue` delegates to that recipe. The module consumes the pair as `cert = ../../nebula/certs + "/${hostname}.crt"` and `key = config.sops.secrets."nebula/${hostname}-key".path` from `../../secrets/nebula/${hostname}.yaml`. Impact: Vega (a registered NixOS host) would activate a new certificate against the previously stored node key, and phone/router likewise. If those keys were not regenerated with the certificates, the cert/key pair does not verify and the node fails PKI authentication, so Vega loses mesh registration (and with it the relay/DNS paths that the other three hosts now bootstrap through), and the phone loses the router full-tunnel exit. Suggested fix: Confirm the pairing per identity before shipping: either re-run the paired provisioning (`just nebula-reissue vega 2 none`, and the equivalent for phone and router) so the new key is written into the scoped SOPS file, or record explicit live evidence that the currently stored key authenticates against the new certificate. ### Suggestions - **Bare IPv6 addresses are passed to `-networks` with no prefix length** (justfiles/nebula.just:138; medium confidence) `nebula-add-host` normalises only a bare IPv4 argument: `if [[ "$IP" != */* && "$IP" != *,* && "$IP" != *:* ]]; then CERT_NETWORKS="$IP/16"; fi`, then signs with `-networks "$CERT_NETWORKS"`. A bare IPv6 overlay address matches the `*:*` exclusion, so it is passed through with no `/64`. Every IPv6 literal this rollout introduces is bare — `nebula/router.json` `"ipv6": "fd56:f458:569c::10"` and `ipv6HostMap` values in `modules/networking/nebula.nix` (e.g. `phone = "fd56:f458:569c::30"`) — while README requires the prefixed form `fd56:f458:569c::30/64` in the phone certificate. Impact: Copying a bare IPv6 address from `router.json`/`ipv6HostMap` into the provisioning argument is neither rejected nor normalised, so a run can silently issue a certificate whose IPv6 network is not the intended `/64`, disagreeing with `nebula/router.json` and `ipv6HostMap`. Suggested fix: Either reject a bare IPv6 address with an explicit message, or normalise it to `'<address>/64'` alongside the existing IPv4 `/16` case, so the guard covers both address families. ### Tests and validation - No configured deterministic checks. ### Questions - The generated `mobile-import.yml` (justfiles/nebula.just, mobile branch) writes `mobile_nebula:` and `dns_resolvers:`; nothing in this repository pins Mobile Nebula's file-import schema, so the key spellings cannot be checked here. - Does `nix eval --json .#nixosConfigurations --apply builtins.attrNames` (justfiles/nebula.just:686) behave as expected on every host that runs `nebula-revoke`? `--apply` is not used anywhere else in this tree, and no supplied evidence shows it being exercised. - `nebula-init`'s next-steps hint still prints `just nebula-add-host vega 10.10.0.2 lighthouse,servers`; is that stale hint intentional now that Vega is configured as an ordinary mesh client with the router as the second lighthouse? ### Review limitations - No commands were run and no files edited: `nix flake check`, ShellCheck, and the provisioning/bundle/revocation paths were not executed, so evaluation and runtime behaviour are unverified. - Nebula certificates are opaque base64 in the diff; I could not decode them, so the networks, groups, unsafe networks and `validSince` of the reissued vega/lyra/electra/lena/phone/router certificates are unverified, and the cert/key pairing finding is inferred from which files changed rather than from decoded contents. - The native host configurations, the OpenWrt/GL.iNet router setup, the Android rendered config and the separate `~/Projects/router-nebula` project are outside this repository and were not supplied. - Live behaviour is not observable here: router IPv6 bootstrap, phone IPv6 egress, relay paths, and whether the two fingerprints in `nebula/revoked.json` are loaded by every peer remain unverified. - I did not inspect `flake.lock`, `lib/auto-update-policy.nix`, or the Attic CI workflow for interaction with the new `nebula/*.json` files read at eval time by `modules/networking/nebula.nix`; the review is scoped to the supplied changed files and their direct callers. ### Diff coverage - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `nebula/router.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/pangolin-vps.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 17 - Previous automated review: none found - Findings: 2 </details>
Author
Owner

Follow-up to the review of 3fe3406, posted BEFORE pushing the next commit as requested.

The important certificate/key finding rests on an incomplete file list. This MR has 33 changed files. The review action retrieves only the default first page (30); the omitted last three are:

File Actual MR change
secrets/nebula/phone.yaml changed, +3/-3
secrets/nebula/router.yaml added, +37/-0
secrets/nebula/vega.yaml changed, +3/-3

Forgejo get_files with per_page: 100 and local git diff --numstat origin/main independently confirm these changes. The action's reviewer.py:1051 fetches /pulls/{number}/files once without pagination, and coverage/batching use only that result. The claim that these paired encrypted key files are untouched is false; no extra reissue is justified by that claim. Router/phone deployment and phone SSH acceptance were already recorded; Vega's new pair remains pending NixOS rollout, as stated in the MR.

Raised forgejo-auto-pr-review #32 with reproduction, source cause, acceptance tests and a reference back to this MR. It also notes that formal review history is not found through issue-comments lookup, which can omit human replies from re-review context.

Prepared next commit af8f543:

  • Normalize a single bare IPv6 provisioning address to /64, alongside existing bare IPv4 /16 behavior.
  • Require explicit prefixes on every address in comma-separated lists; retain v1 rejection of IPv6/multiple addresses.
  • Correct nebula-init's Vega hint to ordinary servers membership.
  • Document supported input forms.

Validation: provisioning, bundle and revocation regressions pass; ShellCheck passes, including the actual rendered nebula-add-host recipe. Regression cases cover bare IPv4/IPv6, explicit CIDRs, dual-stack lists, rejection of unprefixed list members and v1 compatibility/rejection. These tests remain in the separate router-nebula project as requested. This follow-up changes shell/docs only; the full flake check at 3fe3406 passed, with no subsequent Nix changes.

Other review questions: actual nix eval --json .#nixosConfigurations --apply builtins.attrNames was exercised on Electra and returned [electra,lena,lyra,vega]; fixture tests cover evaluation failure. Android's imported config was accepted on the installed Defined Networking app: the user confirmed both fingerprints in rendered config and successful SSH. Mobile app version remains unspecified, so this is live acceptance rather than a version/schema pin.

Follow-up to the review of 3fe3406, posted BEFORE pushing the next commit as requested. The important certificate/key finding rests on an incomplete file list. This MR has 33 changed files. The review action retrieves only the default first page (30); the omitted last three are: | File | Actual MR change | | --- | --- | | secrets/nebula/phone.yaml | changed, +3/-3 | | secrets/nebula/router.yaml | added, +37/-0 | | secrets/nebula/vega.yaml | changed, +3/-3 | Forgejo `get_files` with `per_page: 100` and local `git diff --numstat origin/main` independently confirm these changes. The action's reviewer.py:1051 fetches `/pulls/{number}/files` once without pagination, and coverage/batching use only that result. The claim that these paired encrypted key files are untouched is false; no extra reissue is justified by that claim. Router/phone deployment and phone SSH acceptance were already recorded; Vega's new pair remains pending NixOS rollout, as stated in the MR. Raised [forgejo-auto-pr-review #32](https://git.nimmog.uk/nimmo/forgejo-auto-pr-review/issues/32) with reproduction, source cause, acceptance tests and a reference back to this MR. It also notes that formal review history is not found through issue-comments lookup, which can omit human replies from re-review context. Prepared next commit af8f543: - Normalize a single bare IPv6 provisioning address to /64, alongside existing bare IPv4 /16 behavior. - Require explicit prefixes on every address in comma-separated lists; retain v1 rejection of IPv6/multiple addresses. - Correct nebula-init's Vega hint to ordinary servers membership. - Document supported input forms. Validation: provisioning, bundle and revocation regressions pass; ShellCheck passes, including the actual rendered nebula-add-host recipe. Regression cases cover bare IPv4/IPv6, explicit CIDRs, dual-stack lists, rejection of unprefixed list members and v1 compatibility/rejection. These tests remain in the separate router-nebula project as requested. This follow-up changes shell/docs only; the full flake check at 3fe3406 passed, with no subsequent Nix changes. Other review questions: actual `nix eval --json .#nixosConfigurations --apply builtins.attrNames` was exercised on Electra and returned [electra,lena,lyra,vega]; fixture tests cover evaluation failure. Android's imported config was accepted on the installed Defined Networking app: the user confirmed both fingerprints in rendered config and successful SSH. Mobile app version remains unspecified, so this is live acceptance rather than a version/schema pin.
fix(nebula): normalize IPv6 provisioning input and correct Vega hint
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m31s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 7m36s
af8f543436
clankbot left a comment

Automated code review

Reviewed commit: af8f5434363a9761c4e8719ce07d9dfadfbbcc04

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

The dual-stack wiring is internally consistent across the changed files: nebula/router.json (ipv4 10.10.0.10, ipv6 fd56:f458:569c::10, exit routes) is read by both modules/networking/nebula.nix (builtins.readFile ../../nebula/router.json, used for clientStaticHostMap, clientLighthouseList, hostMap.router, ipv6HostMap.router) and justfiles/nebula.just; all four registered NixOS hosts (electra, lena, lyra, vega) set routerBootstrapAddresses = [ "router-underlay:4242" ], and networking.hosts publishes router-underlay from routerUnderlayAddresses independently of router.mesh. nebula/revoked.json (chaos, cosmos) is consumed by the module as pki.blocklist + pki.disconnect_invalid, and nebula-add-host/-reissue/-bundle/-revoke all refuse names present in it; nebula-revoke evaluates nixosConfigurations before mutating and refuses registered hosts. Vega's exit role is disabled (exitNode.enable = false, so the NAT module and the IPv6-forwarding sysctls are not emitted), and chaos/cosmos were removed from hostMap while potential/chaos/ remains unregistered in the flake, so no active NixOS configuration lost a deleted secret. The new .gitignore entry nebula-bundle-*/ matches BUNDLE_DIR="nebula-bundle-$NAME". Two latent defects in the new bundle recipe are demonstrable from the supplied code; no evaluation-breaking or secret-exposing defect was demonstrable elsewhere.

Blocking findings

None.

Important findings

None.

Suggestions

  • Bundle recipe emits blocklist: with a null value when the revocation list is empty (justfiles/nebula.just:480; medium confidence)
    mapfile -t REVOKED_FINGERPRINT_LINES < <( if [ -f nebula/revoked.json ]; then jq -r '[.[][]] | unique[] | ...' nebula/revoked.json; fi) yields an empty array when nebula/revoked.json is absent, and the config builders then emit the unconditional key line " blocklist:" followed only by ${REVOKED_FINGERPRINT_LINES[@]} (lines 492/493 and 549/550), with the same pattern in the mobile import at lines 611/612. nebula-revoke also initialises the file with printf '{}\n', so an empty object is a reachable state. The NixOS module side, by contrast, evaluates pki.blocklist = lib.flatten (builtins.attrValues (fromJSON ...)), i.e. an empty list.
    Impact: A bundle generated with no recorded revocations carries pki.blocklist: as YAML null rather than [], so the generated config.yml/mobile-import.yml shape diverges from the module-generated configuration for the same state; the currently committed nebula/revoked.json (two fingerprints) never exercises this path.
    Suggested fix: Emit blocklist: [] when REVOKED_FINGERPRINT_LINES is empty in all three emission sites, or omit the blocklist key entirely when there are no fingerprints.

  • Standard-mode bundle generation now hard-depends on nebula/router.json (justfiles/nebula.just:432; medium confidence)
    FULL_TUNNEL_ROUTES=$(jq -er '.ipv4ExitRoutes | join(",")' nebula/router.json) and EXIT_IP=$(jq -er '.ipv4' nebula/router.json) (lines 432-433) run before case "$MODE" in (line 438), whose standard branch leaves ROUTER_*_LINES empty. The recipe runs under set -euo pipefail, so a missing or malformed nebula/router.json aborts every bundle, including MODE=standard bundles that never use exit routes or the router exit IP.
    Impact: Router exit metadata becomes a hard dependency for all bundle generation rather than only for mobile-router-full-tunnel, so ordinary native-host bundles fail if that file is removed or restructured; today the file is committed, so this is a fragility introduced by the change rather than a present failure.
    Suggested fix: Move the router.json reads into the mobile-router-full-tunnel branch (the branch already re-reads .ipv6ExitRoutes at line 449), or default them with // empty and fail only in router mode where the existing ROUTER_ADDRS check reports the requirement.

Tests and validation

  • No configured deterministic checks.

Questions

  • clientStaticHostMap now maps the router overlay IP to the literal strings in routerBootstrapAddresses, i.e. router-underlay:4242, whereas the VPS entry uses a literal 195.20.255.115:4242. Is a name-valued static_host_map entry resolved by Nebula 1.10.3, or must it be a numeric address?
  • nebula/certs/router.crt is opaque base64 in this checkout; does it carry the lighthouse/relay groups and both 10.10.0.10/16 and fd56:f458:569c::10/64? Every NixOS host now registers against 10.10.0.10 as a lighthouse and relay, so a router certificate lacking those networks or groups would leave all four hosts dependent on the VPS alone.
  • nebula/certs/{vega,lyra,lena}.crt were reissued in this MR but ipv6HostMap (and the README's advertised list) omits vega, lyra and lena. Is that omission deliberate until those certificates' IPv6 addresses are confirmed, per the option description's 'Add other nodes only with their certificate rollout'?

Review limitations

  • The supplied diff covers 30 of the 33 changed paths named in the review material; secrets/nebula/{phone,router,vega}.yaml diffs were not supplied, so those changes were not inspected beyond confirming the files exist and are scoped by .sops.yaml's secrets/nebula/[^/]+\.yaml rule.
  • Nebula v2 certificates are opaque base64 here; I could not decode nebula/certs/*.crt to verify networks, groups, unsafe networks, or the fingerprints recorded in nebula/revoked.json.
  • I did not execute nix flake check, just, ShellCheck, or any repository code, so the recipe's runtime behaviour (including the two findings above) is read from the source, not observed.
  • The separate ~/Projects/router-nebula project (OpenWrt service, native host configurations, phone WAN/DNS, IPv6 masquerading, regression tests) is not part of this checkout, and this repository's tests/ tree contains no Nebula regressions, so the PR's provisioning, bundle and revocation claims could not be checked here.
  • No live deployment evidence was supplied: router public IPv6 bootstrap, phone IPv6 internet egress, and the rollout of the new credentials/revocations on Vega, Lyra and Lena remain unverified.

Diff coverage

  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • nebula/router.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 18
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `af8f5434363a9761c4e8719ce07d9dfadfbbcc04` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment The dual-stack wiring is internally consistent across the changed files: `nebula/router.json` (ipv4 `10.10.0.10`, ipv6 `fd56:f458:569c::10`, exit routes) is read by both `modules/networking/nebula.nix` (`builtins.readFile ../../nebula/router.json`, used for `clientStaticHostMap`, `clientLighthouseList`, `hostMap.router`, `ipv6HostMap.router`) and `justfiles/nebula.just`; all four registered NixOS hosts (electra, lena, lyra, vega) set `routerBootstrapAddresses = [ "router-underlay:4242" ]`, and `networking.hosts` publishes `router-underlay` from `routerUnderlayAddresses` independently of `router.mesh`. `nebula/revoked.json` (chaos, cosmos) is consumed by the module as `pki.blocklist` + `pki.disconnect_invalid`, and `nebula-add-host`/`-reissue`/`-bundle`/`-revoke` all refuse names present in it; `nebula-revoke` evaluates `nixosConfigurations` before mutating and refuses registered hosts. Vega's exit role is disabled (`exitNode.enable = false`, so the NAT module and the IPv6-forwarding sysctls are not emitted), and `chaos`/`cosmos` were removed from `hostMap` while `potential/chaos/` remains unregistered in the flake, so no active NixOS configuration lost a deleted secret. The new `.gitignore` entry `nebula-bundle-*/` matches `BUNDLE_DIR="nebula-bundle-$NAME"`. Two latent defects in the new bundle recipe are demonstrable from the supplied code; no evaluation-breaking or secret-exposing defect was demonstrable elsewhere. ### Blocking findings None. ### Important findings None. ### Suggestions - **Bundle recipe emits `blocklist:` with a null value when the revocation list is empty** (justfiles/nebula.just:480; medium confidence) `mapfile -t REVOKED_FINGERPRINT_LINES < <( if [ -f nebula/revoked.json ]; then jq -r '[.[][]] | unique[] | ...' nebula/revoked.json; fi)` yields an empty array when `nebula/revoked.json` is absent, and the config builders then emit the unconditional key line `" blocklist:"` followed only by `${REVOKED_FINGERPRINT_LINES[@]}` (lines 492/493 and 549/550), with the same pattern in the mobile import at lines 611/612. `nebula-revoke` also initialises the file with `printf '{}\n'`, so an empty object is a reachable state. The NixOS module side, by contrast, evaluates `pki.blocklist = lib.flatten (builtins.attrValues (fromJSON ...))`, i.e. an empty list. Impact: A bundle generated with no recorded revocations carries `pki.blocklist:` as YAML null rather than `[]`, so the generated `config.yml`/`mobile-import.yml` shape diverges from the module-generated configuration for the same state; the currently committed `nebula/revoked.json` (two fingerprints) never exercises this path. Suggested fix: Emit `blocklist: []` when `REVOKED_FINGERPRINT_LINES` is empty in all three emission sites, or omit the `blocklist` key entirely when there are no fingerprints. - **Standard-mode bundle generation now hard-depends on `nebula/router.json`** (justfiles/nebula.just:432; medium confidence) `FULL_TUNNEL_ROUTES=$(jq -er '.ipv4ExitRoutes | join(",")' nebula/router.json)` and `EXIT_IP=$(jq -er '.ipv4' nebula/router.json)` (lines 432-433) run before `case "$MODE" in` (line 438), whose `standard` branch leaves `ROUTER_*_LINES` empty. The recipe runs under `set -euo pipefail`, so a missing or malformed `nebula/router.json` aborts every bundle, including `MODE=standard` bundles that never use exit routes or the router exit IP. Impact: Router exit metadata becomes a hard dependency for all bundle generation rather than only for `mobile-router-full-tunnel`, so ordinary native-host bundles fail if that file is removed or restructured; today the file is committed, so this is a fragility introduced by the change rather than a present failure. Suggested fix: Move the `router.json` reads into the `mobile-router-full-tunnel` branch (the branch already re-reads `.ipv6ExitRoutes` at line 449), or default them with `// empty` and fail only in router mode where the existing `ROUTER_ADDRS` check reports the requirement. ### Tests and validation - No configured deterministic checks. ### Questions - `clientStaticHostMap` now maps the router overlay IP to the literal strings in `routerBootstrapAddresses`, i.e. `router-underlay:4242`, whereas the VPS entry uses a literal `195.20.255.115:4242`. Is a name-valued `static_host_map` entry resolved by Nebula 1.10.3, or must it be a numeric address? - `nebula/certs/router.crt` is opaque base64 in this checkout; does it carry the `lighthouse`/`relay` groups and both `10.10.0.10/16` and `fd56:f458:569c::10/64`? Every NixOS host now registers against `10.10.0.10` as a lighthouse and relay, so a router certificate lacking those networks or groups would leave all four hosts dependent on the VPS alone. - `nebula/certs/{vega,lyra,lena}.crt` were reissued in this MR but `ipv6HostMap` (and the README's advertised list) omits vega, lyra and lena. Is that omission deliberate until those certificates' IPv6 addresses are confirmed, per the option description's 'Add other nodes only with their certificate rollout'? ### Review limitations - The supplied diff covers 30 of the 33 changed paths named in the review material; `secrets/nebula/{phone,router,vega}.yaml` diffs were not supplied, so those changes were not inspected beyond confirming the files exist and are scoped by `.sops.yaml`'s `secrets/nebula/[^/]+\.yaml` rule. - Nebula v2 certificates are opaque base64 here; I could not decode `nebula/certs/*.crt` to verify networks, groups, unsafe networks, or the fingerprints recorded in `nebula/revoked.json`. - I did not execute `nix flake check`, `just`, ShellCheck, or any repository code, so the recipe's runtime behaviour (including the two findings above) is read from the source, not observed. - The separate `~/Projects/router-nebula` project (OpenWrt service, native host configurations, phone WAN/DNS, IPv6 masquerading, regression tests) is not part of this checkout, and this repository's `tests/` tree contains no Nebula regressions, so the PR's provisioning, bundle and revocation claims could not be checked here. - No live deployment evidence was supplied: router public IPv6 bootstrap, phone IPv6 internet egress, and the rollout of the new credentials/revocations on Vega, Lyra and Lena remain unverified. ### Diff coverage - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `nebula/router.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/pangolin-vps.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 18 - Previous automated review: none found - Findings: 2 </details>
Author
Owner

Both advisory recommendations from the af8f543 review are valid and are addressed in prepared commit 51345c0. This response is posted before pushing the commit.

  • Build one shared PKI blocklist block for all three output sites (lighthouse config, client config, inline mobile import). Empty or absent revocation registries emit blocklist: []; populated registries retain the recorded fingerprints and disconnect_invalid: true.
  • Read router exit metadata only in mobile-router-full-tunnel. Standard bundles no longer depend on router.json. README documents that boundary.

Validation: expanded external bundle regressions cover populated/empty/absent revocation registries across IPv4 and dual-stack lighthouse/client/mobile variants. Generated valid configs and mobile imports pass Nebula's config test; IPv4-only full-tunnel imports remain rejected. Missing and malformed router metadata succeed for standard bundles and fail for router full-tunnel bundles. Metadata-error probes run in independent Bash processes so errexit behavior matches the real Just recipe. ShellCheck passes for the rendered bundle recipe and external regression scripts. Tests remain in ~/Projects/router-nebula as requested.

This is a shell/docs follow-up; no Nix configuration, certificate, encrypted key or live deployment changed. The full flake check at 3fe3406 and CI at af8f543 passed. Fresh CI/review will be triggered by the subsequent push.

The prior review's remaining questions were previously answered with evidence: Electra's Nebula 1.10.3 authenticated to router-underlay through its maintained IPv6 address; the public router certificate has both overlay networks and lighthouse/relays groups (the role settings themselves are in native config); Vega/Lyra/Lena IPv6 hosts/DNS entries intentionally await live activation.

Both advisory recommendations from the af8f543 review are valid and are addressed in prepared commit 51345c0. This response is posted before pushing the commit. - Build one shared PKI blocklist block for all three output sites (lighthouse config, client config, inline mobile import). Empty or absent revocation registries emit `blocklist: []`; populated registries retain the recorded fingerprints and `disconnect_invalid: true`. - Read router exit metadata only in `mobile-router-full-tunnel`. Standard bundles no longer depend on router.json. README documents that boundary. Validation: expanded external bundle regressions cover populated/empty/absent revocation registries across IPv4 and dual-stack lighthouse/client/mobile variants. Generated valid configs and mobile imports pass Nebula's config test; IPv4-only full-tunnel imports remain rejected. Missing and malformed router metadata succeed for standard bundles and fail for router full-tunnel bundles. Metadata-error probes run in independent Bash processes so errexit behavior matches the real Just recipe. ShellCheck passes for the rendered bundle recipe and external regression scripts. Tests remain in ~/Projects/router-nebula as requested. This is a shell/docs follow-up; no Nix configuration, certificate, encrypted key or live deployment changed. The full flake check at 3fe3406 and CI at af8f543 passed. Fresh CI/review will be triggered by the subsequent push. The prior review's remaining questions were previously answered with evidence: Electra's Nebula 1.10.3 authenticated to router-underlay through its maintained IPv6 address; the public router certificate has both overlay networks and lighthouse/relays groups (the role settings themselves are in native config); Vega/Lyra/Lena IPv6 hosts/DNS entries intentionally await live activation.
fix(nebula): render empty blocklists and scope exit metadata
All checks were successful
AI pull-request review / review (pull_request) Successful in 10m14s
Build and Push Attic Cache / test (pull_request) Successful in 1m22s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
51345c08aa
clankbot left a comment

Automated code review

Reviewed commit: 51345c08aa2963ccf7ddb5421a8a77a5ed27a8da

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The dual-stack wiring is internally consistent in the supplied material: nebula/router.json (ipv4 10.10.0.10, ipv6 fd56:f458:569c::10, split exit routes) is read both by modules/networking/nebula.nix (routerIp, router.ipv6 in ipv6HostMap) and by the mobile-router-full-tunnel branch of just nebula-bundle; the four registered NixOS hosts (hosts/{electra,lena,lyra,vega}/default.nix) are exactly the four that set routerBootstrapAddresses = [ "router-underlay:4242" ], matching the README claim that all registered mesh hosts opt into the bootstrap; nebula/revoked.json feeds both the module's pki.blocklist and the bundle blocklist; the removed NEBULA_FULL_TUNNEL_* just constants have no remaining {{ }} references; ../../nebula/router.json and ../../nebula/revoked.json resolve correctly from modules/networking/nebula.nix; exitNode.enable = false satisfies the module's assertion; and the .gitignore pattern nebula-bundle-*/ matches BUNDLE_DIR="nebula-bundle-$NAME". The only actionable issues I could ground in the supplied diff are in the bundle recipe's secret-handling and operator-facing output.

Blocking findings

None.

Important findings

  • mobile-import.yml carries the plaintext node key but is not covered by the recipe's shred guidance (justfiles/nebula.just:623; high confidence)
    The new mobile branch embeds the key inline: for field in ca cert key; do ... pem_file="$BUNDLE_DIR/$NAME.key" ... sed 's/^/ /' "$pem_file"; done } > "$BUNDLE_DIR/mobile-import.yml" (lines 610-624, chmod 600 at 624). The only cleanup the recipe prints is echo "WARNING: $BUNDLE_DIR/$NAME.key is plaintext — scp and then shred it locally:" / echo " shred -u $BUNDLE_DIR/$NAME.key" (lines 659-660), and the recipe's trap at line 354 shreds only files under $TMPDIR (/dev/shm), never $BUNDLE_DIR. The new .gitignore entry nebula-bundle-*/ keeps the directory untracked but does not remove it.
    Impact: After a mobile-router-full-tunnel run the node's private key exists in plaintext in two working-tree files, but the operator-visible instruction names only $NAME.key; nebula-bundle-phone/mobile-import.yml therefore persists unshredded (and is not listed in the printed file inventory at line 644 as needing destruction).
    Suggested fix: Extend the printed cleanup to every secret-bearing artifact, e.g. shred -u "$BUNDLE_DIR/$NAME.key" "$BUNDLE_DIR/mobile-import.yml", and state that mobile-import.yml must be consumed on the phone and then shredded.

Suggestions

  • Lighthouse serve_dns host derivation aborts for a certificate with no IPv4 network (justfiles/nebula.just:413; medium confidence)
    CERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]') runs under the recipe's set -euo pipefail and is consumed as " host: \"${CERT_IP}\"" in the lighthouse branch. The same MR widens nebula-add-host to accept IPv6-only input (if [[ "$IP" = *:* ]]; then CERT_NETWORKS="$IP/64"), so a v2 lighthouse certificate holding only IPv6 CIDRs yields [] | .[0] = null and null | split("/") is a jq error; the recipe already guards the analogous IPv6 requirement for the phone certificate (if [ -z "$CERT_IPV6_NETWORKS" ]; then echo "ERROR: ..."; exit 1).
    Impact: just nebula-bundle <lighthouse> standard would abort before writing any bundle file, with only a raw jq error as the diagnostic, for a lighthouse whose v2 certificate has no IPv4 network; serve_dns would have no defined bind address.
    Suggested fix: Guard the derivation with an explicit message (or derive the bind address from the IPv6 network) instead of relying on a jq failure, mirroring the existing explicit check.

  • Mobile bundle mode still prints Linux systemctl/scp deployment steps (justfiles/nebula.just:647; high confidence)
    The follow-up output is unconditional on mode: echo "Deploy commands (adjust remote path/user as needed):", ssh root@<host> 'mkdir -p /etc/nebula && systemctl stop nebula || true', scp $BUNDLE_DIR/* root@<host>:/etc/nebula/, chmod 600 /etc/nebula/$NAME.key, systemctl enable --now nebula (lines 647-657). For MODE=mobile-router-full-tunnel the bundle additionally contains mobile-import.yml and mobile-full-tunnel.txt (printed at line 644), which scp $BUNDLE_DIR/* would install into /etc/nebula/.
    Impact: An operator following the printed steps for the phone profile is invited to run systemctl/scp against a Linux host, which would also copy the plaintext mobile-import.yml and a note file into /etc/nebula/ there.
    Suggested fix: Print mode-specific follow-up steps: for the mobile mode, describe the Mobile Nebula file import and the shred step instead of the systemctl/scp sequence.

Tests and validation

  • No configured deterministic checks.

Questions

  • nebula/certs/{lena,lyra,vega}.crt are reissued as v2 certificates in this MR, but ipv6HostMap defaults publish AAAA/hosts records only for pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone and electra. If those reissued certificates now carry fd56:f458:569c::{2,3,21}, should those three hosts be added to ipv6HostMap (the option description says to add nodes only with their certificate rollout)?
  • hosts/vega/default.nix sets exitNode.enable = false while README says to pass none as the unsafe-networks argument when reissuing a retired exit node. Did the Vega reissue drop its route authority, or does nebula/certs/vega.crt still carry unsafe networks?
  • nebula-revoke records fingerprints for chaos and cosmos and removes secrets/nebula/chaos.yaml, but .sops.yaml (not in the changed set) still declares the *chaos/*cosmos creation rules and recipients. Should those entries be retired with the identities?

Review limitations

  • Diffs for secrets/nebula/{phone,router,vega}.yaml were not supplied; the checked-out tree confirms the files exist but their content changes could not be inspected.
  • The tools available cannot decode base64 Nebula certificates, so the networks, groups and unsafe networks of nebula/certs/{router,vega,phone,chaos,cosmos}.crt are unverified; findings that depend on certificate contents are phrased as conditionals.
  • I did not evaluate Nix, run just recipes, or execute repository code, so nix flake check, ShellCheck and the bundle/revocation regressions reported in the PR text were not reproduced.
  • The router's OpenWrt/NixOS configuration and the ~/Projects/router-nebula regression tests are not part of this checkout, so the router's lighthouse/relay role (assumed by ROUTER_LIGHTHOUSE_LINES/ROUTER_RELAY_LINES and by relays = ... clientLighthouseList) could not be confirmed.
  • I did not verify that the fingerprints in nebula/revoked.json correspond to the retained nebula/certs/chaos.crt and nebula/certs/cosmos.crt.
  • Live runtime evidence (Nebula version, active overlay addresses, blocked fingerprints, router/phone egress, per-host service checks) is outside the supplied material.

Diff coverage

  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • nebula/router.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 19
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `51345c08aa2963ccf7ddb5421a8a77a5ed27a8da` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The dual-stack wiring is internally consistent in the supplied material: `nebula/router.json` (ipv4 `10.10.0.10`, ipv6 `fd56:f458:569c::10`, split exit routes) is read both by `modules/networking/nebula.nix` (`routerIp`, `router.ipv6` in `ipv6HostMap`) and by the `mobile-router-full-tunnel` branch of `just nebula-bundle`; the four registered NixOS hosts (`hosts/{electra,lena,lyra,vega}/default.nix`) are exactly the four that set `routerBootstrapAddresses = [ "router-underlay:4242" ]`, matching the README claim that all registered mesh hosts opt into the bootstrap; `nebula/revoked.json` feeds both the module's `pki.blocklist` and the bundle blocklist; the removed `NEBULA_FULL_TUNNEL_*` just constants have no remaining `{{ }}` references; `../../nebula/router.json` and `../../nebula/revoked.json` resolve correctly from `modules/networking/nebula.nix`; `exitNode.enable = false` satisfies the module's assertion; and the `.gitignore` pattern `nebula-bundle-*/` matches `BUNDLE_DIR="nebula-bundle-$NAME"`. The only actionable issues I could ground in the supplied diff are in the bundle recipe's secret-handling and operator-facing output. ### Blocking findings None. ### Important findings - **mobile-import.yml carries the plaintext node key but is not covered by the recipe's shred guidance** (justfiles/nebula.just:623; high confidence) The new mobile branch embeds the key inline: `for field in ca cert key; do ... pem_file="$BUNDLE_DIR/$NAME.key" ... sed 's/^/ /' "$pem_file"; done } > "$BUNDLE_DIR/mobile-import.yml"` (lines 610-624, `chmod 600` at 624). The only cleanup the recipe prints is `echo "WARNING: $BUNDLE_DIR/$NAME.key is plaintext — scp and then shred it locally:"` / `echo " shred -u $BUNDLE_DIR/$NAME.key"` (lines 659-660), and the recipe's `trap` at line 354 shreds only files under `$TMPDIR` (`/dev/shm`), never `$BUNDLE_DIR`. The new `.gitignore` entry `nebula-bundle-*/` keeps the directory untracked but does not remove it. Impact: After a `mobile-router-full-tunnel` run the node's private key exists in plaintext in two working-tree files, but the operator-visible instruction names only `$NAME.key`; `nebula-bundle-phone/mobile-import.yml` therefore persists unshredded (and is not listed in the printed file inventory at line 644 as needing destruction). Suggested fix: Extend the printed cleanup to every secret-bearing artifact, e.g. `shred -u "$BUNDLE_DIR/$NAME.key" "$BUNDLE_DIR/mobile-import.yml"`, and state that `mobile-import.yml` must be consumed on the phone and then shredded. ### Suggestions - **Lighthouse serve_dns host derivation aborts for a certificate with no IPv4 network** (justfiles/nebula.just:413; medium confidence) `CERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]')` runs under the recipe's `set -euo pipefail` and is consumed as `" host: \"${CERT_IP}\""` in the lighthouse branch. The same MR widens `nebula-add-host` to accept IPv6-only input (`if [[ "$IP" = *:* ]]; then CERT_NETWORKS="$IP/64"`), so a v2 lighthouse certificate holding only IPv6 CIDRs yields `[] | .[0]` = `null` and `null | split("/")` is a jq error; the recipe already guards the analogous IPv6 requirement for the phone certificate (`if [ -z "$CERT_IPV6_NETWORKS" ]; then echo "ERROR: ..."; exit 1`). Impact: `just nebula-bundle <lighthouse> standard` would abort before writing any bundle file, with only a raw jq error as the diagnostic, for a lighthouse whose v2 certificate has no IPv4 network; `serve_dns` would have no defined bind address. Suggested fix: Guard the derivation with an explicit message (or derive the bind address from the IPv6 network) instead of relying on a jq failure, mirroring the existing explicit check. - **Mobile bundle mode still prints Linux systemctl/scp deployment steps** (justfiles/nebula.just:647; high confidence) The follow-up output is unconditional on mode: `echo "Deploy commands (adjust remote path/user as needed):"`, `ssh root@<host> 'mkdir -p /etc/nebula && systemctl stop nebula || true'`, `scp $BUNDLE_DIR/* root@<host>:/etc/nebula/`, `chmod 600 /etc/nebula/$NAME.key`, `systemctl enable --now nebula` (lines 647-657). For `MODE=mobile-router-full-tunnel` the bundle additionally contains `mobile-import.yml` and `mobile-full-tunnel.txt` (printed at line 644), which `scp $BUNDLE_DIR/*` would install into `/etc/nebula/`. Impact: An operator following the printed steps for the phone profile is invited to run systemctl/scp against a Linux host, which would also copy the plaintext `mobile-import.yml` and a note file into `/etc/nebula/` there. Suggested fix: Print mode-specific follow-up steps: for the mobile mode, describe the Mobile Nebula file import and the shred step instead of the systemctl/scp sequence. ### Tests and validation - No configured deterministic checks. ### Questions - `nebula/certs/{lena,lyra,vega}.crt` are reissued as v2 certificates in this MR, but `ipv6HostMap` defaults publish AAAA/hosts records only for pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone and electra. If those reissued certificates now carry `fd56:f458:569c::{2,3,21}`, should those three hosts be added to `ipv6HostMap` (the option description says to add nodes only with their certificate rollout)? - `hosts/vega/default.nix` sets `exitNode.enable = false` while README says to pass `none` as the unsafe-networks argument when reissuing a retired exit node. Did the Vega reissue drop its route authority, or does `nebula/certs/vega.crt` still carry unsafe networks? - `nebula-revoke` records fingerprints for `chaos` and `cosmos` and removes `secrets/nebula/chaos.yaml`, but `.sops.yaml` (not in the changed set) still declares the `*chaos`/`*cosmos` creation rules and recipients. Should those entries be retired with the identities? ### Review limitations - Diffs for `secrets/nebula/{phone,router,vega}.yaml` were not supplied; the checked-out tree confirms the files exist but their content changes could not be inspected. - The tools available cannot decode base64 Nebula certificates, so the networks, groups and unsafe networks of `nebula/certs/{router,vega,phone,chaos,cosmos}.crt` are unverified; findings that depend on certificate contents are phrased as conditionals. - I did not evaluate Nix, run `just` recipes, or execute repository code, so `nix flake check`, ShellCheck and the bundle/revocation regressions reported in the PR text were not reproduced. - The router's OpenWrt/NixOS configuration and the `~/Projects/router-nebula` regression tests are not part of this checkout, so the router's lighthouse/relay role (assumed by `ROUTER_LIGHTHOUSE_LINES`/`ROUTER_RELAY_LINES` and by `relays = ... clientLighthouseList`) could not be confirmed. - I did not verify that the fingerprints in `nebula/revoked.json` correspond to the retained `nebula/certs/chaos.crt` and `nebula/certs/cosmos.crt`. - Live runtime evidence (Nebula version, active overlay addresses, blocked fingerprints, router/phone egress, per-host service checks) is outside the supplied material. ### Diff coverage - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `nebula/router.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/pangolin-vps.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 19 - Previous automated review: none found - Findings: 3 </details>
Author
Owner

Prepared review-policy commit 3565e9f, posted before pushing as requested.

User explicitly requested formal_review: true and allow_approval: true for this repository. Formal reviews were already enabled; this changes allow_approval from false to true. allow_request_changes remains false and minimum approval confidence remains high.

Validation: the maintained action's parse_config and validate_formal_review_config accept the repository settings; assertions confirm both requested flags are true. git diff --check passes. README reviewed: the configuration header already documents that executable settings are read from the trusted PR base commit.

Consequently this MR still uses main's existing approval policy until the setting change is merged. Publishing the branch does not make the MR authorize its own automated approval. No merge performed.

Prepared review-policy commit 3565e9f, posted before pushing as requested. User explicitly requested `formal_review: true` and `allow_approval: true` for this repository. Formal reviews were already enabled; this changes `allow_approval` from false to true. `allow_request_changes` remains false and minimum approval confidence remains high. Validation: the maintained action's `parse_config` and `validate_formal_review_config` accept the repository settings; assertions confirm both requested flags are true. `git diff --check` passes. README reviewed: the configuration header already documents that executable settings are read from the trusted PR base commit. Consequently this MR still uses main's existing approval policy until the setting change is merged. Publishing the branch does not make the MR authorize its own automated approval. No merge performed.
chore(review): enable formal automated approvals
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 2m22s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 7m6s
3565e9f9ec
clankbot left a comment

Automated code review

Reviewed commit: 3565e9f9ec44ed6336a3c349dd139e1fe7659133

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

Strict validation pass over the dual-stack Nebula rollout. The NixOS module (modules/networking/nebula.nix) resolves cleanly: router = builtins.fromJSON (builtins.readFile ../../nebula/router.json) and ../../nebula/revoked.json both exist as tracked files added in this change, no references remain to the removed vegaLanAddr/allLighthouseMap/lighthouseList/allLighthouseIps bindings (only vegaIp, still used by hostMap, survives), the four registered hosts (electra, lena, lyra, vega) set only routerBootstrapAddresses and exitNode.enable = false, which satisfies the module's exitNode assertion, and the three attrsets merged into networking.hosts use disjoint keys (IPv4 10.10.x, fd56:f458:569c::x, and the router's public addresses). potential/chaos is not in flake.nix (AGENTS.md: 'not registered in flake.nix'), so deleting secrets/nebula/chaos.yaml and dropping chaos from hostMap leaves no consumer. .gitignore's new nebula-bundle-*/ matches the bundle directory name (BUNDLE_DIR="nebula-bundle-$NAME", nebula.just:350). One concrete defect survives in the bundle recipe; the remaining items are unanswerable from supplied evidence and are returned as questions.

Blocking findings

None.

Important findings

  • nebula-bundle aborts on any certificate whose network list has no IPv4 CIDR (justfiles/nebula.just:413; high confidence)
    nebula-bundle runs under set -euo pipefail (nebula.just:325) and evaluates CERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]') unconditionally, before the mode/IS_LIGHTHOUSE branches. For a certificate whose details.networks holds only IPv6 CIDRs, map(select(contains(":") | not)) is [], so .[0] is null and null | split("/") is a jq type error; the failed command substitution makes the recipe exit before BUNDLE_DIR (line 350) is populated. README.md documents this input as supported: 'just nebula-add-host accepts a single bare IPv4 address (adds /16) or IPv6 address (adds /64)' and 'IPv6-only bootstrap additionally requires a reachable IPv6 lighthouse endpoint', and nebula-add-host builds CERT_NETWORKS="$IP/64" for a bare IPv6 argument. CERT_IPV6_NETWORKS (line 414) already handles the empty case with a plain string test, so only the IPv4 extraction is partial.
    Impact: An IPv6-only v2 certificate produces no bundle at all (including standard mode), and the operator sees a raw jq 'split input and argument must be strings' error instead of a diagnostic; CERT_IP is only consumed as the lighthouse dns.host bind address, so the abort is broader than the value's use.
    Suggested fix: Make the extraction total and fail where it is used, e.g. ... | (map(select(contains(":") | not)) | .[0]) // "" | split("/")[0] and then guard the $IS_LIGHTHOUSE branch with 'lighthouse bundle requires an IPv4 overlay address', or move the CERT_IP assignment inside that branch.

Suggestions

None.

Tests and validation

  • No configured deterministic checks.

Questions

  • In mobile-router-full-tunnel mode every unsafe route is emitted with via: "$EXIT_IP", i.e. nebula/router.json ipv4 = 10.10.0.10, including the IPv6 routes ::/1 and 8000::/1 from ipv6ExitRoutes, and mobile_nebula.dns_resolvers is also 10.10.0.10. Should the IPv6 routes use router.ipv6 (fd56:f458:569c::10) instead? Nothing in the supplied material states whether Nebula's via must match the route's address family.
  • Both the module (static_map.network = "ip") and both bundle branches (static_map: + network: ip) emit a static_map key whose value is the literal ip. Is that the intended Nebula setting? No supplied file defines a Nebula network named ip, and no other evidence in this checkout shows the key's schema, so I could not classify it as a defect.
  • The module now sets relays = ... clientLighthouseList, so all four registered NixOS clients name 10.10.0.10 as both a lighthouse and a relay. Does the OpenWrt router configuration declare am_relay: true for the router? That configuration lives in ~/Projects/router-nebula, which is not in this checkout.
  • .forgejo/ai-review.yml flips allow_approval: false to true while allow_request_changes: false and min_approval_confidence: high are unchanged. Is that combination intended for this repository's review bot? The option semantics are not defined in the supplied material.

Review limitations

  • The supplied diff is truncated: secrets/nebula/phone.yaml, secrets/nebula/router.yaml and secrets/nebula/vega.yaml appear in the changed-file list but their diffs were not supplied, and all SOPS values are encrypted, so no secret content could be inspected.
  • Certificate payloads (nebula/certs/*.crt) are opaque base64; I could not decode them, so claims that specific v2 certificates contain the fd56:f458:569c::x CIDRs (and therefore that ipv6HostMap lists only deployed addresses, or that lena/lyra/vega deliberately lack IPv6 entries) are unverified.
  • I did not execute nix flake check, just, ShellCheck, or any regression test; every validation claim in the PR text was treated as untrusted evidence.
  • The Nebula NixOS module option schema (services.nebula.networks.mesh), the sops-nix option schema, CoreDNS behaviour, and the Nebula config-key reference are not in this checkout, so I could not confirm the accepted value ranges for staticHostMap, lighthouses, relays, listen.host = "[::]", or static_map.
  • No defect was assessed in unchanged code that the changed files depend on but that was not supplied (e.g. modules/common/default-config.nix, flake.nix, the external router-nebula project).

Diff coverage

  • .forgejo/ai-review.yml: reviewed — included in a context-limited batch
  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • nebula/router.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 20
  • Previous automated review: none found
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `3565e9f9ec44ed6336a3c349dd139e1fe7659133` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment Strict validation pass over the dual-stack Nebula rollout. The NixOS module (modules/networking/nebula.nix) resolves cleanly: `router = builtins.fromJSON (builtins.readFile ../../nebula/router.json)` and `../../nebula/revoked.json` both exist as tracked files added in this change, no references remain to the removed `vegaLanAddr`/`allLighthouseMap`/`lighthouseList`/`allLighthouseIps` bindings (only `vegaIp`, still used by `hostMap`, survives), the four registered hosts (electra, lena, lyra, vega) set only `routerBootstrapAddresses` and `exitNode.enable = false`, which satisfies the module's exitNode assertion, and the three attrsets merged into `networking.hosts` use disjoint keys (IPv4 `10.10.x`, `fd56:f458:569c::x`, and the router's public addresses). `potential/chaos` is not in `flake.nix` (AGENTS.md: 'not registered in flake.nix'), so deleting `secrets/nebula/chaos.yaml` and dropping `chaos` from `hostMap` leaves no consumer. `.gitignore`'s new `nebula-bundle-*/` matches the bundle directory name (`BUNDLE_DIR="nebula-bundle-$NAME"`, nebula.just:350). One concrete defect survives in the bundle recipe; the remaining items are unanswerable from supplied evidence and are returned as questions. ### Blocking findings None. ### Important findings - **nebula-bundle aborts on any certificate whose network list has no IPv4 CIDR** (justfiles/nebula.just:413; high confidence) nebula-bundle runs under `set -euo pipefail` (nebula.just:325) and evaluates `CERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]')` unconditionally, before the mode/`IS_LIGHTHOUSE` branches. For a certificate whose `details.networks` holds only IPv6 CIDRs, `map(select(contains(":") | not))` is `[]`, so `.[0]` is `null` and `null | split("/")` is a jq type error; the failed command substitution makes the recipe exit before `BUNDLE_DIR` (line 350) is populated. README.md documents this input as supported: '`just nebula-add-host` accepts a single bare IPv4 address (adds `/16`) or IPv6 address (adds `/64`)' and 'IPv6-only bootstrap additionally requires a reachable IPv6 lighthouse endpoint', and nebula-add-host builds `CERT_NETWORKS="$IP/64"` for a bare IPv6 argument. `CERT_IPV6_NETWORKS` (line 414) already handles the empty case with a plain string test, so only the IPv4 extraction is partial. Impact: An IPv6-only v2 certificate produces no bundle at all (including `standard` mode), and the operator sees a raw jq 'split input and argument must be strings' error instead of a diagnostic; `CERT_IP` is only consumed as the lighthouse `dns.host` bind address, so the abort is broader than the value's use. Suggested fix: Make the extraction total and fail where it is used, e.g. `... | (map(select(contains(":") | not)) | .[0]) // "" | split("/")[0]` and then guard the `$IS_LIGHTHOUSE` branch with 'lighthouse bundle requires an IPv4 overlay address', or move the `CERT_IP` assignment inside that branch. ### Suggestions None. ### Tests and validation - No configured deterministic checks. ### Questions - In `mobile-router-full-tunnel` mode every unsafe route is emitted with `via: "$EXIT_IP"`, i.e. `nebula/router.json` `ipv4` = `10.10.0.10`, including the IPv6 routes `::/1` and `8000::/1` from `ipv6ExitRoutes`, and `mobile_nebula.dns_resolvers` is also `10.10.0.10`. Should the IPv6 routes use `router.ipv6` (`fd56:f458:569c::10`) instead? Nothing in the supplied material states whether Nebula's `via` must match the route's address family. - Both the module (`static_map.network = "ip"`) and both bundle branches (`static_map:` + ` network: ip`) emit a `static_map` key whose value is the literal `ip`. Is that the intended Nebula setting? No supplied file defines a Nebula network named `ip`, and no other evidence in this checkout shows the key's schema, so I could not classify it as a defect. - The module now sets `relays = ... clientLighthouseList`, so all four registered NixOS clients name `10.10.0.10` as both a lighthouse and a relay. Does the OpenWrt router configuration declare `am_relay: true` for the router? That configuration lives in `~/Projects/router-nebula`, which is not in this checkout. - `.forgejo/ai-review.yml` flips `allow_approval: false` to `true` while `allow_request_changes: false` and `min_approval_confidence: high` are unchanged. Is that combination intended for this repository's review bot? The option semantics are not defined in the supplied material. ### Review limitations - The supplied diff is truncated: `secrets/nebula/phone.yaml`, `secrets/nebula/router.yaml` and `secrets/nebula/vega.yaml` appear in the changed-file list but their diffs were not supplied, and all SOPS values are encrypted, so no secret content could be inspected. - Certificate payloads (nebula/certs/*.crt) are opaque base64; I could not decode them, so claims that specific v2 certificates contain the `fd56:f458:569c::x` CIDRs (and therefore that `ipv6HostMap` lists only deployed addresses, or that lena/lyra/vega deliberately lack IPv6 entries) are unverified. - I did not execute `nix flake check`, `just`, ShellCheck, or any regression test; every validation claim in the PR text was treated as untrusted evidence. - The Nebula NixOS module option schema (`services.nebula.networks.mesh`), the sops-nix option schema, CoreDNS behaviour, and the Nebula config-key reference are not in this checkout, so I could not confirm the accepted value ranges for `staticHostMap`, `lighthouses`, `relays`, `listen.host = "[::]"`, or `static_map`. - No defect was assessed in unchanged code that the changed files depend on but that was not supplied (e.g. `modules/common/default-config.nix`, `flake.nix`, the external router-nebula project). ### Diff coverage - `.forgejo/ai-review.yml`: **reviewed** — included in a context-limited batch - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `nebula/router.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 20 - Previous automated review: none found - Findings: 1 </details>
Author
Owner

Response to review of 3565e9f, posted before pushing prepared fix a4ca4ea.

The important IPv6-only bundle finding is valid and fixed. Certificate address extraction now prefers an available IPv4 address and falls back to the first IPv6 address, with an explicit diagnostic if a lighthouse certificate has no DNS bind address. Thus IPv6-only clients no longer hit jq split(null), and IPv6-only lighthouses can use their IPv6 overlay DNS address rather than being rejected. README documents this behavior.

Validation: real disposable IPv4-only, IPv6-only and dual-stack v2 certificates were rendered through the bundle recipe for lighthouse/client/mobile variants. Every accepted config and inline mobile import passes Nebula -test; explicit checks verify IPv6-only lighthouse DNS uses fd56:f458:569c::10. The complete matrix retains populated/empty/absent blocklist coverage and missing/malformed router metadata probes. IPv4-only full-tunnel remains rejected. ShellCheck passes for the rendered recipe and external tests; git diff --check passes. Tests remain in ~/Projects/router-nebula as requested. These are config validation tests, not live IPv6 internet egress acceptance. No production credentials were rotated or changed.

Answers to the remaining questions:

  1. via identifies the Nebula gateway peer, not the destination route's IP family. The exact deployed v1.10.3 implementation parses via as an address independently of route CIDR in overlay/route.go, then selects that peer for the routed packet in inside.go. From this implementation there is no same-family requirement between route and via. The official IPv6 upgrade guide likewise gives an IPv4 destination route via an IPv6 overlay gateway. Current phone DNS remains the reachable router IPv4 overlay resolver; IPv6 internet egress acceptance is still tracked separately.
  2. static_map.network: ip is a documented enum selecting both IPv4 and IPv6 underlay resolution, not the name of a Nebula network. See static_map.network reference.
  3. The authorized router root pane's deployed /etc/nebula/config.yml was read narrowly and confirms relay.am_relay=true and use_relays=false. The maintained external OpenWrt config agrees. No live changes were made.
  4. formal_review: true and allow_approval: true were explicitly requested by the user for this repository. Minimum approval confidence remains high; request-changes authority was not requested. Settings are read from the trusted base branch and become effective after merge. See prior comment and the action's formal_review_event implementation.

Nebula 1.10.3 lighthouse DNS constructs its bind address with net.JoinHostPort, supporting the bare IPv6 host emitted by this fix: dns_server.go. Existing deployment/canary limitations and the review-action pagination defect remain tracked.

Response to review of 3565e9f, posted before pushing prepared fix a4ca4ea. The important IPv6-only bundle finding is valid and fixed. Certificate address extraction now prefers an available IPv4 address and falls back to the first IPv6 address, with an explicit diagnostic if a lighthouse certificate has no DNS bind address. Thus IPv6-only clients no longer hit jq split(null), and IPv6-only lighthouses can use their IPv6 overlay DNS address rather than being rejected. README documents this behavior. Validation: real disposable IPv4-only, IPv6-only and dual-stack v2 certificates were rendered through the bundle recipe for lighthouse/client/mobile variants. Every accepted config and inline mobile import passes Nebula -test; explicit checks verify IPv6-only lighthouse DNS uses fd56:f458:569c::10. The complete matrix retains populated/empty/absent blocklist coverage and missing/malformed router metadata probes. IPv4-only full-tunnel remains rejected. ShellCheck passes for the rendered recipe and external tests; git diff --check passes. Tests remain in ~/Projects/router-nebula as requested. These are config validation tests, not live IPv6 internet egress acceptance. No production credentials were rotated or changed. Answers to the remaining questions: 1. `via` identifies the Nebula gateway peer, not the destination route's IP family. The exact deployed v1.10.3 implementation parses `via` as an address independently of route CIDR in [overlay/route.go](https://github.com/slackhq/nebula/blob/v1.10.3/overlay/route.go#L203), then selects that peer for the routed packet in [inside.go](https://github.com/slackhq/nebula/blob/v1.10.3/inside.go#L151). From this implementation there is no same-family requirement between route and via. The official [IPv6 upgrade guide](https://nebula.defined.net/docs/guides/upgrade-to-cert-v2-and-ipv6/) likewise gives an IPv4 destination route via an IPv6 overlay gateway. Current phone DNS remains the reachable router IPv4 overlay resolver; IPv6 internet egress acceptance is still tracked separately. 2. `static_map.network: ip` is a documented enum selecting both IPv4 and IPv6 underlay resolution, not the name of a Nebula network. See [static_map.network reference](https://nebula.defined.net/docs/config/static-map/). 3. The authorized router root pane's deployed /etc/nebula/config.yml was read narrowly and confirms relay.am_relay=true and use_relays=false. The maintained external OpenWrt config agrees. No live changes were made. 4. `formal_review: true` and `allow_approval: true` were explicitly requested by the user for this repository. Minimum approval confidence remains high; request-changes authority was not requested. Settings are read from the trusted base branch and become effective after merge. See prior comment and the action's formal_review_event implementation. Nebula 1.10.3 lighthouse DNS constructs its bind address with net.JoinHostPort, supporting the bare IPv6 host emitted by this fix: [dns_server.go](https://github.com/slackhq/nebula/blob/v1.10.3/dns_server.go#L181). Existing deployment/canary limitations and the review-action pagination defect remain tracked.
fix(nebula): support IPv6-only bundle certificates
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m25s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 6m22s
a4ca4ea882
clankbot left a comment

Automated code review

Reviewed commit: a4ca4ea882ffd5ffe7f943074638088e9d8bc2f1

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Strict validation pass over the supplied diff. The dual-stack wiring is internally consistent across the changed files: nebula/router.json supplies ipv4/ipv6/exit-route lists that both the NixOS module (modules/networking/nebula.nix:11-17, ipv6HostMap) and the bundle recipe (justfiles/nebula.just:444-452) read with matching keys; all four registered nixosConfigurations hosts (flake.nix:213-216 → electra, lena, lyra, vega) set routerBootstrapAddresses, which the module turns into a static_host_map entry plus lighthouse/relay entries; the blocklist is derived identically from nebula/revoked.json in both consumers (lib.flatten (attrValues …) vs jq '[.[][]] | unique[]'), and pki.disconnect_invalid/static_map.network match; .gitignore:9 nebula-bundle-*/ covers the BUNDLE_DIR="nebula-bundle-$NAME" output that now holds a plaintext key and mobile-import.yml. No removed binding is left dangling (vegaLanAddr, allLighthouseMap, allLighthouseIps, lighthouseList, NEBULA_FULL_TUNNEL_*, LH_SECONDARY_IP have no remaining references), and no chaos/cosmos reference survives outside potential/. The initial review's four findings did not survive validation: the router-underlay:4242 reachability claim depends on Nebula's name-resolution behaviour, which is not in the supplied material and is explicitly documented as intended in README.md:126-133; the via: "${EXIT_IP}" for IPv6 routes is self-consistent because the generated config registers only EXIT_IP as a static_host_map key, so the IPv6 overlay address would be unresolvable; the dead networking.nat/sysctl block is unchanged code with no registered user. One actionable concern remains: reissuing a certificate does not record the superseded fingerprint, so the retired Vega route authority is not actually revoked by the blocklist mechanism the README describes.

Blocking findings

None.

Important findings

None.

Suggestions

  • Reissuing a retired exit node's certificate does not record the superseded fingerprint, so its old route authority is not revoked (justfiles/nebula.just:100; medium confidence)
    nebula-reissue deletes the old certificate (rm "$CERT", justfiles/nebula.just:100) and signs a replacement, but never writes the old fingerprint to nebula/revoked.json; only nebula-revoke (justfiles/nebula.just:712-717) records fingerprints, and nebula/revoked.json contains only the chaos and cosmos entries. Both consumers of the blocklist derive it solely from that file (modules/networking/nebula.nix:203-205 and the recipe's REVOKED_FINGERPRINT_LINES). This MR replaces nebula/certs/vega.crt (index ed3aa65..9c68387) and sets exitNode.enable = false (hosts/vega/default.nix:137), and README.md documents that reissuing with none removes the route authority while stating that the blocklist is what revokes peer network access.
    Impact: Peers that still hold the pre-reissue Vega credentials keep a CA-valid certificate whose unsafe-network authority was intended to be retired; nothing in the supplied changes blocks that fingerprint, so the authority removal only applies to peers that reload the new certificate.
    Suggested fix: If superseded reissued credentials must stop serving traffic, have nebula-reissue append the pre-reissue fingerprint to nebula/revoked.json (or add an explicit superseded list consumed by the same blocklist) and redeploy; otherwise state in README.md that reissued-but-not-retired certificates are intentionally left valid.

Tests and validation

  • No configured deterministic checks.

Questions

  • Does Nebula resolve hostnames appearing in static_host_map endpoint values? All four hosts set routerBootstrapAddresses = [ "router-underlay:4242" ] (hosts/{vega,lyra,lena,electra}/default.nix), and router-underlay exists only as a reverse /etc/hosts record built from routerUnderlayAddresses (modules/networking/nebula.nix:231); every previously supplied static_host_map value was numeric ("195.20.255.115:4242"). Nebula's own configuration parsing was not supplied, so this cannot be settled from the diff.
  • Should the router's IPv6 overlay address (fd56:f458:569c::10, already in ipv6HostMap) also appear as a static_host_map/lighthouse key for NixOS clients, given README.md:110-111 says IPv6-only bootstrap requires a reachable IPv6 lighthouse endpoint in static_host_map? The module only ever keys the router entry by router.ipv4.
  • Is the single via: "${EXIT_IP}" (justfiles/nebula.just:476) for the IPv6 unsafe routes ::/1 and 8000::/1 correct because via names a node rather than an address family, or must IPv6 routes reference the router's IPv6 overlay address? The generated config registers only EXIT_IP in static_host_map, so the answer determines whether router.json.ipv6 is intentionally unused by the recipe.
  • Should nebula-reissue refuse or warn when the resulting certificate drops unsafe-network authority (the none form) without a corresponding blocklist entry?
  • Is allow_approval: true (.forgejo/ai-review.yml, with min_approval_confidence: high) intended to accompany this MR, and does it interact with allow_request_changes: false?

Review limitations

  • Certificate payloads in nebula/certs/*.crt are opaque base64 in the supplied diff; I could not decode names, networks, unsafe networks or fingerprints, so the claimed dual addresses, the router's 0.0.0.0/1,128.0.0.0/1,::/1,8000::/1 authority, and the phone's fd56:f458:569c::30/64 are unverified.
  • secrets/nebula/*.yaml are sops-encrypted; I confirmed only that the files exist (including new router.yaml/phone.yaml) and that .sops.yaml's secrets/nebula/[^/]+\.yaml$ rule scopes non-host nodes to the YubiKeys and provisioning identity. Key contents were not inspectable.
  • The Nebula CAC NixOS module (services.nebula.networks) and Nebula's own configuration semantics are not vendored in this checkout, so option names (static_map.network, pki.blocklist, listen.host = "[::]") and their runtime effect could not be type-checked against the module schema.
  • I could not run nix flake check, ShellCheck, just, or any repository code; all evaluation, deployment and CI claims in the PR text are unverified evidence.
  • No Nebula regression tests exist in this checkout (tests/ holds only backup-restore, deploy-wrapper, pin-lifecycle and update-remediation regressions); the PR states they live in ~/Projects/router-nebula, which was not supplied.
  • No live host evidence is available: router public IPv6 bootstrap, phone IPv6 internet egress, blocklist propagation to native/mobile peers, and the NixOS rollout remain unconfirmed.
  • I did not inspect the linked issues, milestones, or the review-action issue referenced in the PR text; they were not supplied.

Diff coverage

  • .forgejo/ai-review.yml: reviewed — included in a context-limited batch
  • .gitignore: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • hosts/electra/default.nix: reviewed — included in a context-limited batch
  • hosts/lena/default.nix: reviewed — included in a context-limited batch
  • hosts/lyra/default.nix: reviewed — included in a context-limited batch
  • hosts/vega/default.nix: reviewed — included in a context-limited batch
  • justfiles/nebula.just: reviewed — included in a context-limited batch
  • modules/networking/nebula.nix: reviewed — included in a context-limited batch
  • nebula/certs/electra.crt: reviewed — included in a context-limited batch
  • nebula/certs/lena.crt: reviewed — included in a context-limited batch
  • nebula/certs/lyra.crt: reviewed — included in a context-limited batch
  • nebula/certs/mass-storage.crt: reviewed — included in a context-limited batch
  • nebula/certs/media1.crt: reviewed — included in a context-limited batch
  • nebula/certs/nimmog-de.crt: reviewed — included in a context-limited batch
  • nebula/certs/nova.crt: reviewed — included in a context-limited batch
  • nebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batch
  • nebula/certs/phone.crt: reviewed — included in a context-limited batch
  • nebula/certs/router.crt: reviewed — included in a context-limited batch
  • nebula/certs/vega.crt: reviewed — included in a context-limited batch
  • nebula/revoked.json: reviewed — included in a context-limited batch
  • nebula/router.json: reviewed — included in a context-limited batch
  • secrets/nebula/chaos.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/electra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lena.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/lyra.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/media1.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batch
  • secrets/nebula/nova.yaml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 21
  • Previous automated review: none found
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `a4ca4ea882ffd5ffe7f943074638088e9d8bc2f1` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Strict validation pass over the supplied diff. The dual-stack wiring is internally consistent across the changed files: `nebula/router.json` supplies `ipv4`/`ipv6`/exit-route lists that both the NixOS module (`modules/networking/nebula.nix:11-17`, `ipv6HostMap`) and the bundle recipe (`justfiles/nebula.just:444-452`) read with matching keys; all four registered `nixosConfigurations` hosts (flake.nix:213-216 → electra, lena, lyra, vega) set `routerBootstrapAddresses`, which the module turns into a `static_host_map` entry plus lighthouse/relay entries; the blocklist is derived identically from `nebula/revoked.json` in both consumers (`lib.flatten (attrValues …)` vs `jq '[.[][]] | unique[]'`), and `pki.disconnect_invalid`/`static_map.network` match; `.gitignore:9 nebula-bundle-*/` covers the `BUNDLE_DIR="nebula-bundle-$NAME"` output that now holds a plaintext key and `mobile-import.yml`. No removed binding is left dangling (`vegaLanAddr`, `allLighthouseMap`, `allLighthouseIps`, `lighthouseList`, `NEBULA_FULL_TUNNEL_*`, `LH_SECONDARY_IP` have no remaining references), and no `chaos`/`cosmos` reference survives outside `potential/`. The initial review's four findings did not survive validation: the `router-underlay:4242` reachability claim depends on Nebula's name-resolution behaviour, which is not in the supplied material and is explicitly documented as intended in README.md:126-133; the `via: "${EXIT_IP}"` for IPv6 routes is self-consistent because the generated config registers only `EXIT_IP` as a `static_host_map` key, so the IPv6 overlay address would be unresolvable; the dead `networking.nat`/`sysctl` block is unchanged code with no registered user. One actionable concern remains: reissuing a certificate does not record the superseded fingerprint, so the retired Vega route authority is not actually revoked by the blocklist mechanism the README describes. ### Blocking findings None. ### Important findings None. ### Suggestions - **Reissuing a retired exit node's certificate does not record the superseded fingerprint, so its old route authority is not revoked** (justfiles/nebula.just:100; medium confidence) `nebula-reissue` deletes the old certificate (`rm "$CERT"`, justfiles/nebula.just:100) and signs a replacement, but never writes the old fingerprint to `nebula/revoked.json`; only `nebula-revoke` (justfiles/nebula.just:712-717) records fingerprints, and `nebula/revoked.json` contains only the `chaos` and `cosmos` entries. Both consumers of the blocklist derive it solely from that file (modules/networking/nebula.nix:203-205 and the recipe's `REVOKED_FINGERPRINT_LINES`). This MR replaces `nebula/certs/vega.crt` (index ed3aa65..9c68387) and sets `exitNode.enable = false` (hosts/vega/default.nix:137), and README.md documents that reissuing with `none` removes the route authority while stating that the blocklist is what revokes peer network access. Impact: Peers that still hold the pre-reissue Vega credentials keep a CA-valid certificate whose unsafe-network authority was intended to be retired; nothing in the supplied changes blocks that fingerprint, so the authority removal only applies to peers that reload the new certificate. Suggested fix: If superseded reissued credentials must stop serving traffic, have `nebula-reissue` append the pre-reissue fingerprint to `nebula/revoked.json` (or add an explicit superseded list consumed by the same blocklist) and redeploy; otherwise state in README.md that reissued-but-not-retired certificates are intentionally left valid. ### Tests and validation - No configured deterministic checks. ### Questions - Does Nebula resolve hostnames appearing in `static_host_map` endpoint values? All four hosts set `routerBootstrapAddresses = [ "router-underlay:4242" ]` (hosts/{vega,lyra,lena,electra}/default.nix), and `router-underlay` exists only as a reverse /etc/hosts record built from `routerUnderlayAddresses` (modules/networking/nebula.nix:231); every previously supplied static_host_map value was numeric (`"195.20.255.115:4242"`). Nebula's own configuration parsing was not supplied, so this cannot be settled from the diff. - Should the router's IPv6 overlay address (`fd56:f458:569c::10`, already in `ipv6HostMap`) also appear as a `static_host_map`/lighthouse key for NixOS clients, given README.md:110-111 says IPv6-only bootstrap requires a reachable IPv6 lighthouse endpoint in `static_host_map`? The module only ever keys the router entry by `router.ipv4`. - Is the single `via: "${EXIT_IP}"` (justfiles/nebula.just:476) for the IPv6 unsafe routes `::/1` and `8000::/1` correct because `via` names a node rather than an address family, or must IPv6 routes reference the router's IPv6 overlay address? The generated config registers only `EXIT_IP` in `static_host_map`, so the answer determines whether `router.json.ipv6` is intentionally unused by the recipe. - Should `nebula-reissue` refuse or warn when the resulting certificate drops unsafe-network authority (the `none` form) without a corresponding blocklist entry? - Is `allow_approval: true` (.forgejo/ai-review.yml, with `min_approval_confidence: high`) intended to accompany this MR, and does it interact with `allow_request_changes: false`? ### Review limitations - Certificate payloads in `nebula/certs/*.crt` are opaque base64 in the supplied diff; I could not decode names, networks, unsafe networks or fingerprints, so the claimed dual addresses, the router's `0.0.0.0/1,128.0.0.0/1,::/1,8000::/1` authority, and the phone's `fd56:f458:569c::30/64` are unverified. - `secrets/nebula/*.yaml` are sops-encrypted; I confirmed only that the files exist (including new `router.yaml`/`phone.yaml`) and that `.sops.yaml`'s `secrets/nebula/[^/]+\.yaml$` rule scopes non-host nodes to the YubiKeys and provisioning identity. Key contents were not inspectable. - The Nebula CAC NixOS module (`services.nebula.networks`) and Nebula's own configuration semantics are not vendored in this checkout, so option names (`static_map.network`, `pki.blocklist`, `listen.host = "[::]"`) and their runtime effect could not be type-checked against the module schema. - I could not run `nix flake check`, ShellCheck, `just`, or any repository code; all evaluation, deployment and CI claims in the PR text are unverified evidence. - No Nebula regression tests exist in this checkout (`tests/` holds only backup-restore, deploy-wrapper, pin-lifecycle and update-remediation regressions); the PR states they live in `~/Projects/router-nebula`, which was not supplied. - No live host evidence is available: router public IPv6 bootstrap, phone IPv6 internet egress, blocklist propagation to native/mobile peers, and the NixOS rollout remain unconfirmed. - I did not inspect the linked issues, milestones, or the review-action issue referenced in the PR text; they were not supplied. ### Diff coverage - `.forgejo/ai-review.yml`: **reviewed** — included in a context-limited batch - `.gitignore`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `hosts/electra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lena/default.nix`: **reviewed** — included in a context-limited batch - `hosts/lyra/default.nix`: **reviewed** — included in a context-limited batch - `hosts/vega/default.nix`: **reviewed** — included in a context-limited batch - `justfiles/nebula.just`: **reviewed** — included in a context-limited batch - `modules/networking/nebula.nix`: **reviewed** — included in a context-limited batch - `nebula/certs/electra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lena.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/lyra.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/mass-storage.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/media1.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nimmog-de.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/nova.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/pangolin-vps.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/phone.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/router.crt`: **reviewed** — included in a context-limited batch - `nebula/certs/vega.crt`: **reviewed** — included in a context-limited batch - `nebula/revoked.json`: **reviewed** — included in a context-limited batch - `nebula/router.json`: **reviewed** — included in a context-limited batch - `secrets/nebula/chaos.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/electra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lena.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/lyra.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/mass-storage.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/media1.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nimmog-de.yaml`: **reviewed** — included in a context-limited batch - `secrets/nebula/nova.yaml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/nova-remote-builder.md, README.md - Commits considered: 21 - Previous automated review: none found - Findings: 1 </details>
Author
Owner

Final review at a4ca4ea reports Ready to merge; CI test and review jobs pass. The one advisory suggestion is valid: certificate reissue itself does not revoke the old fingerprint.

Prepared documentation-only follow-up 50a3e7c states that explicitly in README. Replaced certificates intentionally overlap during the rolling activation, avoiding disruption to hosts that still run the previous pair. After Vega's new no-unsafe-route pair is accepted, #297 now requires explicit blocking of its superseded exit fingerprint (3d14d599e015f90b11037915aba5da932ba3221368ae20e08d324cf143849671, decoded from the public main certificate; authority 0.0.0.0/1 and 128.0.0.0/1) on all peers. That list must be separate from retired host names so active Vega remains provisionable.

This implements the review's documentation alternative without prematurely revoking the still-live Vega pair. No credential, configuration or runtime change in this follow-up. Focused documentation review and git diff --check pass. Existing full flake checks, meaningful Nebula regressions, Electra canary and current green CI remain the merge evidence. User authorized merge when findings are resolved; deployment/retirement issues stay open for remaining live acceptance.

Posted before pushing 50a3e7c.

Final review at a4ca4ea reports Ready to merge; CI test and review jobs pass. The one advisory suggestion is valid: certificate reissue itself does not revoke the old fingerprint. Prepared documentation-only follow-up 50a3e7c states that explicitly in README. Replaced certificates intentionally overlap during the rolling activation, avoiding disruption to hosts that still run the previous pair. After Vega's new no-unsafe-route pair is accepted, #297 now requires explicit blocking of its superseded exit fingerprint (`3d14d599e015f90b11037915aba5da932ba3221368ae20e08d324cf143849671`, decoded from the public main certificate; authority 0.0.0.0/1 and 128.0.0.0/1) on all peers. That list must be separate from retired host names so active Vega remains provisionable. This implements the review's documentation alternative without prematurely revoking the still-live Vega pair. No credential, configuration or runtime change in this follow-up. Focused documentation review and git diff --check pass. Existing full flake checks, meaningful Nebula regressions, Electra canary and current green CI remain the merge evidence. User authorized merge when findings are resolved; deployment/retirement issues stay open for remaining live acceptance. Posted before pushing 50a3e7c.
docs(nebula): clarify reissue overlap and exit certificate retirement
Some checks failed
Build and Push Attic Cache / test (pull_request) Successful in 1m24s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Failing after 7m58s
50a3e7cace
nimmo merged commit fbc8cf5a98 into main 2026-10-10 10:37:17 +01:00
nimmo deleted branch feat/router-nebula 2026-10-10 10:37:17 +01:00
Sign in to join this conversation.
No reviewers
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!307
No description provided.