Find public copies of a code string
search_public_codeSearch public repositories for an exact code string; return WHERE it appears.
Use it to hunt vendored / copy-pasted copies of known-vulnerable code: search a
distinctive symbol or short fragment from the vulnerable function (a function name, a
constant, one call), then FETCH AND READ the hits to judge which copies are still
unpatched, reachable, or just fossils/forks. Returns RAW search results only -- it makes
no vulnerability judgment; that reasoning is yours. A long line rarely matches exactly
and is slow; the shortest distinctive token works best. Searches are capped at about
10 s: partial: true means the cap was hit with fewer than limit hits.
Args: code: an exact code string, e.g. "VP8LBuildHuffmanTable" or "yaml.load(". lang: optional language filter, e.g. "c", "python", "javascript" (default: all languages). limit: max hits to return (default 50).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "search_public_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| lang | No | ||
| limit | No |