# This a Meltdown Script to check AUR pkgbuilds # It uses the api to get input and to do the prompt import urllib.request import urllib.error import tempfile def main(api): target = api.get_input("Check AUR Package") if not target: return api.command("echo", f"Checking the `{target}` package.") url = f"https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h={target}" try: req = urllib.request.Request(url) with urllib.request.urlopen(req) as response: pkgbuild_content = response.read().decode("utf-8") except urllib.error.URLError as e: api.command("print", f"Failed to fetch PKGBUILD: {e}") return path = api.stash(pkgbuild_content) api.command("new", f"AUR: {target}") prompt = "Review this PKGBUILD for any security issues, unusual commands, or suspicious network calls." ans = api.prompt(prompt, files=[path]) report = api.stash(ans) api.command("new", f"Jap: {target}") prompt = "Make a 2 column - | table based on this analysis showing pros and cons" api.prompt(prompt, [report])