gup is a CLI that scans installed package managers and shells out to them to
perform upgrades. The dominant risks are:
- Command injection — a hostile upstream manifest or registry response
could carry shell metacharacters in a package id. Mitigation: all subprocess
calls go through
src/core/runner.ts(execa, argv vector, noshell). The two exceptions that needshell: true(Scoop's PowerShell shim) are pinned by allowlist intests/security/shell-usage.test.ts. - MITM on upstream version probes — every
fetch()target must be https. Enforced bytests/security/http-targets.test.ts. - Provider mis-routing —
inferSourceFromPathdecides which PM owns a binary; misclassification could drive the wrong upgrade. Pinned bytests/security/install-source.test.ts.
npm run security # audit + eslint-security + security tests
npm run audit:deps:ci # dependency vulnerabilities (audit-ci)
npm run lint:security # eslint-plugin-security
npm run test:security # vitest security suite.github/workflows/security.yml runs on every PR + weekly cron:
- unit-and-lint:
lint:security+test:security - dependency-audit:
audit-ciagainst the npm advisory db - codeql: GitHub's
javascript-typescriptextended + quality queries - semgrep: custom rules in
.semgrep.ymlplusp/typescriptandp/nodejscommunity packs - gitleaks: secret scanning with config
.gitleaks.toml
Dependabot (.github/dependabot.yml) opens grouped weekly PRs for npm + GH
Actions updates.
Open a private security advisory on the GitHub repository. Avoid filing a public issue with reproducer details.