codesafe_submit_audit
Submit audit verdicts to the CodeSafe platform to update defect classifications, enabling UI markers and PDF exports to reflect confirmed outcomes. Use dry-run preview before committing changes.
Instructions
Write audit verdicts back to the platform (POST /codesafeapi/result/audit), so the Web UI shows 误报/确认 markers and PDF exports include them.
audits: list of {bugId OR pkResbug, auditResult OR verdict, auditMemo?}.
bugId: the 32-char hash (from codesafe_list_bugs). A numeric pkResbug may be passed as bugId — it is auto-routed to the pkResbug field.
pkResbug: the numeric defect id (alternative to bugId).
auditResult: platform code directly (5=是问题, 6=不是问题/误报, 9=遗留).
verdict: real/false_positive/needs_review (mapped to 5/6/9).
dry_run(default true): preview the payload without writing. To commit, CODESAFE_ENABLE_WRITE must be true and confirm_write must be explicitly true.
⚠️ This is the only tool that mutates the platform. Prefer dry_run first, and write in small batches. Each write is verified — if the bug's auditState does not actually change (e.g. ID not resolved), the tool raises instead of silently leaving only a comment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audits | Yes | ||
| dry_run | No | ||
| task_id | Yes | ||
| confirm_write | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||