chore: implement non-root execution for Docker - #1214
Merged
Conversation
🤖 自动审查报告
📁 修改的文件
|
ZhuLinsen
reviewed
May 6, 2026
ZhuLinsen
left a comment
Owner
There was a problem hiding this comment.
评审结论
- 必要性:通过 + Docker 容器非 root 运行符合安全加固目标,且改动范围集中在镜像运行用户与部署说明。
- 是否有对应 issue:有,Refs #1157。
- PR 类型:chore + docs,运行时镜像用户切换属于部署/安全维护改动,并同步更新了部署文档与 changelog。
- description 完整性:完整 + 已说明背景、改动范围、验证命令与结果、兼容风险和 rollback。
- 是否可直接合入:可 + CI 已通过;
mergeable_state=blocked按当前规则更像分支保护/权限状态,不构成本次代码审查阻断。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
ZhuLinsen
reviewed
May 6, 2026
ZhuLinsen
left a comment
Owner
There was a problem hiding this comment.
评审结论
- 必要性:通过 + Docker 镜像改为非 root 运行符合安全加固目标,且改动范围集中在镜像与部署说明。
- 是否有对应 issue:有,Refs #1157。
- PR 类型:chore + docs,属于部署安全维护改动,并同步更新了部署文档与
docs/CHANGELOG.md。 - description 完整性:完整 + 已说明背景、范围、验证命令、兼容风险和回滚方式。
- 是否可直接合入:可 + 当前 CI 成功,
mergeable_state=blocked更像分支保护/权限状态;未发现需要阻断合入的代码或文档风险。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
massif-01
reviewed
May 6, 2026
massif-01
left a comment
Collaborator
There was a problem hiding this comment.
@ZhuLinsen ready to merge
ZhuLinsen
reviewed
May 6, 2026
ZhuLinsen
left a comment
Owner
There was a problem hiding this comment.
跟进结论
- 结论:接受,当前补充的 “ready to merge” 判断成立;本地最新 diff 与 CI 结果未显示新的代码或文档阻断风险。
- 是否仍有阻断:无,CI 已全部通过,
mergeable_state=blocked更符合分支保护/权限状态,不应单独视为代码审查阻断。
说明
docker/Dockerfile:已创建dsa用户并在USER dsa前对/app、data、logs、reports完成授权,非 root 执行路径与 PR 描述一致。docs/DEPLOY.md:已补充宿主机挂载目录遇到Permission denied时的chown 1000:1000处理方式,覆盖主要兼容风险。docs/CHANGELOG.md:新增条目位于[Unreleased]扁平列表中,格式符合仓库规则。- 当前 CI 摘要显示
ai-governance、backend-gate、docker-build均为 success,且web-gate因无前端改动跳过,验证证据足够支撑合入。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
cwjyu
pushed a commit
to cwjyu/daily_stock_analysis
that referenced
this pull request
May 10, 2026
zbl-96
pushed a commit
to zbl-96/daily_stock_analysis
that referenced
this pull request
May 10, 2026
11 tasks
This was referenced Jun 22, 2026
EchoingFootsteps
pushed a commit
to EchoingFootsteps/daily_stock_analysis
that referenced
this pull request
Jul 4, 2026
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.
PR Type
Background And Problem
Docker containers running as root pose a security risk. Implementing a non-root user adheres to security best practices and reduces the potential attack surface.
Scope Of Change
docker/Dockerfileto add adsauser (UID 1000)./appdirectory and subdirectories (data,logs,reports).USERinstruction.docs/DEPLOY.mdwith instructions for handling host directory permissions.[Unreleased]entry todocs/CHANGELOG.md.Issue Link
Refs #1157 (Follow-up focused PR as requested by maintainer).
Verification Commands And Results
Verified that the
Dockerfilebuilds successfully and thedsauser is correctly identified at runtime.docker build -f docker/Dockerfile -t dsa-test . docker run --rm dsa-test idKey output & conclusion:
uid=1000(dsa) gid=1000(dsa) groups=1000(dsa)Compatibility And Risk
Minimal risk. Existing volume mounts might require a
chownon the host side if they were previously created by root, which is addressed in the updatedDEPLOY.md.Rollback Plan
Revert this PR to return to root-based execution.
Checklist
docs/CHANGELOG.md/ Relevant docs anddocs/CHANGELOG.mdare updated