Notion 与 HackerOne / Bugcrowd / Intigriti 企业漏洞赏金计划(Bug Bounty)、CVSS 研判分级与安全修复 SLA 门禁闭环实战
一、为什么企业 PSIRT 与产研团队需要将 HackerOne / Bugcrowd / Intigriti 与 Notion 安全应急中枢打通? #
在 SaaS、金融科技与出海业务高速扩张的背景下,越来越多企业通过 HackerOne、Bugcrowd 或 Intigriti 运营面向全球白帽黑客的漏洞赏金计划(Bug Bounty)与漏洞披露政策(VDP)。然而,漏洞赏金平台天然偏重“与外部白帽沟通、核验与打款”,在企业内部的跨团队修复调度与合规审计阶段,往往会暴露三大治理断点:
- 内部研发与 SRE 缺少上下文,漏洞修复 SLA 频繁超期:白帽提交的
Critical / High漏洞若仅停留在安全团队的 HackerOne 后台,靠人工复制粘贴到聊天群催促业务研发修复,极易错过“行业通用的 90 天公开披露(90-Day Disclosure) 红线”或企业内部 P0/P1 紧急修复时限; - 高危 PoC 攻击载荷与业务数据泄露风险:白帽报告常附带可直接利用的越权 Replay HTTP 请求、JWT 伪造样本、内网地址或测试账号凭证;若不加脱敏直接同步到面向全员研发的协同表格,可能引发二次内部扩散甚至被非授权人员复现;
- 重复报告(Duplicate)与无效垃圾报告(Spam/Informative)淹没真实风险:大型漏洞赏金项目每周可能收到大量自动化扫描器生成的无效报告或已知重复漏洞,若全量写入内部看板,不仅消耗 Notion API 写入配额,还会严重稀释工程师对高危真漏洞的注意力。
将 HackerOne / Bugcrowd / Intigriti 与 Notion 安全应急与漏洞治理中枢 打通,能够在“零完整 PoC 载荷落盘、零白帽隐私泄露、零无效垃圾单污染”的安全边界下,构建“资产 Scope 界定 -> 确认有效(Triaged)漏洞幂等入库 -> Critical/High 页顶置顶熔断 -> Formula 2.0 90 天披露与修复 SLA 门禁”闭环:
| 漏洞赏金与内部修复协同模式 | 安全团队人工转发漏洞摘要 | 仅在 HackerOne / Bugcrowd 后台流转 | 全量原始提交报告直写 Notion | 三表解耦漏洞治理中枢 + 披露 SLA 门禁闭环(推荐) |
|---|---|---|---|---|
| 高危漏洞 PoC 与凭证安全 | 截图与原报文在即时通讯群内留存 | 平台内可控,但业务研发无席位查看详情 | 易把可用 Exp、Cookie 与白帽邮箱写入公开页 | 入口剥离 HTTP Cookie/Token 与白帽 PII,仅同步脱敏摘要 |
| Spam 与 Duplicate 噪音控制 | 依赖安全工程师手工过滤后再转发 | 平台内需逐条人工标记 | 扫描器垃圾报告刷屏,触发 API 429 | 仅放行 Triaged / Confirmed 状态跃迁,拦截 Spam/OOS |
| 90 天披露窗口与 SLA 管控 | 无统一倒计时,临近公开日才紧急救火 | 缺乏与内部版本发布门禁的联动 | 缺少业务线维度的逾期聚合视图 | Formula 2.0 实时计算剩余天数与披露熔断 |
| 赏金预算归因与外审取证 | 财务打款与资产修复记录互相割裂 | 赏金账单与代码修复 PR 难以对应 | 无法按资产模块统计漏洞密度与 ROI | 资产 Scope 关联赏金台账,一键输出合规审计轨迹 |
二、四步搭建“赏金资产范围主档 × 白帽漏洞工单库 × 赏金核销与披露台账”三表模型 #
参照 Notion 企业级数据库架构设计规范 与 工作区安全与隐私控制,建议搭建 赏金资产范围主档库(DB_Bounty_Scopes)、有效白帽漏洞工单库(DB_Bounty_Reports) 与 赏金核销与公开披露台账(DB_Bounty_Payouts) 三表模型,并通过 企业级权限组配置 实行最小权限隔离:业务研发仅见脱敏修复工单,赏金核销台账仅向 PSIRT 与财务负责人开放。
步骤 1:设计三表属性字段与幂等业务主键 #
遵循**“原始 PoC 复现包留存在 HackerOne/Bugcrowd 加密后台,脱敏研判结论与修复时限同步 Notion”**的治理铁律,采用 {platform}:{program_handle}:{report_id} 作为报告幂等主键:
| 所属数据库 | 属性名称 | 属性类型 | 漏洞赏金治理与修复门禁用途 |
|---|---|---|---|
DB_Bounty_Scopes | Asset_Name | Title | 纳管资产域名或系统名称(如 api-gateway.example.com) |
DB_Bounty_Scopes | Scope_Key | Rich Text | 幂等主键:{platform}:{asset_identifier} |
DB_Bounty_Scopes | Max_Bounty_USD | Number | 该资产单次 Critical 漏洞最高赏金封顶额(美元) |
DB_Bounty_Scopes | Annual_Pool_USD | Number | 年度赏金预算池(美元) |
DB_Bounty_Scopes | Security_Owner | Person | 负责该资产安全应急响应的研发/PSIRT 负责人 |
DB_Bounty_Reports | Report_Title | Title | 脱敏漏洞标题(如 [H1-90412] 订单导出接口越权校验缺失) |
DB_Bounty_Reports | Report_Key | Rich Text | 幂等主键:{platform}:{program}:{report_id} |
DB_Bounty_Reports | Severity | Select | CRITICAL / HIGH / MEDIUM / LOW |
DB_Bounty_Reports | CVSS_Score | Number | 经安全团队复核后的 CVSS 3.1/4.0 评分(0.0 ~ 10.0) |
DB_Bounty_Reports | Triage_Status | Select | TRIAGED / FIX_IN_PROGRESS / RETEST_PENDING / RESOLVED |
DB_Bounty_Reports | Triaged_At | Date | 正式确认有效(Triaged)日期,作为修复与 90 天披露起算点 |
DB_Bounty_Reports | Disclosure_Requested | Checkbox | 白帽或监管是否已正式发起 90 天公开披露请求 |
DB_Bounty_Reports | Sanitized_Summary | Rich Text | 剥离 Cookie、Bearer Token 与内网地址后的脱敏修复指引 |
DB_Bounty_Reports | Scope_Relation | Relation | 双向关联至 DB_Bounty_Scopes |
DB_Bounty_Payouts | Payout_Title | Title | 赏金打款核销摘要(如 [BOUNTY] H1-90412 ($3,500)) |
DB_Bounty_Payouts | Payout_Key | Rich Text | 幂等防重主键:{platform}:{bounty_tx_id} |
DB_Bounty_Payouts | Bounty_USD | Number | 核定发放赏金总额(含平台服务费口径约定) |
DB_Bounty_Payouts | Payout_Status | Select | PENDING_APPROVAL / APPROVED / PAID |
DB_Bounty_Payouts | Scope_Relation | Relation | 双向关联至 DB_Bounty_Scopes |
步骤 2:配置 Webhook 原始 Buffer 验签与 PoC/PII 强脱敏 #
- 校验平台 Webhook HMAC-SHA256 签名:HackerOne(
X-H1-Signature)、Bugcrowd 与 Intigriti 均在请求头下发基于原始请求体计算的 HMAC-SHA256 签名。Node.js 网关必须保留原始Buffer,使用crypto.timingSafeEqual校验签名合法性; - 拦截未确认、重复与 Out-of-Scope 噪音:在入口直接过滤
state为new、spam、informative、duplicate或not_applicable的回调事件,仅在安全工程师完成 Triage 并置为triaged及后续修复状态跃迁时触发同步; - 剥离 PoC 敏感凭证与白帽个人 PII:漏洞报告摘要中极易携带实测命中的
Bearer/Authorization头、Cookie会话值、内网 IP、AWS Key 以及白帽研究人员邮箱。同步前必须执行正则强掩码,并对白帽身份仅保留平台脱敏昵称或加盐哈希 ID。
步骤 3:保护漏洞工单页内的研发复现记录与修复 PR 链接 #
研发人员会在 DB_Bounty_Reports 对应页面正文中补充根因分析、关联修复 PR 与灰度验证截图。因此网关更新漏洞状态时只得调用 PATCH /v1/pages/{page_id} 刷新属性,严禁覆盖页面现有正文 Blocks。
步骤 4:基于 Notion-Version: 2026-03-11 在资产主档页顶置顶 P0/P1 高危熔断块 #
所有 API 请求统一携带 Notion-Version: 2026-03-11(参考 Notion Views API 与 2026-03-11 接口升级工程实战)。当新确认 CRITICAL 或 HIGH 级别漏洞时,除幂等写入工单与赏金记录外,立即调用 Blocks API 并指定 position: { type: "start" },在对应资产主档页顶部置顶红色 callout 安全警示块,通知负责人冻结常规需求发版、优先推进热修。
三、TypeScript(Node.js 20+)生产级漏洞赏金 Webhook 验签、PoC 脱敏与三表幂等同步实战 #
以下 TypeScript 网关代码实现了原始 Buffer HMAC-SHA256 验签、Spam/Duplicate 噪音拦截、PoC 凭证与白帽 PII 正则脱敏、429 指数退避重试(参考 Notion API 速率限制与容错架构),以及基于 Notion-Version: 2026-03-11 的三表幂等同步与页顶置顶熔断逻辑:
// bounty_notion_sync.ts — Node.js 20+ TypeScript HackerOne / Bugcrowd / Intigriti 同步网关
import crypto from "node:crypto";
const NOTION_TOKEN = process.env.NOTION_TOKEN!;
const BOUNTY_WEBHOOK_SECRET = process.env.BOUNTY_WEBHOOK_SECRET!;
const NOTION_SCOPES_DS_ID = process.env.NOTION_SCOPES_DS_ID!;
const NOTION_REPORTS_DS_ID = process.env.NOTION_REPORTS_DS_ID!;
const NOTION_PAYOUTS_DS_ID = process.env.NOTION_PAYOUTS_DS_ID!;
const NOTION_HEADERS: Record<string, string> = {
Authorization: `Bearer ${NOTION_TOKEN}`,
"Notion-Version": "2026-03-11",
"Content-Type": "application/json",
};
const IGNORED_STATES = new Set(["new", "spam", "informative", "duplicate", "not_applicable", "out_of_scope"]);
export function verifyBountySignature(rawBody: Buffer, signatureHeader: string): boolean {
if (!signatureHeader || !BOUNTY_WEBHOOK_SECRET) return false;
const expectedHex = crypto.createHmac("sha256", BOUNTY_WEBHOOK_SECRET).update(rawBody).digest("hex");
const normalized = signatureHeader.trim().replace(/^sha256=/i, "");
if (normalized.length !== expectedHex.length) return false;
return crypto.timingSafeEqual(Buffer.from(normalized, "utf8"), Buffer.from(expectedHex, "utf8"));
}
export function sanitizeBountyText(rawText: string): string {
return (rawText || "")
.replace(/(?:Bearer|Basic|Token)\s+[A-Za-z0-9._~+/=-]{10,}/gi, "[REDACTED_AUTH_HEADER]")
.replace(/(?:Cookie|Set-Cookie|X-Api-Key)\s*:\s*[^\r\n]+/gi, "[REDACTED_SESSION_HEADER]")
.replace(/(?:AKIA|ASIA)[0-9A-Z]{16}/g, "[REDACTED_CLOUD_KEY]")
.replace(/\b(?:\d{1,3}\.){3}\d{1,3}\b/g, "[REDACTED_IP]")
.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g, "[REDACTED_EMAIL]")
.slice(0, 1500);
}
async function notionRequest<T = any>(method: string, path: string, body?: unknown): Promise<T> {
for (let attempt = 0; attempt < 5; attempt++) {
const resp = await fetch(`https://api.notion.com/v1${path}`, {
method,
headers: NOTION_HEADERS,
body: body ? JSON.stringify(body) : undefined,
});
if (resp.status === 429 && attempt < 4) {
const retryAfterSec = Number(resp.headers.get("Retry-After") || "1");
const jitterMs = 150 + Math.floor(Math.random() * 350);
await new Promise((r) => setTimeout(r, retryAfterSec * 1000 + Math.pow(2, attempt) * 350 + jitterMs));
continue;
}
if (!resp.ok) {
const errText = await resp.text();
throw new Error(`Notion API ${resp.status} on ${path}: ${errText.slice(0, 300)}`);
}
return (await resp.json()) as T;
}
throw new Error("Exceeded Notion API 429 retry budget");
}
export interface BountyWebhookPayload {
platform: "HackerOne" | "Bugcrowd" | "Intigriti";
program_handle: string;
asset_identifier: string;
report_id: string;
title: string;
state: string;
severity: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW";
cvss_score: number;
triage_status: "TRIAGED" | "FIX_IN_PROGRESS" | "RETEST_PENDING" | "RESOLVED";
triaged_at: string;
disclosure_requested?: boolean;
summary?: string;
bounty_tx_id?: string;
bounty_usd?: number;
payout_status?: "PENDING_APPROVAL" | "APPROVED" | "PAID";
max_bounty_usd?: number;
annual_pool_usd?: number;
}
export async function syncBountyWebhookEvent(payload: BountyWebhookPayload) {
if (IGNORED_STATES.has(payload.state.toLowerCase())) {
return { skipped: true, reason: `ignored-state:${payload.state}` };
}
const platformKey = payload.platform.toLowerCase();
const scopeKey = `${platformKey}:${payload.asset_identifier}`;
// 1. 幂等同步赏金资产范围主档 (DB_Bounty_Scopes)
const scopeQuery = await notionRequest("POST", `/data_sources/${NOTION_SCOPES_DS_ID}/query`, {
filter: { property: "Scope_Key", rich_text: { equals: scopeKey } },
page_size: 1,
});
const scopeProps: Record<string, unknown> = {
Asset_Name: { title: [{ text: { content: payload.asset_identifier.slice(0, 120) } }] },
Scope_Key: { rich_text: [{ text: { content: scopeKey } }] },
Max_Bounty_USD: { number: Number(payload.max_bounty_usd ?? 10000) },
Annual_Pool_USD: { number: Number(payload.annual_pool_usd ?? 50000) },
};
let scopePageId: string;
if (scopeQuery.results?.length) {
scopePageId = scopeQuery.results[0].id;
await notionRequest("PATCH", `/pages/${scopePageId}`, { properties: scopeProps });
} else {
const createdScope = await notionRequest("POST", "/pages", {
parent: { type: "data_source_id", data_source_id: NOTION_SCOPES_DS_ID },
properties: scopeProps,
});
scopePageId = createdScope.id;
}
// 2. 幂等同步脱敏后的白帽漏洞工单 (DB_Bounty_Reports)
const reportKey = `${platformKey}:${payload.program_handle}:${payload.report_id}`;
const reportQuery = await notionRequest("POST", `/data_sources/${NOTION_REPORTS_DS_ID}/query`, {
filter: { property: "Report_Key", rich_text: { equals: reportKey } },
page_size: 1,
});
const cleanSummary = sanitizeBountyText(payload.summary || "");
const reportProps: Record<string, unknown> = {
Report_Title: {
title: [{ text: { content: `[${payload.platform}-${payload.report_id}] ${payload.title}`.slice(0, 120) } }],
},
Report_Key: { rich_text: [{ text: { content: reportKey } }] },
Severity: { select: { name: payload.severity } },
CVSS_Score: { number: Number(payload.cvss_score) },
Triage_Status: { select: { name: payload.triage_status } },
Triaged_At: { date: { start: payload.triaged_at } },
Disclosure_Requested: { checkbox: Boolean(payload.disclosure_requested) },
Sanitized_Summary: { rich_text: [{ text: { content: cleanSummary } }] },
Scope_Relation: { relation: [{ id: scopePageId }] },
};
let isNewCriticalOrHigh = false;
if (reportQuery.results?.length) {
await notionRequest("PATCH", `/pages/${reportQuery.results[0].id}`, { properties: reportProps });
} else {
await notionRequest("POST", "/pages", {
parent: { type: "data_source_id", data_source_id: NOTION_REPORTS_DS_ID },
properties: reportProps,
});
isNewCriticalOrHigh = payload.severity === "CRITICAL" || payload.severity === "HIGH";
}
// 3. 如有赏金核定事件,幂等同步至 DB_Bounty_Payouts
if (payload.bounty_tx_id && typeof payload.bounty_usd === "number") {
const payoutKey = `${platformKey}:${payload.bounty_tx_id}`;
const payoutQuery = await notionRequest("POST", `/data_sources/${NOTION_PAYOUTS_DS_ID}/query`, {
filter: { property: "Payout_Key", rich_text: { equals: payoutKey } },
page_size: 1,
});
const payoutProps: Record<string, unknown> = {
Payout_Title: {
title: [{ text: { content: `[BOUNTY] ${payload.platform}-${payload.report_id} ($${payload.bounty_usd})`.slice(0, 120) } }],
},
Payout_Key: { rich_text: [{ text: { content: payoutKey } }] },
Bounty_USD: { number: payload.bounty_usd },
Payout_Status: { select: { name: payload.payout_status || "PENDING_APPROVAL" } },
Scope_Relation: { relation: [{ id: scopePageId }] },
};
if (payoutQuery.results?.length) {
await notionRequest("PATCH", `/pages/${payoutQuery.results[0].id}`, { properties: payoutProps });
} else {
await notionRequest("POST", "/pages", {
parent: { type: "data_source_id", data_source_id: NOTION_PAYOUTS_DS_ID },
properties: payoutProps,
});
}
}
// 4. 新确认 CRITICAL / HIGH 漏洞立即在资产主档页顶置顶红色熔断块
if (isNewCriticalOrHigh) {
await notionRequest("PATCH", `/blocks/${scopePageId}/children`, {
position: { type: "start" },
children: [
{
object: "block",
type: "callout",
callout: {
icon: { type: "emoji", "emoji": "🚨" },
color: "red_background",
rich_text: [
{
type: "text",
text: {
content: `[高危漏洞应急熔断] 收到已确认 ${payload.severity}(CVSS ${payload.cvss_score})白帽报告 #${payload.report_id},请资产负责人立即响应并暂停非紧急功能上线!`,
},
},
],
},
},
],
});
}
return { ok: true, scopePageId, isNewCriticalOrHigh };
}
四、Formula 2.0 实战:CVSS 严重度修正、90 天公开披露倒计时与发版阻断门禁 #
在 DB_Bounty_Scopes 中新建 Formula 2.0 属性 漏洞应急与披露门禁(语法参见 Formula 2.0 函数与正则速查手册 与 官方公式指南),自动核算各资产名下未修复的 CRITICAL/HIGH 漏洞、行业 90 天公开披露剩余窗口以及年度赏金池消耗率,输出一目了然的红绿灯应急信号:
| 漏洞治理与披露门禁维度 | Formula 2.0 核心判定条件 | PSIRT / CISO / 研发协同价值 |
|---|---|---|
| 临近或突破 90 天公开披露红线 | disclosureUrgent.length() > 0 | 在外部白帽或第三方披露前强制升级为全员应急阻断 |
| 存在未关闭 CRITICAL / HIGH 漏洞 | openCritHigh.length() > 0 | 冻结该资产常规迭代发版,优先推进安全热修 |
| 高危修复逾期(超过 7 天或 30 天) | slaBreached.length() > 0 | 自动识别超期未处置工单并触发管理层升级 |
| 年度赏金预算池消耗超 85% | pool > 0 && paidTotal / pool >= 0.85 | 提醒安全与财务团队提前追加预算并评估高频漏洞根因 |
lets(
pool, if(empty(prop("Annual_Pool_USD")), 0, prop("Annual_Pool_USD")),
reports, prop("Bounty_Reports"),
openReports, reports.filter(current.prop("Triage_Status") != "RESOLVED"),
openCritHigh, openReports.filter(current.prop("Severity") == "CRITICAL" || current.prop("Severity") == "HIGH"),
slaBreached, openReports.filter(
!empty(current.prop("Triaged_At")) &&
((current.prop("Severity") == "CRITICAL" && dateBetween(now(), current.prop("Triaged_At"), "days") > 7) ||
(current.prop("Severity") == "HIGH" && dateBetween(now(), current.prop("Triaged_At"), "days") > 30))
),
disclosureUrgent, openReports.filter(
!empty(current.prop("Triaged_At")) &&
(current.prop("Disclosure_Requested") || dateBetween(now(), current.prop("Triaged_At"), "days") >= 75)
),
paidTotal, prop("Bounty_Payouts").map(current.prop("Bounty_USD")).sum(),
burnRatio, if(pool > 0, paidTotal / pool, 0),
ifs(
disclosureUrgent.length() > 0,
style("🛑 90 天公开披露倒计时告警:存在 " + format(disclosureUrgent.length()) + " 项临近/请求披露未修复漏洞,立即冻结发版", "red", "bold", "red_background"),
slaBreached.length() > 0,
style("🚨 漏洞修复 SLA 违约:有 " + format(slaBreached.length()) + " 项高危漏洞超期未闭环(P0>7天 / P1>30天)", "red", "bold", "red_background"),
openCritHigh.length() > 0,
style("⚠️ 存在 " + format(openCritHigh.length()) + " 项未解决 Critical/High 白帽漏洞,请优先合入热修", "orange", "bold"),
burnRatio >= 0.85,
style("💸 年度赏金池预警:已核销 $" + format(round(paidTotal)) + "(占预算 " + format(round(burnRatio * 100)) + "%)", "yellow", "bold"),
openReports.length() > 0,
style("🟡 存在 " + format(openReports.length()) + " 项中低危待修复漏洞 · 累计赏金 $" + format(round(paidTotal)), "yellow", "bold"),
reports.length() == 0,
style("⚪ 尚无已确认白帽漏洞记录", "gray"),
style("🟢 资产漏洞清零:全部 " + format(reports.length()) + " 项报告已修复闭环 · 累计赏金 $" + format(round(paidTotal)), "green", "bold", "green_background")
)
)
建议将本中枢与 Notion 与 Wiz / Orca Security / CrowdStrike Falcon 云原生安全态势(CNAPP)治理实战、Notion 与 Teleport / StrongDM / ConductorOne 企业特权访问管理实战、Notion 与 Vanta / Drata 自动化合规审计实战 以及 Notion 与 Sentry / PagerDuty 线上故障应急响应实战 联动部署,实现“外部白帽众测 -> 内部云资产暴露面核查 -> 紧急响应热修 -> SOC 2 / ISO 27001 审计取证”的端到端安全闭环。
五、HackerOne / Bugcrowd / Intigriti 同步 Notion 常见故障排查 #
在上线生产级漏洞赏金与应急修复同步系统时,以下四类典型隐患需要重点防范(更多常见错误码解析请参阅 Notion 常见报错与故障诊断手册):
- 大量自动化扫描器提交的 Spam / Duplicate 报告冲垮 Notion API 配额:开启公开 VDP 或新发布赏金范围后,短时间涌入上百条无效投稿,若全量写入将迅速触发
429。解法:在入口严格维护IGNORED_STATES,仅在安全工程师 Triage 确认为有效漏洞(triaged)后才入库 Notion。 - 内部研发看板直接泄露可复现 Exp、Session Cookie 或白帽邮箱:将 HackerOne 报告的
vulnerability_information全量写入公共工作区属性。解法:所有摘要文本必须经过sanitizeBountyText()剥离鉴权请求头、内网 IP、云密钥与个人邮箱,复杂复现步骤留在原生加密平台查看。 - 90 天公开披露临界期被常规需求迭代淹没:缺乏对
Triaged_At起算窗口的自动倒计时监控,直到白帽发起公开申请才被动响应。解法:在 Formula 2.0 中硬编码dateBetween(now(), Triaged_At, "days") >= 75及Disclosure_Requested联合门禁,提前 15 天高亮预警并冻结业务上线。 - Node.js 框架自动解析 JSON 导致
verifyBountySignature校验始终返回false:使用JSON.stringify(req.body)重新序列化字符串后,键序或空格变化破坏了原始 HMAC 摘要。解法:在 Express / Fastify 路由中显式挂载express.raw({ type: "application/json" })获取原始Buffer参与验签。
核心手册与速查工具矩阵
高频速查手册与生产力工具直达常见问题与答疑 (FAQ)
高频疑难解析与避坑指南完全不需要。绝大多数核心功能在免费 Free 计划中均可完整体验与实操练习,无需额外付费购买 Plus 或团队版。