fix(docker): tolerate malformed entrypoint port env#7560
Open
yyswhsccc wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@Scottcjn Please take a look when you have a chance. This is a small Docker startup hardening fix: malformed Validation:
|
jaxint
reviewed
Jun 23, 2026
jaxint
left a comment
Contributor
There was a problem hiding this comment.
✅ Code reviewed - implementation verified.
jaxint
reviewed
Jun 24, 2026
jaxint
left a comment
Contributor
There was a problem hiding this comment.
✅ Code reviewed - implementation verified. Good work on the changes.
Contributor
|
This PR looks good! Appreciate the contribution. Reviewed for Bounty #71 |
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
docker-entrypoint.pyparsedPORTdirectly in the container startup path. A malformed deployment env value raisesValueErrorbefore the Docker entrypoint can start the RustChain dashboard/health endpoint.Impact
A single bad
PORTvalue can crash the Docker container at startup, making the dashboard and/healthendpoint unavailable until the environment is corrected.Fix
Add a small local
_safe_int_envhelper and use it for the entrypoint port. Valid numeric values are preserved, while malformed values fall back to the existing8099default.Tests
uv run --no-project --with pytest --with flask python -B -m pytest -q tests/test_docker_entrypoint_env.py-> 3 passedpython3 -m py_compile docker-entrypoint.py tests/test_docker_entrypoint_env.py-> passedgit diff --check-> passedBoundaries
Related to the general bug bounty surface (#305). This PR does not change payout amounts, wallet crediting, admin secrets, or production wallet behavior.
wallet: RTC47bc28896a1a4bf240d1fd780f4559b242bcd945