Skip to content

build: run backend/keycloak/powersync as non-root; update quinn-proto - #1197

Merged
ital0 merged 5 commits into
mainfrom
cursor/sec-nonroot-containers-quinn
Aug 10, 2026
Merged

build: run backend/keycloak/powersync as non-root; update quinn-proto#1197
ital0 merged 5 commits into
mainfrom
cursor/sec-nonroot-containers-quinn

Conversation

@ital0

@ital0 ital0 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes code-scanning alerts #10, #12, #13, #14 (dockerfile.security.missing-user*) and Dependabot alert #34 (GHSA-4w2j-m93h-cj5j, high).

Non-root containers

  • backend.Dockerfile — adds USER bun before the entrypoint. This is the only image that actually ran as root; the oven/bun base ships a bun user (uid 1000), the app only reads root-owned world-readable files, and port 8000 needs no privileges. Verified: image builds and id inside reports uid=1000(bun).
  • keycloak.Dockerfile / powersync.Dockerfile — the base images already end with USER 1000 (Keycloak) and USER 901 (PowerSync), so these containers were never root; Semgrep just can't see inherited USER directives. Explicit USER lines (with comments) make that visible to scanners and readers. Verified via image config inspection.

quinn-proto 0.11.14 → 0.11.15

Patch-level cargo update -p quinn-proto in src-tauri fixing GHSA-4w2j-m93h-cj5j (remote memory exhaustion via unbounded out-of-order stream reassembly; transitive dep via reqwest → quinn). Lockfile diff touches only the quinn-proto entry.

ital0 added 2 commits August 5, 2026 17:17
Address GHSA-4w2j-m93h-cj5j, a remote memory exhaustion issue caused by unbounded out-of-order stream reassembly.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Semgrep Security Scan

No security issues found.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Metrics

Metric Value
Lines changed (prod code) +16 / -8
JS bundle size (gzipped) 🟢 591.4 KB → 591.2 KB (-187 B, -0.0%)
Test coverage 🟢 81.38% → 81.37% (+-0.0%)
Performance (preview) Preview not ready — Render deploy may have timed out
Accessibility
Best Practices
SEO

Updated Mon, 10 Aug 2026 19:26:18 GMT · run #2646

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Preview environment destroyed 🧹

Stack preview-pr-1197 and its Cloudflare subdomain have been cleaned up.

@ital0 ital0 closed this Aug 10, 2026
@ital0
ital0 force-pushed the cursor/sec-nonroot-containers-quinn branch from 9e62bb1 to a025d2c Compare August 10, 2026 16:37
@ital0 ital0 reopened this Aug 10, 2026
@ital0
ital0 marked this pull request as ready for review August 10, 2026 18:47
@ital0 ital0 self-assigned this Aug 10, 2026

@github-actions github-actions 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.

🔭 thunder-deep-review (advisory)

Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: 64ea00059193 · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

Comment thread deploy/docker/backend.Dockerfile Outdated
- Numeric UID 1000 (bun) is verifiable by k8s runAsNonRoot and image scanners

@github-actions github-actions 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.

🔭 thunder-deep-review (advisory)

Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: ba67de149d71 · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

Comment thread deploy/docker/backend.Dockerfile Outdated

@github-actions github-actions 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.

🔭 thunder-deep-review (advisory)

Reviewed the diff — no issues to report. ✅ Never approves, never requests changes, never gates merge.
head: 9e859e2952e7 · mode: single · deferred 0 item(s) already reported by other bots (best-effort dedup)

@ital0
ital0 merged commit 56ea04b into main Aug 10, 2026
37 of 38 checks passed
@ital0
ital0 deleted the cursor/sec-nonroot-containers-quinn branch August 10, 2026 19:32
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