mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 21:11:50 +08:00
feat(findings): add manual remark and finding edit support
- Persist findings.remark with archive-restore compatibility, full-text search, and Markdown/CSV/JSON export
- Extend PATCH /api/exploration/findings/{id} to update name, vulnclass, severity, status, summary, evidence, report, and remark with atomic upfront validation
- Add dedicated Notes (remark) card and Edit Finding dialog on the finding detail page, plus remark preview/inline editing in the findings list and task findings tab
Fixes #198
This commit is contained in:
1 parent
253a8eeac3
commit
835e289ee2
21 files changed
+975
-43
No files matched your search
@@ -0,0 +1,38 @@
|
||||
export const findingMessages = {
|
||||
"findingDetail.remark": ["备注", "Notes"],
|
||||
"findingDetail.addRemark": ["添加备注", "Add notes"],
|
||||
"findingDetail.editRemark": ["编辑备注", "Edit notes"],
|
||||
"findingDetail.remarkEmpty": [
|
||||
"暂无备注,点击添加排查记录或复核备忘",
|
||||
"No notes yet. Click to add review notes or reminders.",
|
||||
],
|
||||
"findingDetail.remarkEmptyReadOnly": ["暂无备注", "No notes"],
|
||||
"findingDetail.remarkPlaceholder": [
|
||||
"记录排查结论、利用条件或复核备忘…",
|
||||
"Record triage notes, exploit conditions, or follow-up reminders…",
|
||||
],
|
||||
"findingDetail.remarkHint": [
|
||||
"Ctrl/⌘ + Enter 保存,Esc 取消;留空保存可清除备注",
|
||||
"Ctrl/⌘ + Enter to save, Esc to cancel; save empty to clear",
|
||||
],
|
||||
"findingDetail.remarkTooLong": ["备注最多 {{max}} 个字符", "Notes must be {{max}} characters or fewer"],
|
||||
"findingDetail.remarkSaved": ["备注已保存", "Notes saved"],
|
||||
"findingDetail.remarkCleared": ["备注已清除", "Notes cleared"],
|
||||
"findingDetail.editButton": ["编辑", "Edit"],
|
||||
"findingDetail.editTitle": ["编辑漏洞", "Edit finding"],
|
||||
"findingDetail.editDescription": [
|
||||
"手工修改当前漏洞的标题、分类、严重等级、状态、内容与备注。",
|
||||
"Manually update the finding title, category, severity, status, details, and notes.",
|
||||
],
|
||||
"findingDetail.nameLabel": ["漏洞标题", "Title"],
|
||||
"findingDetail.summaryPlaceholder": [
|
||||
"简要描述漏洞位置、成因与影响…",
|
||||
"Summarize the affected component, root cause, and impact…",
|
||||
],
|
||||
"findingDetail.evidencePlaceholder": [
|
||||
"粘贴关键请求、响应片段或复现 PoC…",
|
||||
"Paste key requests, response snippets, or PoC…",
|
||||
],
|
||||
"findingDetail.reportPlaceholder": ["支持 Markdown 格式的详细漏洞报告…", "Detailed Markdown vulnerability report…"],
|
||||
"findingDetail.findingSaved": ["漏洞信息已更新", "Finding updated"],
|
||||
} as const;
|
||||
@@ -1,5 +1,6 @@
|
||||
import { chatUIMessages } from "./chat-ui-messages";
|
||||
import { errorMessages } from "./error-messages";
|
||||
import { findingMessages } from "./finding-messages";
|
||||
import { inlineEditorMessages } from "./inline-editor-messages";
|
||||
import { notifyMessages } from "./notify-messages";
|
||||
import { overviewMessages } from "./overview-messages";
|
||||
@@ -16,6 +17,7 @@ export const messages = {
|
||||
...termsMessages,
|
||||
...taskMessages,
|
||||
...notifyMessages,
|
||||
...findingMessages,
|
||||
...inlineEditorMessages,
|
||||
...scheduleMessages,
|
||||
...chatUIMessages,
|
||||
|
||||
@@ -253,8 +253,8 @@ test("populated findings translate actions and headers while retaining original
|
||||
name: "Original title",
|
||||
vulnclass: "SQL Injection",
|
||||
summary: "原始 AI 发现内容",
|
||||
remark: "人工排查备注",
|
||||
ts: "2026-11-10T12:30:00Z",
|
||||
assets: [],
|
||||
};
|
||||
const props = {
|
||||
items: [finding],
|
||||
@@ -279,9 +279,9 @@ test("populated findings translate actions and headers while retaining original
|
||||
props[k] = noop;
|
||||
await i18n.changeLanguage("en");
|
||||
const english = visible(render(FindingsTable, props));
|
||||
for (const word of ["Finding name", "Retest", "Investigate", "Original title", "原始 AI 发现内容"])
|
||||
for (const word of ["Finding name", "Retest", "Investigate", "Original title", "原始 AI 发现内容", "人工排查备注"])
|
||||
assert.ok(english.includes(word), word);
|
||||
assert.doesNotMatch(english.replaceAll("原始 AI 发现内容", ""), /[\p{Script=Han}]/u);
|
||||
assert.doesNotMatch(english.replaceAll("原始 AI 发现内容", "").replaceAll("人工排查备注", ""), /[\p{Script=Han}]/u);
|
||||
await i18n.changeLanguage("zh-CN");
|
||||
assert.match(visible(render(FindingsTable, props)), /漏洞名称/);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user