feat(czdev): 禁止以 root 运行的 app(服务须 User=非 root) - #15
Merged
Conversation
Apps must not run as root. A third-party package's realistic root vector is a bundled systemd *system* service (dpkg runs it as root by default), so: - pack_deb.py now pins the generated service to a non-root user (User=/Group=, default `pi`, overridable via --service-user). Packages built by the toolkit are non-root out of the box. - czdev publish now scans the .deb and refuses to publish if any bundled systemd system .service would run as root (no User=, User=root/0, and no DynamicUser=yes). DynamicUser=yes and User=<non-root> pass. Mirrors the same gate added to the packages CI (process-web-submission and validate-pr), so web, czdev, and PR review all reject root apps. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
策略:app 默认不给 root,需要 root 一律拒绝。
与 packages CI(process-web-submission、validate-pr)新增的同款校验一致:网页端、czdev、PR 审核三处统一拦截。
Made with Cursor