← Back to Gene Catalog

sensitivity-classifier

Nativesecurity.sensitivity

根据生成模式、文档类型、泄露检测结果与用户覆盖项计算内容敏感级 S0–S3。纯数据转换,无网络调用。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyTypeDescription
sourcestring来源标识
leakCheckobject泄露检测结果
updatedBystring更新者标识,默认 system
desensitizedboolean是否已脱敏
documentKindstring文档类型标记;存在时会将默认级提升至 S2(与 review-handoff 同逻辑)
userOverridestring用户覆盖:lockNoUpload(强制 S3)/ allowNetLlm(S2→S1)/ 其他
generationModestring生成模式,如 hot-daily / hot-topic / kb-outline-draft / embed-web-draft / review-handoff / kb-handoff / file-desensitize / wechat-standalone
fallbackUsedRawboolean是否使用了原始回退内容
desensitizeFailedboolean脱敏是否失败

Output

PropertyTypeReqDescription
levelS0 | S1 | S2 | S3计算后的敏感级
sourcestring触发源
signalsobject泄露与脱敏信号汇总
updatedAtstring计算时间戳(ISO 8601)
updatedBystring更新者标识
userOverridestring用户覆盖指令(若未覆盖则为 null)
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [],
  "properties": {
    "source": {
      "type": "string",
      "description": "来源标识"
    },
    "leakCheck": {
      "type": "object",
      "properties": {
        "bySeverity": {
          "type": "object",
          "properties": {
            "high": {
              "type": "integer"
            },
            "medium": {
              "type": "integer"
            }
          }
        }
      },
      "description": "泄露检测结果"
    },
    "updatedBy": {
      "type": "string",
      "description": "更新者标识,默认 system"
    },
    "desensitized": {
      "type": "boolean",
      "description": "是否已脱敏"
    },
    "documentKind": {
      "type": "string",
      "description": "文档类型标记;存在时会将默认级提升至 S2(与 review-handoff 同逻辑)"
    },
    "userOverride": {
      "type": "string",
      "description": "用户覆盖:lockNoUpload(强制 S3)/ allowNetLlm(S2→S1)/ 其他"
    },
    "generationMode": {
      "type": "string",
      "description": "生成模式,如 hot-daily / hot-topic / kb-outline-draft / embed-web-draft / review-handoff / kb-handoff / file-desensitize / wechat-standalone"
    },
    "fallbackUsedRaw": {
      "type": "boolean",
      "description": "是否使用了原始回退内容"
    },
    "desensitizeFailed": {
      "type": "boolean",
      "description": "脱敏是否失败"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "level",
    "source",
    "userOverride",
    "updatedAt",
    "updatedBy"
  ],
  "properties": {
    "level": {
      "enum": [
        "S0",
        "S1",
        "S2",
        "S3"
      ],
      "type": "string",
      "description": "计算后的敏感级"
    },
    "source": {
      "type": "string",
      "description": "触发源"
    },
    "signals": {
      "type": "object",
      "properties": {
        "leakHigh": {
          "type": "integer"
        },
        "leakMedium": {
          "type": "integer"
        },
        "desensitized": {
          "type": "boolean"
        }
      },
      "description": "泄露与脱敏信号汇总"
    },
    "updatedAt": {
      "type": "string",
      "description": "计算时间戳(ISO 8601)"
    },
    "updatedBy": {
      "type": "string",
      "description": "更新者标识"
    },
    "userOverride": {
      "type": "string",
      "description": "用户覆盖指令(若未覆盖则为 null)"
    }
  }
}