Skip to content

[security-hardening] backend-CHEK-content:posts/comments/wiki/timeline 公开内容自动审核与下架门控 #20

Description

@hongzexin

背景

来自 2026-06-06/07 frontend-app/CHEK 上线前安全与滥用风险排查。GitHub code search 与 ops-bootstrap 网关配置确认:backend-CHEK-content 位于 chekdata/CHEK monorepo,DEV/PROD 网关公开路由包含 /api/chek-content/v1/posts/api/chek-content/v1/posts/*/comments/api/chek-content/v1/wiki/entries/api/chek-content/v1/timeline/api/chek-content/v1/public/ssg/*

风险

  • posts/comments/wiki/timeline 等公开内容可能被灌广告、联系方式、违规内容。
  • SSG/public 输出可能把 pending/blocked 内容静态化后长期公开。
  • 缺少统一下架/隐藏/封禁/删除和审计能力时,事故处理慢。

要求

  • 所有公开内容创建/更新后进入自动审核状态机:pending / auto_approved / blocked / hidden 或等价状态。
  • public/SSG/list/detail/comment 接口只返回可公开状态;owner/ops 视图可看到审核态。
  • 自动审核不可用时 fail closed 或 pending-hidden,不默认公开。
  • 支持 hide/unhide、soft delete、ban、reason、operator、audit log。
  • 日志脱敏,不记录用户隐私或完整违规内容明文。

验收

  • 测试覆盖 pending/blocked 内容不出现在 posts/comments/wiki/timeline/public SSG 输出。
  • 测试覆盖违规评论/广告/联系方式/脚本被自动 blocked。
  • DEV smoke 给出一条 blocked 内容不公开、ops 可审计的证据。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions