| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor(cmd): add BaseRepo auto-detection to 21 commands Closes #332 Each command's Options struct gains a BaseRepo func()(string,error) field, injected from f.BaseRepo, and run functions use cmdutil.ResolveRepo instead of direct ParseRepo, allowing repo auto-detection from cwd. Commands: commit comments (create/edit/list/list-by-sha/view), commit diff, commit patch, label create/delete, milestone create/delete, pr checkout/comments/create/merge/reply/test, release create/delete/upload, repo stats. | 3 个月前 | |
fix(security): scan inline --body/--comment/--description/--notes for secrets 10 inline flag paths bypassed ScanContentForSecrets, allowing AI agents to accidentally submit content containing the current GC_TOKEN value. Fixed paths (issue #424): - issue comment --body (local getBody: add scan to inline branch) - issue comment edit --body (same) - issue edit --body (same) - pr comment --body (same) - pr comment edit --body (same) - pr edit --body (add scan before direct assignment) - pr review --comment (scan after --comment-file block, before API calls) - milestone edit --description (scan before HTTP client creation) - release create --notes (scan before HTTP client creation) - release edit --notes (scan after GetRelease, before PATCH) Preventive: ReadText (text_file.go) now calls ScanContentForSecrets. Tests: - cmdutil: 5 integration tests (ReadBody/ReadText/ReadTextFile/ ReadTextFromFlag reject token content) - 10 command-level unit tests (one per bypass path) - System test (secret-scan.txtar): 9 inline paths verified end-to-end with fake token, plus negative control - docs/REGRESSION.md: documented secret scanning regression Refs #424 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 3 个月前 |