본문으로 건너뛰기
F

secops-reporter

forxiucn/secops-reporter

Renders a structured security-incident ledger into one self-contained, bilingual (EN/中文) Bitrise-style HTML report with an in-page language switch, a customizable top-left logo, and a settings entry that can also surface in the sidebar.

설치

dsh plugin --profile web add github:forxiucn/secops-reporter

README

@nullbug/secops-reporter

中英双语、证据分级的 Bitrise 风格安全事件报告模板(DeepSeek Harness 插件)。 A bilingual (EN / 中文), evidence-graded Bitrise-style security-incident report template for DeepSeek Harness.

把一份结构化的"事故台账"渲染成单个自包含 HTML 文件——内联 CSS、内联 JS、 内嵌 SVG sprite,零网络请求。页面顶部可一键切换 EN / 中文;左上角 logo 可自定义;插件默认出现在「设置」里,是否出现在左侧菜单由你决定。

Renders a structured incident ledger into one self-contained HTML file — inline CSS, inline JS, embedded SVG sprite, zero network requests. The top bar switches EN / 中文 in one click; the top-left logo is customizable; the plugin's default entry lives in Settings, and the sidebar entry is optional.


安装 / Install

dsh plugin add @nullbug/secops-reporter
# 桌面端:插件页 → 添加插件 → 输入 @nullbug/secops-reporter → 安装

装完即出现在「设置 → 安全事件报告」页。客户端模块是新的 JS 代际,装完请重启一次 DSH 才会加载。

Installing loads a settings page. The client half is a new JS generation, so restart DSH once after installing.

使用 / Usage

生成报告 / Render a report

import { renderSecurityReport, DEFAULT_DATA } from '@nullbug/secops-reporter/template';

// 单语言 / single language:
const en = renderSecurityReport(DEFAULT_DATA);

// 中英双语、一页可切换 / bilingual, one switchable page:
const html = renderSecurityReport({ en: EN_LEDGER, zh: ZH_LEDGER });

// 带自定义 logo / with a custom logo:
const page = renderSecurityReport({ en, zh }, { logo: 'https://example.com/logo.svg' });
data输出
一个台账对象 / one ledger object单语言页,无切换 / single-language page, no switch
{ en, zh }一页,顶栏 EN / 中文 切换所有文案 / one page, top-bar toggle

logo 与品牌 / Logo & brand

设置页接受 PNG / JPEG / WebP / SVG(≤ 200 KB),可上传、可填 https: URL、 相对路径或 data: URI。渲染时通过第二个参数传入:

renderSecurityReport({ en, zh }, { logo: '…', brandName: 'Acme' });

logo 同时驱动报告顶栏品牌图与左侧菜单入口图标;省略则用内置盾牌。

入口 / Where the plugin appears

位置默认控制
设置 → 安全事件报告开「在『设置』中显示」开关
左侧图标栏关「在左侧菜单中显示」开关

设置与 logo 都保存在当前浏览器(localStorage),不写磁盘。

包结构 / Package surface

  • ./template — Node 渲染库:renderSecurityReport(data, opts)、DEFAULT_DATA。
  • ./client — 浏览器模块:设置页、左侧入口、logo 状态。
  • . (./index.js) — 宿主半部(空 apply;宿主不占资源)。
  • ./locale/*.json、./icon — 插件市场 / 宿主显示用的元数据。

许可 / License

Apache-2.0. See LICENSE.

관련 플러그인