fix(system): resolve R01-R18 review findings across security, data, lifecycle and UX - #52
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ifecycle and UX - auth: internal AuthMode fail-closed on every adapter; verify actual payload digest; S3 streaming/unsigned markers get narrow policies with trailer validation; redact signatures - http: BudgetedBody frame/byte/idle/total budgets; per-request S3 5GiB streaming vs 16MiB control; CF/APIGW proxies disable redirects and environment proxy; remove unsafe projection - lambda: validated identifiers/ARNs, immutable staged artifacts, immutable published revisions, warm fingerprint, global/per-function admission, bounded Event set, Event 1MiB, native child kill-on-drop with reaping; Disabled/Docker explicit errors - ddb/sqs/events/sns: serialized prepare/commit isolation, 10-min idempotency tokens, recoverable DLQ manager/actor handoff, structured FIFO dedup keys, full SqsParameters, supervised bounded delivery with explicit unavailable/unsupported - runtime: validated YAML+env settings (RUSTACK_CONFIG), fail-closed credentials/services, loopback default bind, gateway admission surviving response bodies, health-only reserved connections, SIGINT/TERM quiesce->snapshot->stop with shared deadline, snapshot exclusive lease + previous-generation crash recovery + fsync publish, structured bounded probe, capabilities registry; explicit Runtime shutdown_timeout(0) - docs/ops: README/Makefile/Dockerfile/docs runtime-hardening guide; dep updates quick-xml 0.41, h2 0.4.19, quinn-proto, anyhow 1.0.104
tyrchen
force-pushed
the
fix/system-review-r01-r18
branch
from
September 7, 2026 21:26
52071f9 to
2e5d904
Compare
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.
解决系统审查 R01–R18:安全、数据正确性、生命周期与开发者体验
对照
specs/rustack-system-review.md的 18 项审查发现,在本分支完成全部修复;原审查段落保留为历史,逐项实现/验证/已知边界记录见specs/rustack-system-hardening-impl-plan.md§8。安全边界
AuthModefail-closed(严格验签缺凭据即拒绝);普通 SigV4 校验实际收到字节的摘要而非请求声明;S3 的UNSIGNED-PAYLOAD与流式签名走独立受限策略并验证 chunk/trailer 链;重复/畸形哈希头拒绝;日志与错误不出现签名材料。BudgetedBody帧级字节/总时长/空闲预算;控制面 16 MiB vs S3 对象 5 GiB 流式;网关连接+在飞信号量,许可持有到响应体结束;健康/诊断保留通道不占业务许可。数据正确性
SqsParameters,unsupported 参数/目标显式拒绝(不再静默丢弃);SNS/Events 明确 unavailable/unsupported;有界、受监督、panic 隔离的投递与统计(API 接受 ≠ 投递成功)。生命周期
.previous代际崩溃恢复,失败不再静默以空启动。配置与体验
RUSTACK_CONFIGYAML + 环境 + 默认三层校验(未知键/坏值/别名冲突/未知服务/严格认证缺凭据均启动失败);裸进程默认监听127.0.0.1,容器显式0.0.0.0;bind 与 advertised endpoint 分离。/_health/{live,ready}、/_localstack/health、/_rustack/capabilities;探针走真实 HTTP 状态 + 有界 JSON 解析(≤64 KiB/3 s),不再字符串子串匹配。-p rustack→-p rustack-cli --bin rustack与 README 示例;能力/持久化声明降级为诚实表述;新增docs/runtime-hardening.md操作与能力指南;依赖升级 quick-xml 0.41/h2/quinn-proto/anyhow 修复审计通告。兼容与迁移影响
0.0.0.0:4566改为回环;需要全网监听请设GATEWAY_LISTEN=0.0.0.0:4566(容器已内置该值)。LAMBDA_EXECUTOR=native(可信主机执行,非沙箱)。rust-toolchain.toml的本地改动未纳入本 PR(按用户要求保留删除);提交内固定工具链沿用基线。验证
cargo +1.98.1 check --workspace --all-targets --all-features通过。cargo +1.98.1 test --workspace --all-features --exclude rustack-integration:119 组 1683 项全部通过(含真实原生 Lambda A/B/warm/Event 收割与 S3 17 MiB 流式等回归)。cargo +nightly fmt --check通过;strict clippy 通过(显式允许基线已存在的unused-async-trait-impl/result_large_err两存量类别,不在本次领域改动范围)。cargo auditexit 0(仅 dev/test 的 aws-sdk-s3 → lru 0.16.4 警告,修复需 sdk ≥1.145 超出本仓库保留工具链);cargo denyok。已知边界(如实公开)
rustack-integration(需要运行中 server 的 aws-sdk 套件)按仓库约定不纳入默认 workspace 测试;用真实进程冒烟覆盖代表性路径。+1.98.1验证;不修改/不恢复本地工具链删除。独立审查与已知边界(更新)
budgets.lambdaInvokeSeconds;健康 JSON 为 disabled/disabled-executor 显式状态且探针接受 disabled;RUST_LOG 走配置 facade;快照 load 校验快照名并清理中断残留;S3 严格模式在落盘前快速拒绝缺失/未知凭据(回归断言零字节读取);APIGW 遗留记录无 timeout 时强制总 wall-clock 截止;停机 deadline 用尽改为显式报错说明(kill_on_drop 兜底收割子进程)。