memory-poisoning-scanner

v0.3.1
io.github.GuardBee/memory-poisoning-scanner Checked 7 hours ago Published 1 month ago

Scans agent code for untrusted input poisoning persistent cross-session memory

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_text

Scan agent code for memory-poisoning risks: untrusted input written into persistent, cross-session memory (MemGPT-style archival/core memory, or a vector store used as a long-term knowledge base) without visible sanitization, and memory retrievals fed into a system/assistant-role message or prompt template as trusted context.

ParameterTypeDescription
content *stringThe code content to scan
labelstringOptional label shown in findings (e.g. filename)

scan_file

Scan a single file for memory-write and memory-readback poisoning patterns

ParameterTypeDescription
path *stringAbsolute or relative path to the file to scan

scan_directory

Recursively scan a directory of agent source code for memory-poisoning patterns

ParameterTypeDescription
path *stringAbsolute or relative path to the directory to scan
excludearraySkip files/dirs whose path contains one of these strings
includearrayOnly scan files whose path contains one of these strings
maxFilesintegerMaximum number of files to scan (default: 5000)

list_patterns

List every memory-write and memory-readback pattern this scanner detects, grouped by category