Another janky check bun script
Some checks failed
Wiki Resources Sanity Checks / ruff-checks (push) Failing after 2s

This commit is contained in:
2026-06-16 23:08:55 -07:00
parent 292b9a8004
commit b3bdf03f25

View File

@@ -0,0 +1,24 @@
from pathlib import Path
from requests import get
def remote_pkg_list():
pkgs = get('https://raw.githubusercontent.com/lenucksi/aur-malware-check/refs/heads/master/malicious_npm_packages.txt')
ret = set()
for line in pkgs.content.decode():
if line.startswith('#'):
continue
ret.add(line)
return ret
def local_pkgs():
return set([e for e in Path(f'{Path.home()}/.bun/install/cache/').iterdir()])
if __name__ == '__main__':
remote_pkgs = remote_pkg_list()
for pkg in local_pkgs():
if pkg in remote_pkgs:
print(f'COMPROMISED - {pkg}')
else:
print(f'CLEAN - {pkg}')