Skip to content

Fix auth-probe accuracy; add topology + rebirth discovery#1

Open
ShadMalloy wants to merge 3 commits into
mainfrom
feature/auth-probe-fixes-and-topology
Open

Fix auth-probe accuracy; add topology + rebirth discovery#1
ShadMalloy wants to merge 3 commits into
mainfrom
feature/auth-probe-fixes-and-topology

Conversation

@ShadMalloy

Copy link
Copy Markdown
Contributor

Summary

  • Fix a false-positive auth finding: the anonymous-PUBLISH probe now confirms acceptance by redelivery rather than a bare PUBACK (brokers ACK a QoS=1 publish even when an ACL denies it), and reports anon CONNECT/SUBSCRIBE as "not tested" when credentials are supplied. Also corrects the Eclipse Tahu license attribution to EPL-2.0.
  • Fix two invalid-fuzz-case bugs: Boolean DataSet cells were coerced to int (now bool-before-int), and rejected boundary cases were silently swallowed (now logged like every sibling generator).
  • Add --topology-diagram (Mermaid graph of the discovered broker/group/node/device topology) and --request-rebirth (recover node births missed on late join), plus GitHub Actions CI (pytest on 3.11/3.13).

Test plan

  • pytest -q — 32 passing
  • py_compile + --help clean
  • Live broker: anon-write probe confirmed via redelivery (redelivered: true)
  • Live broker: --request-rebirth recovers a node missed on late join (node_count 0 → 1)
  • --topology-diagram emits valid Mermaid (renders to SVG/PNG)
  • CI green on the PR

🤖 Generated with Claude Code

ShadMalloy and others added 3 commits July 7, 2026 18:06
Addresses code-review findings plus two related discovery features.

- Anon-PUBLISH probe now confirms acceptance by waiting for the broker to
  redeliver the probe to our own subscription. A PUBACK alone is not proof:
  brokers ACK a QoS=1 publish even when an ACL denies it, so the old check
  could report an unauthenticated-write finding that was not real.
- Report anon CONNECT/SUBSCRIBE as "not tested" (not False) when credentials
  were supplied — anonymous access is never exercised then, so "False"
  overstated the target's security posture.
- Emit valid Boolean DataSet cells: bool subclasses int, so the int branch
  was swallowing boolean elements and producing an invalid test case.
- Log skipped boundary cases via _gen_skip instead of a bare except:pass,
  matching every sibling generator (visible at -vv).
- Add --topology-diagram: after a run, write a Mermaid graph of the
  discovered broker/group/node/device topology, marking fuzzed entities.
- Add --request-rebirth: publish an NCMD Rebirth to discovered nodes so they
  re-send their non-retained NBIRTH/DBIRTH, recovering metric definitions
  missed when the fuzzer joins after a birth. Opt-in, active step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The suite loads sparkplug-fuzzer.py via importlib and exercises only
pure-Python paths, so it needs neither paho/protobuf nor the Tahu --setup
step; CI just installs requirements-dev.txt and runs pytest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Eclipse Tahu is licensed EPL-2.0, not Apache-2.0 (confirmed from Tahu's
LICENSE and the sparkplug_b.py SPDX header) — NOTICE and README wrongly
claimed Apache. Also document --topology-diagram and --request-rebirth,
rewrite the anon-write probe description to reflect redelivery confirmation
(a PUBACK is not proof of acceptance), and state Python 3.11+ to match CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ShadMalloy
ShadMalloy requested a review from a team as a code owner July 8, 2026 00:11
@ShadMalloy
ShadMalloy requested a review from 0xroot-bf July 8, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant