Skip to content

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

Open
JAORMX wants to merge 3 commits into
mainfrom
fix/issue-1085-slack-image
Open

fix(slack-bot): harden release image#1182
JAORMX wants to merge 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
Comment thread sdk/typescript/examples/slack-bot/docker/bot.Dockerfile Outdated
Comment thread sdk/typescript/examples/slack-bot/docker/bot.Dockerfile
Comment thread sdk/typescript/.dockerignore
Comment thread .github/workflows/ci.yml
Co-Authored-By: Mecatl <mecatl@stacklok.com>
@JAORMX
JAORMX force-pushed the fix/issue-1085-slack-image branch from b607cab to 4c9ffc5 Compare September 9, 2026 04:55
Co-Authored-By: Mecatl <mecatl@stacklok.com>

@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.

Co-Authored-By: mecatl <noreply@stacklok.com>

@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.

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