跳到正文
DEV Community· ASWATHY P.S·· 4 天前AI 評分56

作者建立 VulnPath-AI 離線掃描器,檢查 AI 智能體應用程式安全風險

I built an offline scanner for AI/agent app security risks

AI 導讀

作者 ASWATHY P.S 建立 VulnPath-AI,這是一款以離線優先方式掃描 AI 智能體應用程式風險的 Python 混合式掃描器。它涵蓋硬編碼密鑰、命令注入、eval/exec/不安全 pickle、類 SSRF 的 URL 抓取及工作區路徑越界,並在可能時加入路徑情境和修正建議,不提供利用或攻擊功能。

正文

ASWATHY P.S

AI agents often run shell commands, evaluate code, and fetch URLs. A lot of the glue code around that still has classic issues: secrets in source, unsafe command construction, eval/pickle, SSRF-style fetches, and path handling that can leave a workspace.

I built VulnPath-AI to catch those patterns locally.

What it is

An offline-first Python hybrid scanner aimed at AI/agent application code:

  • Hardcoded secrets
  • Command-injection patterns
  • eval / exec / unsafe pickle
  • SSRF-style URL fetches
  • Workspace path escape (naive joins vs resolve + boundary checks)

It adds path-style context where possible and fix suggestions only — no exploit or attack features.

Why offline

I wanted something you can run on a laptop without sending source to a cloud SAST. Stdlib-first, optional YAML rules, sample suite, benchmark, and SARIF/CI support.

Honest scope

This is not a replacement for enterprise SAST (Semgrep, CodeQL, etc.). It's a focused tool for agent/tool glue risks and for learning how these bugs show up in real agent code.

Try it


bash
git clone https://github.com/zenithVeil/vulnpath-ai.git
cd vulnpath-ai
pip install -e .
vulnpath-ai samples/sqli_example.py
# or:
python analyze_hybrid.py samples/vulnerable/sqli_string_concat.py

來源:DEV Community · dev.to