Add files via upload

This commit is contained in:
公明
2026-07-14 15:11:50 +08:00
committed by GitHub
parent a496bd7aee
commit 2924d6636c
8 changed files with 44 additions and 44 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
**The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.**
CyberStrikeAI connects planning, execution, human oversight, evidence, and replay in one auditable workspace. Built in Go, it combines Eino-powered agents, MCP-native tools, RAG knowledge, graph workflows, and attack-chain modeling and analysis for authorized security operations.
CyberStrikeAI connects planning, execution, human oversight, evidence, and replay in one auditable workspace. Built in Go, it combines Eino-powered agents, MCP-native tools, RAG knowledge, visual workflows, and attack-chain modeling and analysis for authorized security operations.
**Start here:** [Quick start](#quick-start-one-command-deployment) · [Documentation](docs/en-US/README.md) · [Security hardening](docs/en-US/security-hardening.md)
+2 -2
View File
@@ -8,7 +8,7 @@
**CyberStrikeAI 是 AI 原生网络安全的智能执行中枢——让意图转化为受治理的行动,让证据沉淀为运营记忆,并让每次行动优化下一次行动。**
CyberStrikeAI 将规划、执行、人工监督、证据与复盘连接在同一个可审计工作空间中。项目基于 Go 构建,融合 Eino 智能体、MCP 原生工具、RAG 知识、工作流以及攻击链建模与分析能力,面向已获得明确授权的安全任务。
CyberStrikeAI 将规划、执行、人工监督、证据与复盘连接在同一个可审计工作空间中。项目基于 Go 构建,融合 Eino 智能体、MCP 原生工具、RAG 知识、可视化工作流以及攻击链建模与分析能力,面向已获得明确授权的安全任务。
**从这里开始:** [快速上手](#快速上手一条命令部署) · [中文文档](docs/zh-CN/README.md) · [安全加固](docs/zh-CN/security-hardening.md)
@@ -110,7 +110,7 @@ CyberStrikeAI 将规划、执行、人工监督、证据与复盘连接在同一
- 🤖 **智能体执行层**:将自然语言意图转化为受控、可审计的安全行动。
- 🧩 **Eino 编排**:支持单智能体及 Deep、Plan-Execute、Supervisor 多智能体模式。
- 🔀 **工作流**:通过 Agent、工具、条件、审批和输出节点构建可复用流程。
- 🔀 **工作流**:通过 Agent、工具、条件、审批和输出节点构建可复用流程。
- 🎭 **角色化测试**:为常见安全场景提供聚焦的提示词和工具策略。
### 工具与知识扩展
+7 -7
View File
@@ -97,7 +97,7 @@
"agentsManagement": "Agent management",
"roles": "Roles",
"rolesManagement": "Roles Management",
"workflows": "Graph Orchestration",
"workflows": "Workflows",
"settings": "System settings",
"hitl": "Human-in-the-loop",
"c2": "C2",
@@ -3101,8 +3101,8 @@
"roleFilterOnBanner": "These tools are checked and linked to this role (independent of MCP-wide enable).",
"roleFilterOffBanner": "These tools are unchecked and not linked to this role.",
"checkboxLinkTitle": "Check to link this tool to this role",
"bindWorkflow": "Bind graph workflow",
"bindWorkflowHint": "When a workflow is selected, conversations with this role automatically run the bound graph; workflow fields are configured freely in the graph JSON.",
"bindWorkflow": "Bind workflow",
"bindWorkflowHint": "When a workflow is selected, conversations with this role run it automatically; workflow fields are configured freely in the graph JSON.",
"workflowPolicy": "Workflow trigger policy",
"workflowPolicyAuto": "Auto trigger",
"workflowPolicyOff": "Off",
@@ -3110,11 +3110,11 @@
"workflowDisabledSuffix": " (disabled)"
},
"workflows": {
"title": "Graph Orchestration",
"newGraph": "New graph",
"processLibrary": "Process library",
"title": "Workflows",
"newGraph": "New workflow",
"processLibrary": "Workflows",
"nodeLibrary": "Node library",
"emptyList": "No graph workflows yet",
"emptyList": "No workflows yet",
"statusEnabled": "Enabled",
"statusDisabled": "Disabled",
"metaId": "ID",
+14 -14
View File
@@ -97,7 +97,7 @@
"agentsManagement": "Agent管理",
"roles": "角色",
"rolesManagement": "角色管理",
"workflows": "图编排",
"workflows": "工作流",
"settings": "系统设置",
"hitl": "人机协同",
"c2": "C2",
@@ -3089,20 +3089,20 @@
"roleFilterOnBanner": "以下为「已勾选、关联到本角色」的工具(与 MCP 管理里全局开/关无关)。",
"roleFilterOffBanner": "以下为「未勾选、未关联到本角色」的工具。",
"checkboxLinkTitle": "勾选表示本角色关联使用该工具",
"bindWorkflow": "绑定图编排流程",
"bindWorkflowHint": "选中流后,对话页使用该角色会自动触发绑定图;流程字段由图定义 JSON 自由配置。",
"workflowPolicy": "流触发策略",
"bindWorkflow": "绑定工作流",
"bindWorkflowHint": "选中工作流后,对话页使用该角色会自动触发;工作流字段由图定义 JSON 自由配置。",
"workflowPolicy": "工作流触发策略",
"workflowPolicyAuto": "自动触发",
"workflowPolicyOff": "关闭",
"noWorkflowBind": "不绑定流",
"noWorkflowBind": "不绑定工作流",
"workflowDisabledSuffix": "(已禁用)"
},
"workflows": {
"title": "图编排",
"newGraph": "新建",
"processLibrary": "流程库",
"title": "工作流",
"newGraph": "新建工作流",
"processLibrary": "工作流列表",
"nodeLibrary": "节点库",
"emptyList": "暂无图编排流程",
"emptyList": "暂无工作流",
"statusEnabled": "启用",
"statusDisabled": "禁用",
"metaId": "ID",
@@ -3110,19 +3110,19 @@
"metaDescription": "描述",
"metaEnabled": "启用",
"metaIdHint": "创建后不可修改,用于 API 与角色绑定",
"metaModalTitle": "流信息",
"metaModalTitle": "工作流信息",
"editMeta": "编辑",
"untitled": "未命名流",
"untitled": "未命名工作流",
"toggleEnabled": "启用/禁用",
"metaEnabledHint": "禁用后无法被角色自动触发",
"enabledUpdated": "启用状态已更新",
"enabledUpdateFailed": "更新启用状态失败",
"namePlaceholder": "基础 Web 扫描",
"descriptionPlaceholder": "可选",
"toolbarLabel": "流编辑工具",
"toolbarLabel": "工作流编辑工具",
"canvasTools": "画布工具",
"moreActions": "更多",
"deleteWorkflow": "删除流",
"deleteWorkflow": "删除工作流",
"package": {
"importLocal": "导入本地包",
"export": "导出",
@@ -3155,7 +3155,7 @@
"overwriteCheck": "我已确认覆盖当前本地工作流",
"overwriteConfirm": "确认覆盖并导入",
"errors": {
"fileRequired": "请选择本地图编排包后再预检。",
"fileRequired": "请选择本地工作流包后再预检。",
"fileTooLarge": "文件超过 10 MiB 限制,请选择更小的本地包。",
"invalidArchive": "本地包不是有效的 Zip 文件,无法完成预检。",
"unsupportedFormat": "本地包格式或版本不受支持。",
+2 -2
View File
@@ -332,7 +332,7 @@ const responseStreamStateByProgressId = new Map();
// 主通道当前迭代轮次缓存:progressId -> { iteration, orchestration }
const mainIterationStateByProgressId = new Map();
/** 图编排多 Agent 节点切换时清空流式聚合,避免推理/输出条目覆盖上一节点内容 */
/** 工作流多 Agent 节点切换时清空流式聚合,避免推理/输出条目覆盖上一节点内容 */
function clearTimelineStreamStates(progressId) {
responseStreamStateByProgressId.delete(progressId);
thinkingStreamStateByProgressId.delete(progressId);
@@ -1886,7 +1886,7 @@ function handleStreamEvent(event, progressElement, progressId,
workflowNodeId: curNode,
einoAgent: curAgent
});
// 主通道进入新轮次或图编排切换到新 Agent 节点后,不复用上一段的流式时间线条目
// 主通道进入新轮次或工作流切换到新 Agent 节点后,不复用上一段的流式时间线条目
if (prevN != null && (n < prevN || prevN !== n || (curNode && prevNode && curNode !== prevNode))) {
clearTimelineStreamStates(progressId);
}
+1 -1
View File
@@ -76,7 +76,7 @@
}
async function createInspection(apiFetch, file) {
if (!file) throw new WorkflowPackageError('WFPKG_FILE_REQUIRED', '请选择本地图编排包');
if (!file) throw new WorkflowPackageError('WFPKG_FILE_REQUIRED', '请选择本地工作流包');
const body = new FormData();
body.append('file', file, file.name || 'workflow.csapkg.zip');
const response = await apiFetch('/api/workflow-package-inspections', { method: 'POST', body: body });
+2 -2
View File
@@ -2,11 +2,11 @@ const fs = require('node:fs');
const test = require('node:test');
const assert = require('node:assert/strict');
test('图编排提供导入、导出和覆盖确认容器', () => {
test('工作流提供导入、导出和覆盖确认容器', () => {
const html = fs.readFileSync('web/templates/index.html', 'utf8');
const zh = JSON.parse(fs.readFileSync('web/static/i18n/zh-CN.json', 'utf8'));
assert.match(html, /onclick="openWorkflowPackageImportModal\(\)"/);
assert.match(html, /onclick="exportCurrentWorkflowPackage\(\)"/);
assert.match(html, /onclick="[^"]*exportCurrentWorkflowPackage\(\)"/);
assert.match(html, /id="workflow-package-import-modal"/);
assert.match(html, /id="workflow-package-overwrite-modal"/);
assert.equal(zh.workflows.package.importLocal, '导入本地包');
+15 -15
View File
@@ -227,13 +227,13 @@
</div>
</div>
<div class="nav-item" data-page="workflows">
<div class="nav-item-content" data-title="图编排" onclick="switchPage('workflows')" data-i18n="nav.workflows" data-i18n-attr="data-title" data-i18n-skip-text="true">
<div class="nav-item-content" data-title="工作流" onclick="switchPage('workflows')" data-i18n="nav.workflows" data-i18n-attr="data-title" data-i18n-skip-text="true">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="8" height="8" rx="2"/>
<path d="M7 11v4a2 2 0 0 0 2 2h4"/>
<rect x="13" y="13" width="8" height="8" rx="2"/>
</svg>
<span data-i18n="nav.workflows">图编排</span>
<span data-i18n="nav.workflows">工作流</span>
</div>
</div>
<div class="nav-item" data-page="projects">
@@ -2614,21 +2614,21 @@
</div>
</div>
<!-- 图编排页面 -->
<!-- 工作流页面 -->
<div id="page-workflows" class="page">
<div class="page-header">
<h2 data-i18n="workflows.title">图编排</h2>
<h2 data-i18n="workflows.title">工作流</h2>
<div class="page-header-actions">
<button class="btn-secondary" onclick="refreshWorkflows()" data-i18n="common.refresh">刷新</button>
<button class="btn-secondary" data-require-permission="workflow:write" type="button" onclick="openWorkflowPackageImportModal()" data-i18n="workflows.package.importLocal">导入本地包</button>
<button class="btn-primary" onclick="newWorkflowDraft()" data-i18n="workflows.newGraph">新建</button>
<button class="btn-primary" onclick="newWorkflowDraft()" data-i18n="workflows.newGraph">新建工作流</button>
</div>
</div>
<div class="page-content workflow-page-content">
<aside class="workflow-sidebar">
<div class="workflow-panel">
<div class="workflow-panel-header">
<h3 data-i18n="workflows.processLibrary">流程库</h3>
<h3 data-i18n="workflows.processLibrary">工作流列表</h3>
</div>
<div id="workflow-list" class="workflow-list">
<div class="loading-spinner" data-i18n="common.loading">加载中...</div>
@@ -2653,11 +2653,11 @@
<section class="workflow-meta-bar">
<div class="workflow-canvas-header">
<div class="workflow-canvas-heading">
<h3 id="workflow-canvas-title" class="workflow-canvas-title" data-i18n="workflows.untitled">未命名流</h3>
<h3 id="workflow-canvas-title" class="workflow-canvas-title" data-i18n="workflows.untitled">未命名工作</h3>
<span id="workflow-canvas-subtitle" class="workflow-canvas-subtitle" hidden></span>
</div>
</div>
<div class="workflow-toolbar" role="toolbar" aria-label="流编辑工具" data-i18n="workflows.toolbarLabel" data-i18n-attr="aria-label" data-i18n-skip-text="true">
<div class="workflow-toolbar" role="toolbar" aria-label="工作流编辑工具" data-i18n="workflows.toolbarLabel" data-i18n-attr="aria-label" data-i18n-skip-text="true">
<div class="workflow-toolbar-group" role="group" aria-label="画布工具" data-i18n="workflows.canvasTools" data-i18n-attr="aria-label" data-i18n-skip-text="true">
<button class="btn-secondary btn-small workflow-toolbar-button" data-require-permission="workflow:write" type="button" onclick="toggleWorkflowConnectMode()" id="workflow-connect-btn" aria-pressed="false">
<svg aria-hidden="true" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path d="M8 8l8 8"/></svg>
@@ -2685,7 +2685,7 @@
<div class="workflow-more-actions-divider" role="separator"></div>
<button class="workflow-more-actions-danger" data-require-permission="workflow:delete" type="button" role="menuitem" onclick="closeWorkflowMoreActions(); deleteCurrentWorkflow()">
<svg aria-hidden="true" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7"/><path d="M10 11v5m4-5v5"/></svg>
<span data-i18n="workflows.deleteWorkflow">删除流</span>
<span data-i18n="workflows.deleteWorkflow">删除工作</span>
</button>
</div>
</details>
@@ -4882,11 +4882,11 @@
window.ELK = elk;
}
</script>
<!-- 图编排流程信息 -->
<!-- 工作流信息 -->
<div id="workflow-meta-modal" class="modal" style="display: none;">
<div class="modal-content workflow-meta-modal-content">
<div class="modal-header workflow-meta-modal-header">
<h2 data-i18n="workflows.metaModalTitle">信息</h2>
<h2 data-i18n="workflows.metaModalTitle">工作流信息</h2>
<span class="modal-close" onclick="closeWorkflowMetaModal()">&times;</span>
</div>
<div class="modal-body workflow-meta-modal-body">
@@ -5670,14 +5670,14 @@
<small class="form-hint" data-i18n="roleModal.userPromptHint">此提示词会追加到用户消息前,用于指导AI的行为。注意:这不会修改系统提示词。</small>
</div>
<div class="form-group">
<label for="role-workflow-id" data-i18n="roleModal.bindWorkflow">绑定图编排流程</label>
<label for="role-workflow-id" data-i18n="roleModal.bindWorkflow">绑定工作流</label>
<select id="role-workflow-id" class="role-form-select-native">
<option value="" data-i18n="roleModal.noWorkflowBind">不绑定流</option>
<option value="" data-i18n="roleModal.noWorkflowBind">不绑定工作</option>
</select>
<small class="form-hint" data-i18n="roleModal.bindWorkflowHint">选中流后,对话页使用该角色会自动触发绑定图;流程字段由图定义 JSON 自由配置。</small>
<small class="form-hint" data-i18n="roleModal.bindWorkflowHint">选中工作流后,对话页使用该角色会自动触发;工作流字段由图定义 JSON 自由配置。</small>
</div>
<div class="form-group">
<label for="role-workflow-policy" data-i18n="roleModal.workflowPolicy">触发策略</label>
<label for="role-workflow-policy" data-i18n="roleModal.workflowPolicy">工作流触发策略</label>
<select id="role-workflow-policy" class="role-form-select-native">
<option value="auto" data-i18n="roleModal.workflowPolicyAuto">自动触发</option>
<option value="off" data-i18n="roleModal.workflowPolicyOff">关闭</option>