| event_payload |
{"ref":"refs/heads/main","befo {"ref":"refs/heads/main","before":"c190a6ab5d2c50e4c90f027bbcca72f1f3050005","after":"e8fda74e279a5884440d5efaac2265e513c814b6","compare_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/compare/c190a6ab5d2c50e4c90f027bbcca72f1f3050005...e8fda74e279a5884440d5efaac2265e513c814b6","commits":[{"id":"e8fda74e279a5884440d5efaac2265e513c814b6","message":"chore(reports): 入口门禁与工作台两份快照回绑 @ a9abcbe\n\n在 a9abcbe 的干净 detached 检出里重跑(governance/rebind-reports.mjs --gates caddy,workbench-snapshots,\n带 CHECK_CADDY_DOCKER=1),三份均 provenance.gitSha=a9abcbe / worktreeDirty=false。\n\n- reports/caddy.latest.json:0 违规。12 个 HTTP 契约前缀 × 2 profile 全覆盖;新增的 routing 段逐条记下\n 模拟出来的块链,13 条登记前缀(11 个去重契约前缀 + 2 个长连接前缀)全部到达 {$PLATFORM_API_UPSTREAM};\n workbenchGuard.reached=true / conditionalBefore=0;语法校验 dev / staging 均 passed,via docker,\n 镜像 caddy@sha256:5f5c8640…d58648(compose 锁定的那一个,不再是浮动 tag)。\n- reports/workbench-catalog-snapshot.latest.json:只有 provenance 变。caddy-routes.json 进了它的作用域\n (新增 validate / mount 段),被 check:evidence 判过期,但快照只吃 routes.contracts,内容逐字未变——\n 重建后与旧版按字段比对一致,已实测。\n- reports/workbench-ops-snapshot.latest.json:与 catalog 同一脚本产出,必须一起带回(分开会绑不同提交)。\n 它有一处内容变化不由本轮改动引起:image 段从 d8f09205 / sha256:fe418667… 更新到 05e3826e /\n sha256:c0869934…,来源是 06c3d4c 已提交的 reports/image-digest.json——此前那份快照相对该提交是旧的。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/commit/e8fda74e279a5884440d5efaac2265e513c814b6","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-09-18T07:46:25-07:00","added":[],"removed":[],"modified":["reports/caddy.latest.json","reports/workbench-catalog-snapshot.latest.json","reports/workbench-ops-snapshot.latest.json"]},{"id":"a9abcbe392de8a903512ab4b25529a6e277113ee","message":"feat(gateway): 入口门禁改为解析块树后模拟路由——「文件里配了」不等于「这条路径上生效」\n\nC08 应用群网关是采纳形态,判定在 Caddyfile 这份配置里,由 check-caddy 守。它此前是逐行正则:\n某条指令在文件里出现过就算配了。本轮不动入口运行行为(两份 Caddyfile 一个字没改),只把它\n自己在注释里写明判不了的那一类失效变成静态判定。\n\n逐行正则判不出来的三件事:\n- 有个更靠前的 handle 块把 /api/platform/* 截走——入口鉴权配得好好的,请求根本走不到它。\n caddy-routes.json 的 workbench.note 原文是「这种绕过只能靠运行态探针发现」。\n- 请求体上限 / 上游超时 / request-id 注入写在别的块里,门禁全绿,平台路由上一层保护都没有。\n BODY_LIMIT_MISSING 这类规则问的是「文件里有没有」,不是「这条路由上有没有」。\n- 契约前缀有匹配器、但请求先被别人服务了:ROUTE_UNCOVERED 绿,流量到不了 API。\n\n新增块树解析(tokenizeLine / parseCaddyfile:`{` 只有作为行末独立 token 才开块,占位符\n{$VAR} 与 {http.request.uuid} 是 token 内部的花括号)与路由模拟(按 Caddy 的 handle 互斥语义\n与指令序,逐层并入命名匹配器),据此新增:\n- ROUTE_SHADOWED 前缀有匹配器但被更靠前的 handler 截走,到不了 {$PLATFORM_API_UPSTREAM}\n- WORKBENCH_AUTH_BYPASS 被守护前缀在到达 forward_auth 所在块之前就被别的 handler 服务了;\n 更靠前的 handler 若条件不是纯路径(header / method / file),按「可能截走」同样判红\n- INGRESS_GUARD_OUT_OF_SCOPE 入口约定在文件里有,却不在服务该前缀的那条块链上\n- STREAMING_ROUTE_UNCOVERED 登记的长连接前缀没被路由到上游(与「禁 read_timeout」凑成一对)\n- CADDYFILE_UNPARSED 花括号不配平 / 没有站点块——判不了就报,不静默通过\n\n同轮补三条登记面的:\n- PROFILE_MOUNT_UNBOUND profile 的 Caddyfile 没被登记的 compose 挂进入口容器。staging 那份此前\n 只被校验、没人核对它有没有被 overlay 加载;校验一份没人加载的配置等于没校验。\n- CADDY_IMAGE_UNPINNED compose 的入口镜像不是 digest 锁定。docker 校验原先写死浮动 tag\n caddy:2-alpine,而跑的是锁定镜像——拿另一个版本的 Caddy 校验,过了也\n 不代表运行的那个认它。现在从 compose 取镜像,取不到即 skipped,不退回浮动 tag。\n- ROUTE_MAPPING_ORPHANED 登记表映射了 modules.json 里已不存在的契约(CONTRACT_UNMAPPED 的反向死登记)\n\nstripComments 按 Caddy 口径重写:引号内的 # 是字面量,# 只有在 token 开头才起注释——原先一刀切到\n第一个 #,会把 respond \"a#b\" 这类值截半,反过来让门禁看不见后面真实生效的指令。\nevidence-scopes 的 caddy 作用域补进 stack/compose.yaml 与 stack/overlays/staging.yaml:结论现在\n也取决于「挂没挂进容器」和「校验用的是不是那个镜像」,这两个输入一改结论就可能不再成立。\n\n核验(工作树 dirty,报告未回绑,只绑本地):\n- CHECK_CADDY_DOCKER=1 check:caddy exit 0:12 个 HTTP 契约前缀 × 2 profile 全覆盖;模拟路由 13 条\n 前缀(11 个去重契约前缀 + 2 个长连接前缀)全部到达上游且入口约定就在各自链上;\n workbenchGuard.reached=true;两份 Caddyfile 语法均 passed,镜像 caddy@sha256:5f5c8640…d58648\n (= compose 锁定、dev 常驻容器正在跑的那一个)。\n- check-caddy.test.mjs 19 → 37 例,每条新规则都有篡改夹具且夹具断言「确实改到了」。两例专门对照\n 旧规则:插入抢先的 handle 后 evaluateCaddyfile / evaluateWorkbench 仍全绿,新规则判红。\n- 与真实 Caddy 对照(同一 digest 镜像,两个一次性容器,上游指向死端口):真实基线\n GET /api/platform/probe → 502(forward_auth 去校验,没放行);插入抢先 handle 的那份 → 200\n 「bypassed」,门禁判红。同一份里 /api/v1/decisions 仍 502,截走范围与模拟一致。\n- 一处自测抓到的实现缺陷:scopeNodes 顶层那一跳没挡 handler 分支,\"别的块里配了也算数\"——\n 正是要判的那种失效;已修并由「请求体上限挪到别的块」一例钉住。另一例钉住命名匹配器声明在\n 里层块时必须判得动(撤掉修复即落在 reverse_proxy 而非 respond,实测过)。\n- 回归:governance 全套 340/340;工作区一致性门禁只余既有 L9 compose 重名 1 条,与本轮无关。\n\n未做:G-3 限流要 caddy-ratelimit 插件即自建镜像,会打破 digest 锁定的官方镜像,是 stack 决策;\nHTTP 方法白名单归属 2026-09-16 已裁为不阻塞退役、转 stack 待办;C08.04 East-West 身份、C08.05\nWebhook ingress 与 Egress SSRF、C08.06 外发 / WAF / HA 全无落点(Q03)。静态判定的边界据实登记:\n非路径条件只能判「可能」,route 只作近似,每个前缀只探一条代表路径(/t/\u003ctenant\u003e/login 这类\n「有意分流一部分」不在判定范围),入口鉴权仍挡不住文档导航——运行态探针仍是必要补充。\n\n报告回绑另起 chore(reports) 提交(仓纪律 5)。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/commit/a9abcbe392de8a903512ab4b25529a6e277113ee","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-09-18T07:45:36-07:00","added":["docs/应用群网关门禁结构感知-2026-09-18.md"],"removed":[],"modified":["docs/工作台同源托管与入口鉴权实现记录-2026-09-18.md","governance/caddy-routes.json","governance/check-caddy.mjs","governance/evidence-scopes.json","governance/test/check-caddy.test.mjs"]}],"total_commits":0,"head_commit":{"id":"e8fda74e279a5884440d5efaac2265e513c814b6","message":"chore(reports): 入口门禁与工作台两份快照回绑 @ a9abcbe\n\n在 a9abcbe 的干净 detached 检出里重跑(governance/rebind-reports.mjs --gates caddy,workbench-snapshots,\n带 CHECK_CADDY_DOCKER=1),三份均 provenance.gitSha=a9abcbe / worktreeDirty=false。\n\n- reports/caddy.latest.json:0 违规。12 个 HTTP 契约前缀 × 2 profile 全覆盖;新增的 routing 段逐条记下\n 模拟出来的块链,13 条登记前缀(11 个去重契约前缀 + 2 个长连接前缀)全部到达 {$PLATFORM_API_UPSTREAM};\n workbenchGuard.reached=true / conditionalBefore=0;语法校验 dev / staging 均 passed,via docker,\n 镜像 caddy@sha256:5f5c8640…d58648(compose 锁定的那一个,不再是浮动 tag)。\n- reports/workbench-catalog-snapshot.latest.json:只有 provenance 变。caddy-routes.json 进了它的作用域\n (新增 validate / mount 段),被 check:evidence 判过期,但快照只吃 routes.contracts,内容逐字未变——\n 重建后与旧版按字段比对一致,已实测。\n- reports/workbench-ops-snapshot.latest.json:与 catalog 同一脚本产出,必须一起带回(分开会绑不同提交)。\n 它有一处内容变化不由本轮改动引起:image 段从 d8f09205 / sha256:fe418667… 更新到 05e3826e /\n sha256:c0869934…,来源是 06c3d4c 已提交的 reports/image-digest.json——此前那份快照相对该提交是旧的。\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n","url":"https://gitea.g-hi.com/luoanwu/enterprise-platform/commit/e8fda74e279a5884440d5efaac2265e513c814b6","author":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"committer":{"name":"juhailaoluo pro","email":"hillao@juhailaoluodeMacBook-Pro.local","username":""},"verification":null,"timestamp":"2026-09-18T07:46:25-07:00","added":[],"removed":[],"modified":["reports/caddy.latest.json","reports/workbench-catalog-snapshot.latest.json","reports/workbench-ops-snapshot.latest.json"]},"repository":{"id":116,"owner":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"law@g-hi.com","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"name":"enterprise-platform","full_name":"luoanwu/enterprise-platform","description":"","empty":false,"private":false,"fork":false,"template":false,"mirror":false,"size":18935,"language":"","languages_url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/enterprise-platform/languages","html_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform","url":"https://gitea.g-hi.com/api/v1/repos/luoanwu/enterprise-platform","link":"","ssh_url":"git@gitea.g-hi.com:luoanwu/enterprise-platform.git","clone_url":"https://gitea.g-hi.com/luoanwu/enterprise-platform.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"branch_count":43,"open_issues_count":0,"open_pr_counter":0,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2026-09-11T07:33:25+08:00","updated_at":"2026-09-18T22:44:32+08:00","archived_at":"1970-01-01T08:00:00+08:00","permissions":{"admin":true,"push":true,"pull":true},"has_code":true,"has_issues":true,"internal_tracker":{"enable_time_tracker":true,"allow_only_contributors_to_track_time":true,"enable_issue_dependencies":true},"has_wiki":true,"has_pull_requests":true,"has_projects":true,"projects_mode":"all","has_releases":true,"has_packages":true,"has_actions":true,"ignore_whitespace_conflicts":false,"allow_merge_commits":true,"allow_rebase":true,"allow_rebase_explicit":true,"allow_squash_merge":true,"allow_fast_forward_only_merge":true,"allow_rebase_update":true,"allow_manual_merge":false,"autodetect_manual_merge":false,"default_delete_branch_after_merge":false,"default_merge_style":"merge","default_allow_maintainer_edit":true,"avatar_url":"","internal":false,"mirror_interval":"","object_format_name":"sha1","mirror_updated":"0001-01-01T00:00:00Z","topics":[],"licenses":[]},"pusher":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"},"sender":{"id":5,"login":"luoanwu","login_name":"","source_id":0,"full_name":"","email":"5+luoanwu@noreply.localhost","avatar_url":"https://gitea.g-hi.com/avatar/627574a890388a2aadc80ab38d22f3a0","html_url":"https://gitea.g-hi.com/luoanwu","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-01-30T16:28:30+08:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"luoanwu"}}... |