Skip to content

docs(audit): record Round 5 - non-root runner and secret-proof dockerignore - #75

Merged
JOY (JOY) merged 1 commit into
devfrom
docs/audit-round5-hi12
Sep 16, 2026
Merged

JOY (JOY) merged 1 commit into
devfrom
docs/audit-round5-hi12

Conversation

@JOY

Copy link
Copy Markdown

Records PR #74 (HI-12 remainder: USER node + .dockerignore secrets) as Round 5 in the audit report status table and the HI-12 finding note. Remaining HI-12 items are now only action SHA pinning (MD-28) and a turbo prune to drop dev deps from the image.

🤖 Generated by ZCode

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: df644580-54e1-47a1-9bed-8f49e48d307f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the audit report documentation to mark the runner stage security hardening (HI-12) as fixed in Round 5, detailing the transition to a non-root user and the addition of secret patterns to .dockerignore. Feedback on these changes suggests replacing slash separators with commas when listing the ignored file patterns in the text to prevent any confusion with nested directory paths.

<tr><td><span class="badge b-crit">ĐÃ FIX (Round 3)</span></td><td>HI-06, HI-11, HI-14 (phần hardening), HI-02/03, HI-21, HI-22, MD-10/11/12, MD-13/14/15, MD-01</td><td>Cron auth timing-safe fail-closed (7 routes); reminder re-check booking + cancel stale reminders; rate limit 6 auth mutations + HSTS/CSP headers; MCP tenant scoping + fromReschedule + conflict guard; SSRF self-hosted + opt-out; video token fail-closed; timing-safe webhook compares</td></tr>
<tr><td><span class="badge b-crit">ĐÃ FIX (Round 4 - verify lại 2026-09-16)</span></td><td>MD-03, MD-05/06, LO-02, LO-03, MD-29</td><td>MD-03: PBAC checkPermission giờ query membership thật, throw FORBIDDEN (aa68fd3acc). MD-05/06: partial expression index trên metadata dosOrgId/dosTeamId + WebhookScheduledTriggers drain take:100 + await + deleteMany sau dispatch (efb232e52f). LO-02: 3 barrels chết đã xoá (a058d89d53). LO-03: restore membership ADMIN/OWNER check (aa68fd3acc). MD-29: fork env vars vào turbo globalEnv (ccf9b85785)</td></tr>
<tr><td><span class="badge b-crit">ĐÃ FIX (Round 4 - 2026-09-16)</span></td><td>HI-09, CR-08 (hoàn tất), LO-13 (một phần)</td><td>HI-09: workflow mới <code>fork-ci.yml</code> (type-check + lint + unit test) chạy trên PR + push dev/main của DOS/Crove-Cal; <code>deploy-docker.yml</code> thêm job <code>ci-gate</code> (type-check) mà build-and-push phải chờ. CR-08: Dockerfile/docker-compose bỏ default secret từ Round trước; Round 4 thay 4 giá trị secret thật trong <code>apps/api/v2/.env.example</code> bằng placeholder. LO-13: JWT example trong README-PLATFORM.md thay bằng placeholder</td></tr>
<tr><td><span class="badge b-crit">ĐÃ FIX (Round 5 - 2026-09-16, PR #74)</span></td><td>HI-12 phần runner</td><td>Runner stage chạy <code>USER node</code> (app tree copy với <code>--chown=node:node</code>, không tạo layer copy-up) sau bước apt chạy root; <code>.dockerignore</code> chặn <code>.env*</code>/<code>*.pem</code>/<code>*.key</code>/<code>*.p12</code>/<code>*.pfx</code>/<code>.husky</code> - bảo vệ cả image web lẫn api/v2 (cùng context root). Verify: <code>docker build --check</code> sạch (4 warning là ARG build-time placeholder đã xử lý ở CR-08), image build + publish sau gate thành công trên dev (run 35127273831)</td></tr>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using / as a separator between file patterns (e.g., <code>.env*</code>/<code>*.pem</code>/...) can be confusing in a Docker/security context, as / is the standard directory separator in path patterns. A reader might misinterpret this as a nested path pattern like .env*/*.pem (which matches files inside a directory). Using commas as separators would be much clearer and prevent any ambiguity.

Suggested change
<tr><td><span class="badge b-crit">ĐÃ FIX (Round 5 - 2026-09-16, PR #74)</span></td><td>HI-12 phần runner</td><td>Runner stage chạy <code>USER node</code> (app tree copy với <code>--chown=node:node</code>, không tạo layer copy-up) sau bước apt chạy root; <code>.dockerignore</code> chặn <code>.env*</code>/<code>*.pem</code>/<code>*.key</code>/<code>*.p12</code>/<code>*.pfx</code>/<code>.husky</code> - bảo vệ cả image web lẫn api/v2 (cùng context root). Verify: <code>docker build --check</code> sạch (4 warning là ARG build-time placeholder đã xử lý ở CR-08), image build + publish sau gate thành công trên dev (run 35127273831)</td></tr>
<tr><td><span class="badge b-crit">ĐÃ FIX (Round 5 - 2026-09-16, PR #74)</span></td><td>HI-12 phần runner</td><td>Runner stage chạy <code>USER node</code> (app tree copy với <code>--chown=node:node</code>, không tạo layer copy-up) sau bước apt chạy root; <code>.dockerignore</code> chặn <code>.env*</code>, <code>*.pem</code>, <code>*.key</code>, <code>*.p12</code>, <code>*.pfx</code>, <code>.husky</code> - bảo vệ cả image web lẫn api/v2 (cùng context root). Verify: <code>docker build --check</code> sạch (4 warning là ARG build-time placeholder đã xử lý ở CR-08), image build + publish sau gate thành công trên dev (run 35127273831)</td></tr>

@JOY
JOY (JOY) merged commit f8c435d into dev Sep 16, 2026
11 checks passed
@JOY
JOY (JOY) deleted the docs/audit-round5-hi12 branch September 16, 2026 17:46
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.

1 participant