fix(ci): harden core tool watch issue reconciliation - #104
Open
lelia wants to merge 5 commits into
Open
Conversation
Contributor
Author
|
bugbot run |
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3b9f342. Configure here.
David Larsen (dc-larsen)
approved these changes
Aug 10, 2026
David Larsen (dc-larsen)
left a comment
Contributor
There was a problem hiding this comment.
Approving. Traced the mode flip and the reconciliation branches:
--fail-on-malwareonly trips on pinned coordinates (check_core_tools.py:615-618), so routing push-to-main to watch mode keeps the same failure surface as build mode and adds reconciliation on top. No new blocking on an upstream release we haven't adopted.- The guard on empty report / non-boolean outputs covers the
always()path where the scan dies before writing$GITHUB_OUTPUT. Outputs are written before the fail-on-malware exit, so a malware-detecting run still reconciles. discovery_completegating is right: a_ghcr_latestmiss yields drift=false + discovery_complete=false, which lands in the refresh-body-leave-state branch rather than closing.- Drift compares
_strip_von both sides, so a v-prefixed GHCR tag winning themax()tie-break can't produce phantom drift. - Dropping
2>/dev/null || truefrom the issue lookup is the right call underbash -e: an API hiccup now fails the step instead of silently creating a duplicate issue.
One note, not blocking: build mode short-circuits discovery_complete to true, so the local build-mode validation didn't exercise the new GHCR versions API path. First scheduled watch is the real test of whether socket-basics' GITHUB_TOKEN can read the private SocketDev/trivy package. It fails safe if not.
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.
What changed
mainpushes, while keeping pull requests in build-guard mode.core-tool-driftissue: update/reopen it when drift exists, refresh and close it when drift is resolved, and avoid resolving it when release discovery is incomplete.ghcr.io/socketdev/trivypackage produced bySocketDev/trivy-dist, withpackages: read, instead of Aqua's release feed.socket-sdk-python) and add rows for Socket Python CLI (socket-python-cli) and Socket npm CLI (socket-cli).socketCLI in every image and pinsocketsecurityinapp_tests; also watchDockerfile.heavy.publish-dockerworkflow'screate-releasejob. Image publishing now ends after manifest verification, leaving GitHub release authoring intentionally manual..github/release.ymlto describe its remaining role in the manual release-note UI.Root cause
The post-release run was triggered by a push, which selected
mode=build. That mode intentionally skipped latest-version discovery, and the issue step only ran for watch-mode reports with active drift. The job therefore generated and uploaded a fresh report but never reconciled issue #93, leaving its pre-merge pins in place.Impact
After this lands, a relevant merge to
mainimmediately refreshes issue #93. If every tracked tool is current, the workflow updates the body and closes the issue; later drift reuses and reopens the same issue rather than creating duplicates. Transient feed failures are called out in the report and cannot falsely resolve drift.The Docker publish workflow no longer starts a runner for an automatic GitHub release step that is expected to no-op. Maintainers remain responsible for authoring each release and may still use GitHub's generated notes manually.
Operational rationale and recovery procedures no longer live alongside the public workflow implementation. The watcher also passes its selected mode through the step environment instead of expanding the output directly in the shell command.
Validation
uv run --no-sync pytest -q— 223 passedactionlint .github/workflows/core-tool-watch.ymlactionlint .github/workflows/publish-docker.ymlzizmor .github/workflows/core-tool-watch.yml .github/workflows/publish-docker.yml— no findingsgit diff --checkdiscovery_complete=trueNote
Medium Risk
Changes CI supply-chain gates, GHCR release discovery, and Docker image tool pins; incorrect reconciliation or discovery logic could miss drift or close issues prematurely, though incomplete discovery is explicitly guarded.
Overview
Fixes core-tool-watch so merges to
mainrun watch mode (not build-only), which lets post-merge runs refresh and reconcile the canonicalcore-tool-driftissue instead of leaving stale bodies open.Issue reconciliation now updates/reopens when drift exists, closes when pins are current, and refuses to close when
discovery_completeis false; it reuses one labeled issue (open first, then closed fallback).check_core_tools.pyexpands coverage toDockerfile.heavy, pins Socket npm and Python CLIs, tracks Trivy viaTRIVY_IMAGEwith latest from GHCRSocketDev/trivy, and emitsdiscovery_completefor the workflow.Dockerfiles pin
socket@${SOCKET_NPM_CLI_VERSION}everywhere and split heavy Python CLI asSOCKET_PYTHON_CLI_VERSION.publish-dockerdrops automaticcreate-release;.github/release.ymlis documented for manual release notes only.Reviewed by Cursor Bugbot for commit 3b9f342. Configure here.