update agent/audit.py
Browse files- agent/audit.py +2 -1
agent/audit.py
CHANGED
|
@@ -44,7 +44,8 @@ def main(tag):
|
|
| 44 |
c = collections.Counter()
|
| 45 |
for name, inp in tool_calls(t):
|
| 46 |
c[name] += 1
|
| 47 |
-
|
|
|
|
| 48 |
if SUSPICIOUS.search(text):
|
| 49 |
flagged.append((d.name[:8], name, text[:300]))
|
| 50 |
usage[d.name[:8]] = dict(c)
|
|
|
|
| 44 |
c = collections.Counter()
|
| 45 |
for name, inp in tool_calls(t):
|
| 46 |
c[name] += 1
|
| 47 |
+
# 项目目录名本身含 GAIA / Agents-Course,先换掉再匹配,免得每条本地命令都误报
|
| 48 |
+
text = json.dumps(inp, ensure_ascii=False).replace(str(ROOT), "<ROOT>")
|
| 49 |
if SUSPICIOUS.search(text):
|
| 50 |
flagged.append((d.name[:8], name, text[:300]))
|
| 51 |
usage[d.name[:8]] = dict(c)
|