Skip to content

Commit 5242449

Browse files
committed
fix: address tool safety review feedback
1 parent 6979669 commit 5242449

24 files changed

Lines changed: 115 additions & 1909 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ cov.tmp
2020
coverage.xml
2121
test-ngtest-ut-trpc-agent-py.xml
2222
.pytest_cache
23+
/.pytest-tmp-*
24+
/tool_safety_audit.jsonl
2325

2426
node_modules
2527
package-lock.json

docs/mkdocs/en/tool_safety_guard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ execution resumes.
350350
## Test plan
351351

352352
```bash
353-
python -m pytest tests/tool_safety/ -v
353+
python -m pytest tests/tools/safety/ -v
354354
```
355355

356356
Coverage:
@@ -396,7 +396,7 @@ tool/
396396
wrapper.py # SafetyWrappedCallable, SafetyCheckedExecutor
397397
scripts/
398398
tool_safety_check.py # CLI
399-
tests/tool_safety/ # safety guard tests
399+
tests/tools/safety/ # unit and acceptance tests
400400
trpc_agent_sdk/tools/safety/examples/
401401
tool_safety_policy.yaml # sample policy
402402
samples/ # 14 public samples + manifest

docs/mkdocs/zh/tool_safety_guard.zh_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ guard = ToolSafetyGuard(
335335
## 测试
336336

337337
```bash
338-
python -m pytest tests/tool_safety/ -v
338+
python -m pytest tests/tools/safety/ -v
339339
```
340340

341341
测试覆盖模型与策略校验、脱敏、Python AST 扫描、Bash lexer-lite、跨字段检查、
@@ -355,7 +355,7 @@ trpc_agent_sdk/tools/safety/ # Guard、策略、规则、扫描器、审计
355355
manifest_run.json # 14 份完整报告及预期结果核对
356356
scripts/
357357
tool_safety_check.py # CLI
358-
tests/tool_safety/ # 安全检查器测试
358+
tests/tools/safety/ # 单元测试和验收测试
359359
docs/
360360
tool_safety_guard.md # English version
361361
tool_safety_guard.zh_CN.md # 本文

tests/tool_safety/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/tool_safety/conftest.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

tests/tool_safety/test_audit.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

tests/tool_safety/test_bash_scanner.py

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)