gh-setup
Audited by Socket on Aug 11, 2026
3 alerts found:
SecurityAnomalyMalwareSUSPICIOUS. The `gh` installation/auth portions are broadly consistent with the stated purpose and mostly align with official GitHub documentation, but automatically installing the third-party `gh-attach` extension is disproportionate to a basic setup skill. That extension comes from an unrelated personal repo and is designed to work with sensitive GitHub session material, creating a meaningful supply-chain and credential-handling risk even without direct evidence of exfiltration.
No clear malicious behavior (no backdoor/exfiltration/destructive actions) is evident in this module. However, it carries meaningful security risk typical of installer utilities: it executes shell commands (including sudo) and performs remote downloads and execution/install steps (macOS Homebrew bootstrap script; GitHub CLI “latest” binary/archives; gh extension installation) without integrity verification shown here. Treat as security-sensitive for supply-chain controlled environments and consider hardening (checksum/signature verification, avoid remote bootstrap scripts, reduce sh -c usage, and lock versions).
No malicious code is shown in this fragment because it is documentation, not the library implementation. However, the described authentication approach is a high-risk credential misuse pattern: it repurposes a GitHub browser `user_session` cookie as an env-var bearer token to perform authenticated uploads. This increases the impact of any credential theft (or accidental leakage) to account-session impersonation capability. Review the actual dependency code and packaging for how GH_ATTACH_SESSION_TOKEN is read/used and ensure it does not introduce additional unsafe behaviors beyond the intended upload flow.