Conversation
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 21a802d. Configure here.
| # socketsecurity==inputs.version from PyPI, and the Dockerfile reads the pinned | ||
| # @coana-tech/cli version out of the checked-out source, so building from the | ||
| # default branch would pair an old wheel with a newer build recipe and pin. | ||
| ref: v${{ inputs.version }} |
There was a problem hiding this comment.
Stable build ignores tag checkout
Medium Severity
The new tag checkout does not feed the image build. docker/build-push-action still uses the workflow Git context from the dispatch branch, so the Dockerfile and reachability.py come from that branch while CLI_VERSION installs the requested wheel. Rebuilding an older stable after main has moved recreates the pin mismatch.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 21a802d. Configure here.
The image installed @coana-tech/cli unpinned while the launcher asks npx for DEFAULT_COANA_CLI_VERSION. npx reuses the global install only when the versions match, so once the two diverged every scan re-downloaded the engine (~119 MB) and the launcher took roughly three times as long, silently. The Dockerfile now reads the pinned version out of reachability.py, so the image and the runtime cannot drift and the pin stays bumped in exactly one place. Splitting the coana install out of the toolchain RUN keeps a pin bump to a 353 MB layer rather than rebuilding the 2.3 GB combined layer. Marking a release stable now builds that version from its own tag, so an older wheel is no longer paired with the default branch's build recipe and pin.
21a802d to
17469c7
Compare


Problem
Dockerfileinstalls@coana-tech/cliunpinned, while the launcher asks npx for the version inDEFAULT_COANA_CLI_VERSION. npx reuses the image's global install only when the versions match; on a mismatch it downloads the engine again on every scan.Measured in the published image:
The two agree only when a release rebuild happens to follow a pin bump. Nothing enforces it, and the failure mode is silent — no error, no test failure, just slower scans and extra egress. The pin moved from
15.10.36to15.10.51while this PR was open, across fifteen bumps.Change
reachability.pyand installs exactly that, failing the build if the value cannot be read. The pin stays bumped in one place, so the image and the runtime cannot drift.RUN. A pin bump now rebuilds a 353 MB layer instead of the 2.3 GB combined layer — relevant given how often the pin moves.socketsecurity==inputs.versionfrom PyPI, so building from the default branch paired an old wheel with a newer build recipe and pin.tests/unit/test_dockerfile_coana_pin.pyruns the Dockerfile's own extraction expression against the real source and rejects an unpinned install.Dockerfileis listed in the Unit Testspushpaths since the suite now reads it.Verification
socketcli --helpandcoana-cliboth work. Re-verified after rebase against the current pin (15.10.51).Could not read DEFAULT_COANA_CLI_VERSION from reachability.pyrather than silently installing unpinned.ruff checkclean. The extraction expression was checked under both BSD and busyboxsed.No CI job builds this Dockerfile on a pull request, so the image verification above is local. e2e-reachability covers the launcher path only.
Not included
socketnpm is still installed unpinned and the npm cache is still shipped in the image. Both are tracked separately.Ref: CE-431
🤖 Generated with Claude Code