Files
HomeAgent/internal/security
JianFeeeee b73ff3786a test(security): 补 Gate 明文拦截/回填与 Store 跨重启持久化契约
Codec 原有 7 条保留。新增模块职责层判据:

    TestGateReplacesSecretOutboundAndBackfillsForExecution
      出向文本里出现真实凭据 → 被替换成 @{alias},明文不再出现
      执行前 FillForExecution 把别名换回真实凭据
    TestGateScrubsSecretInbound
      入向泄漏的凭据被清洗,订阅侧看不到明文
    TestGateDisabledPassesTextThrough
      关闭状态原样透传、拦截计数 0
    TestStoreAliasRoundTripSurvivesReopen
      Submit 拿别名 → 重新打开同一存储 → Fill 回填出原文

    变异验证:
      去掉回填分支                 → 别名不再换回真实凭据(先前的失败)
      出向不产出别名               → outbound secret was not intercepted

    过程中修正了两处我自己写错的期望(回填目标必须先取别名、
    引用格式是 @{alias}),不是放宽实现。
2026-11-14 10:38:37 +08:00
..