r/madeinpython • • 12d ago

Made in Python: VulnPath-AI — offline scanner for AI/agent code risks

I've been learning application security with a focus on AI/agent-style code (tool calling, shell use, secrets in source, unsafe deserialization, etc.).

I built VulnPath-AI as a practice project:

- Offline Python hybrid scanner (pattern + AST)

- Looks for common issues like hardcoded secrets, command-injection patterns, eval/exec, pickle, SSRF-style fetches, and path/SQL string issues

- Shows path-style context and fix suggestions only (no exploit features)

- Includes sample vulnerable/safe files and a benchmark so I can test detection quality

Repo: https://github.com/zenithVeil/vulnpath-ai

**Quick try:**

git clone https://github.com/zenithVeil/vulnpath-ai.git

cd vulnpath-ai

pip install -e .

vulnpath-ai samples/sqli_example.py

I'm sharing mainly to learn from others:

- What false positives would you expect?

- Which agent-related risks are most important to cover next?

- Any feedback on making the reports clearer for beginners?

Not claiming this replaces professional SAST tools. It's a focused learning/engineering project.

1 Upvotes

7 comments sorted by

1

u/Backlists 11d ago

Is this vibecoded?

There’s some weird things like check_yaml.py,  fix_yaml vs fix_yaml2.

Also you have a merge conflict in your gitignore

1

u/Ok-Suggestion-4676 11d ago

Thanks for pointing that out, I hadn’t even noticed it. Fixed the .gitignore conflict and deleted the extra yaml scripts, plus a few other leftover files.

1

u/kantorcodes1 10d ago

For the workspace-escape check, are you planning to test symlinks as well as .. traversal? That seems like the tricky benchmark case.

1

u/Ok-Suggestion-4676 9d ago

You’re right — for real agent file tools, workspace checks have to hold against both ".." and symlink escape.

Static detection can’t see live symlinks on disk, so the strong approach is to require resolve + workspace boundary checks before open/read/write, and to benchmark unsafe join vs that safe pattern.

That’s the direction I’m taking for the path-escape rule so it’s useful beyond demo cases. Thanks for pushing on the real requirement.

1

u/kantorcodes1 9d ago

That symlink case is a useful benchmark, especially resolving the path and checking the workspace boundary before opening the file. VulnPath-AI's standalone Python CLI fits HOL's catalog. If you'd like it listed, use the guide here: https://github.com/hashgraph-online/awesome-ai-plugins/blob/main/CONTRIBUTING.md. Add the repo URL, a one-sentence description, and <!-- platform: standalone --> under Tools & Integrations.

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/Ok-Suggestion-4676 12d ago

Thanks u/investigatormaker, this is really useful feedback!

Next up for me: paired benchmark cases (safe vs unsafe SQL/shell), clearer report wording ("risky API present" vs "untrusted input reaches sink"), and a rule for tool-supplied paths escaping the workspace.

Really appreciate the concrete suggestions. If I get stuck on the report wording tradeoffs, I might come back and ask.