Commit 142f77d
authored
fix(security): resolve dependency vulns and fix container exec tenant isolation (#54)
* fix(security): resolve dependency vulns and fix container exec tenant isolation
Dependency updates:
- Bump tar 0.4 → 0.4.45 (RUSTSEC-2026-0067, RUSTSEC-2026-0068: symlink follow + PAX header)
- Update aws-lc-rs → 1.16.2 / aws-lc-sys → 0.39.1 (RUSTSEC-2026-0044: X.509 bypass)
- Update rustls-webpki → 0.103.10 (RUSTSEC-2026-0049: CRL matching)
- Update rkyv → 0.7.46 (RUSTSEC-2026-0001: undefined behavior on OOM)
- Update rustls → 0.23.37
Code fixes:
- container_exec: validate container belongs to project/environment before exec,
preventing cross-tenant container access (HIGH severity)
- FilesystemStorage: add path traversal protection to resolve_path(),
rejecting keys with ".." components (MEDIUM severity)
Remaining unfixable vulns documented in Cargo.toml comments.
* docs(changelog): add security fixes to unreleased section
* fix(email): make RequestMetadata optional in tracking handlers
The track_open and track_click handlers are public routes (no auth)
mounted via configure_public_routes(), which doesn't have the
middleware that injects RequestMetadata. This caused a 500 error:
"Missing request extension: RequestMetadata was not found".
Fix: accept RequestMetadata as Option<Extension<RequestMetadata>>
and fall back to extracting IP/UA from headers directly.
* feat(email): store tracked HTML separately from original
Add tracked_html_body column to emails table to store the final HTML
sent to the provider (with tracking pixel + rewritten links), separate
from the original html_body. This lets the dashboard show the tracked
version without triggering a fake open event from the preview pixel.
- Migration: add nullable tracked_html_body text column
- Entity: add tracked_html_body field
- EmailService: store tracked_html in new column during send
- API: expose tracked_html_body in email list/detail responses
* fix(email): add missing link_url and link_index columns to email_events
The email_events table may have been created before link_url and
link_index columns were added to the CREATE TABLE statement. This
migration adds them with IF NOT EXISTS to fix tracking failures:
"column link_url does not exist".
* feat(email): show per-link click breakdown in email detail UI
Add a "Link Clicks" section to the tracking card that fetches
/emails/{id}/tracking/links and shows each tracked link with its
click count badge. Links with clicks get a default badge, unclicked
links get a secondary badge.
* docs(changelog): add email tracking fixes and features to unreleased
* fix(email): use external_url from config for tracking URLs
The tracking service was using a hardcoded TEMPS_BASE_URL env var
(defaulting to localhost:3000), which meant tracking pixels and click
links in emails pointed to localhost — unreachable from Gmail's image
proxy or any external email client.
Now uses ConfigService.get_external_url_or_default() to dynamically
resolve the external URL from the database settings, matching how
other subsystems (error tracking, deployments) already work.1 parent 4983a00 commit 142f77d
File tree
21 files changed
+460
-175
lines changed- crates
- temps-deployments/src/handlers
- temps-email
- src
- handlers
- services
- temps-entities/src
- temps-git
- temps-log-aggregator/src/storage
- temps-migrations/src/migration
- temps-plugin-sdk
- web/src/pages
21 files changed
+460
-175
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
15 | 26 | | |
16 | 27 | | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
321 | 330 | | |
322 | 331 | | |
323 | 332 | | |
0 commit comments