chore: bump Python base image, slack_bolt, pytz, and lint tooling - #10
Open
yousefdebaz-fivexlio wants to merge 1 commit into
Open
chore: bump Python base image, slack_bolt, pytz, and lint tooling#10yousefdebaz-fivexlio wants to merge 1 commit into
yousefdebaz-fivexlio wants to merge 1 commit into
Conversation
Python 3.8 reached upstream end-of-life 2024-10-07 (no more security patches). Bumps: - Dockerfile: python:3.8-alpine -> python:3.12-alpine - requirements.txt: slack_bolt 1.9.0 -> 1.30.0 (4+ years behind; includes a security fix requiring signatures for ssl_check request verification), pytz 2021.1 -> 2026.2 (5-year-stale tz database used by helpers_time.generate_time_based_message) - lint.sh: flake8 4.0.1 -> 7.1.1, pylint 2.12.2 -> 3.3.1 (the old pins fail outright on modern Python: flake8 4.0.1 crashes on the current importlib.metadata API, pylint 2.12.2s wrapt dependency fails to build) Verified: py_compile clean on all modules; flake8 7.1.1 and pylint 3.3.1 install and run cleanly against a current Python interpreter (the old pins could not). Runtime import of slack_bolt/pytz at the new pinned versions against this repos Bolt API usage (App, SocketModeHandler, app.action, users_lookupByEmail) was not exercised in this environment - the Bolt API surface used here has been stable across this version range, but this should be confirmed by CI/a real run before merge.
Contributor
Author
|
Verified the one gap flagged in the PR description: installed the pinned |
AI Code Review Summary
This summary was automatically generated by the AI code review workflow. |
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.
Problem
python:3.8-alpinein the Dockerfile is on a Python version that reached upstream end-of-life on 2024-10-07 - it no longer receives security patches from CPython, ever.requirements.txtpinsslack_bolt==1.9.0(4+ years behind current, misses a real security fix requiring signatures for ssl_check request verification) andpytz==2021.1(5-year-stale IANA timezone database).lint.shpinsflake8==4.0.1/pylint==2.12.2, which fail outright on any current Python: flake8 4.0.1 crashes on the modernimportlib.metadataAPI, and pylint 2.12.2'swraptdependency fails to build.Why it matters
An EOL Python base image is an unpatched attack surface with no upstream fix path. The stale
slack_boltmisses an actual security-relevant fix. The stalepytzcan produce wrong UTC offsets for any timezone whose rules changed since 2021, which directly affectshelpers_time.generate_time_based_message's promotion-window logic. The broken lint pins meanlint.shcannot run at all once the CI/dev environment's Python moves forward - it currently only "works" because CI still runs the old 3.8 image.Fix (symptoms -> root cause -> change)
Symptom: stale, EOL, and partially-broken toolchain. Root cause: pins were never revisited since initial setup. Change: bump each pin to a current, compatible version, keeping the base Python and lint tooling in sync so
lint.shkeeps working after the Dockerfile bump:Dockerfile:python:3.8-alpine->python:3.12-alpinerequirements.txt:slack_bolt1.9.0->1.30.0,pytz2021.1->2026.2lint.sh:flake84.0.1->7.1.1,pylint2.12.2->3.3.1No application code changed.
Tests
No automated tests exist for this repo beyond
lint.sh(seetest.sh, which appears to be a manual/local harness requiring live Slack credentials).Manual verification
python3 -m py_compileclean on all.pymodules.flake8==7.1.1andpylint==3.3.1(the new pins) installed and ran cleanly against a current Python interpreter and this repo's code (0 findings from flake8 respectingsetup.cfg'smax-line-length=110; pylint's only output was import-resolution noise from not havingslack_bolt/pytzinstalled in that lint-only venv, not a real finding). The old pins (flake8==4.0.1,pylint==2.12.2) could not even run against a current Python in the same test - confirming the bump is necessary, not just cosmetic.slack_bolt==1.30.0install against this repo's actual Bolt usage (App,SocketModeHandler(app, token).connect()/.close(),@app.action,app.client.chat_postMessage/chat_delete/chat_postEphemeral/users_lookupByEmail,SlackApiError) - that surface has been stable across this version range per the Bolt-Python changelog, but this should be confirmed by CI or a real Slack run before merge, since no Slack credentials were available in this environment.Notes
slack_bolt's Python 3.7+ floor.dumb-init==1.2.5in the Dockerfile was left as-is - it's a stable, rarely-updated process supervisor and nothing found suggests a newer version fixes anything relevant here.