feat: OpenMesh 基础平台与 MD/PDF 转换技能
Some checks failed
CI / pytest (push) Has been cancelled
CI / gui-unit (push) Has been cancelled
CI / gui-e2e (push) Has been cancelled

- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理
- 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类)
- 技能: md-to-office (pandoc + wkhtmltopdf)
- 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/
- 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
This commit is contained in:
2026-09-13 23:41:04 +08:00
commit 6f402ffcee
638 changed files with 154534 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
---
name: security-fix-pr
description: Turn triaged security findings into focused, reviewable fix PRs
---
Package security fixes so a busy reviewer can approve them with confidence.
1. One PR per theme (e.g. "parameterize SQL in the reports module"), never a mixed
security dump. Small diffs get reviewed; big ones get postponed.
2. Branch naming: `security/<theme>` from the repo's default branch. Follow the repo's
existing commit-message style.
3. Every fix commit carries its test: add or extend one that fails without the fix,
in the repo's existing test layout and idiom. If testing a fix isn't practical,
say so in the PR body instead of skipping silently.
4. PR body structure (keep it tight):
- What was wrong, in plain language, with severity and why it matters HERE (one or
two sentences of reachability/impact, not scanner boilerplate).
- What the fix does, and what it deliberately does not change.
- How it was verified (test names, commands run).
- NEVER include secret values, exploit payloads, or step-by-step attack recipes in
a public PR — describe the class of issue instead.
5. If the GitHub connector is available, open the PR with it; otherwise prepare the
branch and hand the user the exact push/PR commands.
6. Fixing is yours; MERGING is the team's. Never merge your own security PR — deliver
it and summarize what a reviewer should scrutinize.

View File

@@ -0,0 +1,34 @@
---
name: semgrep-review
description: Run a semgrep scan and turn findings into triaged, contextual fixes
---
Run a static-analysis pass with semgrep and own the findings end to end.
1. Check the tool: `semgrep --version`. If it's missing, ask for it with
`request_tool("semgrep", …)` rather than skipping the pass. If the user declines,
continue with a targeted manual review — read the routes/handlers, the auth and
session code, every query built by string concatenation, deserialization, and
outbound requests built from user input — and say in your report that the static
pass was manual, so the user knows the coverage is narrower than a full scan.
Note that community semgrep rules miss whole classes (e.g. SQL built through a
project's own DB wrapper), so reading the code is worth doing even when it runs.
2. Scan the repo (from its root):
`semgrep scan --config auto --json --quiet -o /tmp/semgrep.json`
Use `--config auto` unless the repo carries its own rules (`.semgrep.yml`,
`semgrep.yml`) — prefer the repo's own configuration when present.
3. Parse the JSON and triage EVERY finding — do not echo the raw report:
- Read the flagged code and enough surrounding context to judge reachability.
- Is the tainted input attacker-controlled or internal? Is there an upstream guard?
- Rate: critical / high / medium / low / noise, with a one-line justification each.
4. Fix what's real, highest severity first:
- Match the codebase's own conventions (its validation helpers, escaping utilities,
parameterized-query style) — read neighboring code before writing the fix.
- Add or extend a test that fails without the fix where the test harness makes that
reasonable.
- Group fixes by theme (one branch per theme), never one giant mixed diff.
5. For findings you judge noise, say WHY (e.g. constant input, dead code, framework
already escapes) — never silently drop them, and never add ignore rules to make the
scanner quiet without agreement.
6. Deliver: a short findings table (severity · location · verdict · action) and the
fix branches/PRs. If the repo has no semgrep config, offer to commit a starter
`.semgrep.yml` pinned to the rulesets that mattered here.