fix: bump bandit for two CVEs, pick up the released bb 0.30 chain, and stop reporting :homed for a move that didn't happen - #95
Merged
Conversation
jimsynz
force-pushed
the
sync-set-position
branch
2 times, most recently
from
August 21, 2026 23:45
3e98733 to
2a51853
Compare
:homed when a joint refused to movebandit for two CVEs, and stop reporting :homed for a move that didn't happen
…-2026-74836 Both advisories are against `bandit` 1.12.4, which this lockfile pinned. 1.12.5 shipped on 2026-08-20 and the `~> 1.5` requirement already admits it, so the lockfile is the whole change — the diff is one line and nothing else moves. This is not a dev-only dependency here. `{:bandit, "~> 1.5"}` carries no `only:`, and `config/config.exs` sets `adapter: Bandit.PhoenixAdapter` at base config rather than in `dev.exs`, so bandit is the HTTP adapter serving the dashboard endpoint in every environment this example runs in. (`bb_liveview` scopes it `only: :dev`; this repo does not.) The advisories therefore sit in the serving path, not beside it. The bump rests on the published advisories, not on a check run here: the vendored `mix_audit` 2.1.5 ships no advisory files at all, so `mix deps.audit` reports "No vulnerabilities found" locally both before and after this change. CI's audit job fetches a current database, but it is gated behind `MIX_ENV=test mix compile` and so is skipped, not passing, while that compile fails for unrelated reasons.
`Command.Home` discarded the result of `BB.Motion.send_positions/3` and
answered `:homed` unconditionally, so a caller got the same answer whether the
arm went home or nothing moved at all. `BB.Command.await/1` returning
`{:ok, :homed}` against a disarmed robot is worse than an error: it's a wrong
answer rather than a missing one.
`send_positions/2` publishes each command for observers and waits for the
actuator to accept it, so its return value now carries the refusal. Home passes
it through: `:ok` becomes `:homed`, and `{:error, reason}` is reported as-is
through the `result/1` clause the other commands here already have.
This is a behaviour change, not a port. The old `delivery: :direct` call still
compiles and still does what it always did — cast and hope. It is dropped
because homing is a discrete operation whose outcome the caller acts on, not a
control-loop step that can't afford a round trip.
The `bb` floor goes to `~> 0.30` with it, because the fix is exactly a reliance
on the new return value. Under 0.29 `send_positions/3` answered `:ok` whatever
happened, so this code would compile clean and go on reporting `:homed` for a
move that never occurred — the bug it is meant to fix, silently reintroduced.
An unchecked return fails quietly at runtime where a removed function fails
loudly at compile time, so the floor rules 0.29 out.
There is no test: this repo's `test/` carries only the Phoenix scaffolding, and
none of its commands are covered, so there is no fixture to extend without
building a robot harness first.
jimsynz
force-pushed
the
sync-set-position
branch
from
August 21, 2026 23:49
2a51853 to
8097f61
Compare
Both carry the fixes this example was waiting on. `bb_servo_robotis` 0.6.1 declares `c:BB.Actuator.capabilities/1` as `[:position_feedback]`, which clears the six `ValidatePositionFeedback` warnings on `BB.Example.WX200.Robot` — the Dynamixel controller reads `present_position` off the bus and publishes it as `JointState`, so these joints were always measured, but nothing in the DSL said so. `bb_liveview` 0.3.1 drops its call to `BB.Actuator.set_position!/3`, which bb 0.30 removed. Both were fatal under `--warnings-as-errors`, and between them they gated every job behind `MIX_ENV=test mix compile` in this repo's CI matrix. Lockfile only: the `~> 0.2` requirements already admitted both versions.
bandit for two CVEs, and stop reporting :homed for a move that didn't happenbandit for two CVEs, pick up the released bb 0.30 chain, and stop reporting :homed for a move that didn't happen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three independent commits, each standing on its own.
1.
bandit1.12.5 —EEF-CVE-2026-75484,EEF-CVE-2026-74836Both advisories are against
bandit1.12.4, which this lockfile pinned. 1.12.5shipped 2026-08-20 and the
~> 1.5requirement already admits it, so thelockfile is the whole change — one line, nothing else moved.
This is not a dev-only dependency here, which is worth knowing before
ranking the bump.
{:bandit, "~> 1.5"}carries noonly:, andconfig/config.exssetsadapter: Bandit.PhoenixAdapterat base config ratherthan in
dev.exs, so bandit is the HTTP adapter serving the dashboard endpointin every environment this example runs in.
bb_liveviewscopes its copyonly: :dev; this repo does not. The advisories sit in the serving path, notbeside it.
A local
mix deps.auditcannot confirm this: the vendoredmix_audit2.1.5ships no advisory files at all, so it reports "No vulnerabilities found" both
before and after the bump. CI's
mix deps.audit + hex.auditjob fetches acurrent database and is the real check — and it now actually runs, which it
could not do while the compile below was failing.
2. Pick up the released fixes:
bb_servo_robotis0.6.1,bb_liveview0.3.1Both carry the changes this example was waiting on:
bb_servo_robotis0.6.1 declaresc:BB.Actuator.capabilities/1as[:position_feedback], clearing the sixValidatePositionFeedbackwarningson
BB.Example.WX200.Robot(waist,shoulder,elbow,wrist_angle,wrist_rotate,left_finger). Those joints were always measured — theDynamixel controller reads
present_positionoff the bus every tick andpublishes it as
JointState— but nothing in the DSL said so, which isexactly what the verifier can't see. The fix had to live in the driver, since
capabilities/1is aBB.Actuatorcallback.bb_liveview0.3.1 drops its call toBB.Actuator.set_position!/3, whichbb 0.30 removed. That error was never in this repo — wx200 contains no
set_positioncall at all.Both were fatal under
--warnings-as-errors, and between them they gated everyjob in this repo's CI matrix behind
MIX_ENV=test mix compile.Lockfile only: the
~> 0.2requirements already admitted both versions.3.
Command.Home— don't answer:homedfor a move that was refusedHomediscarded the result ofBB.Motion.send_positions/3and answered:homedunconditionally, soBB.Command.await/1returned{:ok, :homed}whether the arm homed or nothing moved at all — against a disarmed robot
included.
send_positions/2publishes each command for observers and waits forthe actuator to accept it, so its return value carries the refusal;
Homenowpasses it through,
:okbecoming:homedand{:error, reason}going backas-is through the
result/1error clause the sibling commands here alreadyhave.
This is a behaviour change, not a port — the old
delivery: :directcall stillcompiles under bb 0.30 and does exactly what it always did. It's dropped on its
own merits: answering
:homedfor a move that didn't happen is the same classof bug beam-bots/bb#235 set out to fix, and 0.30 is what makes it visible,
because before there was no return value to check.
The trade-off is that
home()can now fail where it previously always"succeeded", and it waits for each actuator (bb's default
:timeoutis 5000ms).For this arm that's seven ETS writes on a bus the controller is already
ticking, so the wait is negligible.
No test. This repo's
test/carries only the Phoenix scaffolding — none ofthe commands are covered — so there's no fixture to extend without building a
robot harness first. Stating that rather than inventing one in a PR this size.
Why the
bbfloor moves to~> 0.30Only this commit needs it, and it needs it precisely because the fix is a
reliance on the new return value. Under 0.29
send_positions/3answered:okwhatever happened, so this code would compile clean and go straight back to
reporting
:homedfor a move that never occurred — the bug it exists to fix,silently reintroduced. An unchecked return fails quietly at runtime where a
removed function fails loudly at compile time, so the floor rules 0.29 out.
Released bb 0.30.0 specs it as
:ok | {:error, motion_error()}, which is whatHomenow matches on.Verification
mix check --no-retrywith everything resolving from hex — noBB_VERSION,no path deps, exactly what CI does — passes all ten stages: compiler, credo,
dialyzer, ex_unit, ex_doc, formatter, gettext, mix_audit, reuse, unused_deps.
Specifically confirmed rather than inferred from the green compile:
ValidatePositionFeedbackwarnings. Grepping the full check outputfor the warning text returns 0 matches, down from 36 occurrences across the
dev and test compiles.
set_position!references anywhere in the build output, down from 4.mix deps.unlock --check-unusedpasses, andmix.exsis untouched bycommits 1 and 2 — both are lockfile-only.
mix deps.updatewanted to draglocalize,nx,req,phoenixandphoenix_live_viewalong with the intended bumps; those were reverted and onlythe lines meant to change were re-applied. Each dependency commit is a
two-line-or-less lockfile diff.