Skip to content

fix(slack-bot): harden release image - #1182

Merged
JAORMX merged 3 commits into
mainfrom
fix/issue-1085-slack-image
Oct 5, 2026
Merged

JAORMX merged 3 commits into
mainfrom
fix/issue-1085-slack-image

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build the published Slack bot image through hardened, digest-pinned Chainguard builder and runtime stages
  • ship only compiled output and production dependencies under a non-root, shellless runtime
  • add CI packaging, runtime-entrypoint, and hardening checks

Verification

  • task lint
  • task test
  • task docs
  • task site:build
  • task lint:actions
  • Docker image build and runtime checks

Fixes #1085

@JAORMX
JAORMX force-pushed the fix/issue-1085-slack-image branch from 6ddf748 to b607cab Compare September 8, 2026 20:14

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Panel review (Spec / Standards / Test-adequacy / Domain specialists) on PR #1182. Solid hardening work overall (multi-stage build, digest-pinned Chainguard base matching .ko.yaml convention, non-root, shell removed, no baked-in secrets) — one blocker on unmet issue scope, plus a few important/advisory findings below.

Comment thread .github/workflows/ci.yml Resolved
Comment thread sdk/typescript/.dockerignore Resolved
Comment thread .github/workflows/ci.yml Resolved
@JAORMX
JAORMX force-pushed the fix/issue-1085-slack-image branch from b607cab to 4c9ffc5 Compare September 9, 2026 04:55

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up panel review after the latest fix commit (919d3117e).

The blocker from the previous review is fixed correctly: the new CI step spawns a real offline mecated --mock daemon and runs the actual built/hardened image's MecatlBridge against it over gRPC, asserting a genuine response — closing the "never tested against the built image" gap, with an honest comment scoping out Socket Mode itself (which needs live Slack credentials, out of reach for CI). Verified no new issues from this addition:

  • The step lives in the slack-bot-example job on ubuntu-24.04 — a real Linux runner, so docker run --network host behaves as intended, not Docker Desktop's VM-isolated networking.
  • The trap ... EXIT is registered immediately after backgrounding the daemon, minimizing any leak window; the readiness poll loop is correctly bounded (10s) and fails fast via kill -0 if the daemon dies early.
  • The hardcoded mock-provider response string is a pre-existing coupling already shared by two other test files, not a new fragility introduced here.
  • No new security surface — --network host only affects this ephemeral CI job, and the mock daemon needs no credentials.

All three remaining advisories are also fixed correctly: Dependabot gained a docker ecosystem entry scoped to the right directory, .dockerignore now excludes **/.npmrc, and the builder FROM line dropped the moving latest-dev tag, keeping only the digest (matching .ko.yaml's convention).

Approving.

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the changes since my last approval — the streaming/cancel/stuck-auth-eviction work addressing the other review round looks correct and is well covered by new tests. The one failing check (Test (race root-a), internal/app) is a pre-existing flake on main unrelated to this change, not something introduced here. LGTM.

JAORMX and others added 2 commits October 5, 2026 10:00
Co-Authored-By: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
@JAORMX
JAORMX force-pushed the fix/issue-1085-slack-image branch from 5e45552 to 727ff49 Compare October 5, 2026 07:13
Preserve the Chainguard builder and runtime update channels with tagged digest pins. Exempt the published Dockerfile from example exclusions and group its base-image updates.

Co-authored-by: Mecatl <[email protected]>
@JAORMX
JAORMX merged commit 473c050 into main Oct 5, 2026
38 checks passed
@JAORMX
JAORMX deleted the fix/issue-1085-slack-image branch October 5, 2026 07:55
This was referenced Oct 7, 2026
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.

Switch the Slack bot's release image to a hardened base

2 participants