False positive: info_stealer `$browser_cookies` matches prose that mentions cookies and Edge on one line
Summary
The built-in YARA rule info_stealer (malware namespace) reports a HIGH YR1 on ordinary skill documentation. The string
$browser_cookies = /Cookies.*(chrome|firefox|edge|opera)/ nocase
has no distance bound, and the rule's condition is any of them, so a single line that mentions cookies and, anywhere later, one of the browser names is reported as an information stealer.
Reproduction
supabase/agent-skills@c9be0e931b7930f7d02126d04774d904c381e7d7, skills/supabase/SKILL.md, line 3 (the front-matter description, one 803-character line). It contains … auth issues (login, logout, sessions, JWT, cookies, getSession, …) … timeouts, Edge Function crashes …. The match spans 376 characters, from cookies to Edge.
skillspector scan skills/supabase --no-llm --format json
→ YR1 HIGH, YARA rule 'info_stealer', SKILL.md:3, and the overall verdict blocks. The skill has no scripts.
Shorter documentation sentences match the same way, for example Set cookies for Edge Functions with the SSR helper.
Suggested fix
Same approach as #489 / #608: keep the rule's intent and require the actual artifact a stealer reads, which is a browser profile path that ends in the cookie store:
$browser_cookies = /(Chrome|Chromium|Edge|Brave-Browser)[\\\/'\x22, ]{1,4}(User Data[^\n]{0,80}|(Default|Profile \d+)[\\\/'\x22, ]{1,4}(Network[\\\/'\x22, ]{1,4})?)Cookies/ nocase
$opera_cookies = /Opera (Stable|GX Stable)[^\n]{0,80}Cookies/ nocase
$firefox_cookies = /cookies\.sqlite/ nocase
All other strings of the rule stay unchanged.
Checked with yara-python 4.5.4:
| Input | current rule | suggested rule |
|---|---|---|
os.path.join(LOCALAPPDATA, 'Google', 'Chrome', 'User Data', 'Default', 'Network', 'Cookies') |
no match* | match |
%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Network\Cookies |
no match* | match |
~/.config/BraveSoftware/Brave-Browser/User Data/Default/Cookies |
no match* | match |
~/Library/Application Support/Google/Chrome/Default/Cookies |
no match* | match |
%APPDATA%\Opera Software\Opera Stable\Network\Cookies |
no match* | match |
<profile>/cookies.sqlite (Firefox) |
no match | match |
supabase SKILL.md description |
match | no match |
Set cookies for Edge Functions with the SSR helper. |
match | no match |
Cookies set by the Edge middleware are httpOnly. |
match | no match |
Forward cookies to Chrome headless through the Playwright context. |
match | no match |
* The current pattern needs Cookies before the browser name, so the usual path forms (browser first, Cookies last) only match when something else follows on the same line. The suggestion also closes that gap.
I will open a PR with these patterns and regression tests (benign prose, the stealer paths above, a file containing both).