Security
Your private packages are often your clients' code too. This is how PolyPack keeps them where they belong.
Teams are walled off
- Every Team has its own registry host, and every request is matched to that Team before anything else happens.
- A Token works only on its own Team's host. On any other host it is refused as if it were wrong.
- Every Team's data carries the Team it belongs to, and a database query that does not name a Team is refused by the application itself.
- A private Pack a caller cannot read is a 404, never a 403, so nobody can probe for a Team's Pack names.
Tokens
- A Token is shown once and stored only as a SHA-256 hash. We cannot show it to you again, and neither could anyone who read our database.
- Tokens start with polypack_ and end in a checksum, so secret scanners can spot a leaked one.
- Each Token can read, or read and publish. Client Tokens can only read, and only what is granted to that Client.
- A Member or Team Token can be limited to particular Packs, so a leaked CI Token exposes only what that pipeline needed. A limited Token never creates a Pack.
- With trusted publishing, a GitHub Actions workflow publishes with no Token stored in GitHub: it proves who it is with GitHub's signed ID token, tied to the repository's own GitHub number, and gets a Token for one Pack that lasts 15 minutes.
- PolyPack signs every npm version it serves, so npm audit signatures verifies it, and signs where each trusted-published version was built, checked with polypack verify. With its own key: nothing about your packages goes to a public log.
- Tokens can expire, with an email before they do, show when and from which IP address they were last used, and stop working the moment they are revoked. A Member's Tokens are revoked when they leave the Team, and Admins see every Token nobody has used for 90 days.
- Any Token, a Client's Tokens as a whole, and any API key can be limited to the IP addresses they are used from. From anywhere else they are refused, so a leaked one is useless outside your networks.
What you publish
- Every npm publish and Composer Sync is scanned before it is stored for .env files, private keys and AWS, GitHub, npm, Slack, Stripe and PolyPack tokens. A package with one is refused, naming the file and line, never the secret, unless an Admin has chosen warnings for that Pack.
- A PolyPack Token or API key found in a package is revoked at once, whatever the setting.
- Every night, PolyPack looks up each private npm and Composer Pack's name on npmjs.com and packagist.org, and tells your Admins if a public package has it: an install missing your PolyPack configuration would get that one instead.
The Team API
- The API has its own host, api.polypack.io, and its own credential, the API key. An API key never installs a package, a Token never works on the API, and the API never sets a cookie.
- API keys are shown once and stored only as a hash, can be read-only, can expire with a warning before they do, and show when and from where they were last used.
- Every change made through the API goes through the same checks as the panel and is recorded in the audit log under the key that made it.
Signing in
- There are no passwords. You sign in with a single-use link sent to your email, valid for 15 minutes, with a passkey, or through your Team's own identity provider.
- Single sign-on trusts your identity provider only for the email domains your Team has proved it owns with a DNS record, so it can never sign anyone in as someone else's address. Your Admins can require it for your Members.
- Opening a sign-in link only shows a button: nothing is used up until you confirm, so a mail scanner that opens links cannot sign anyone in.
- The panel, the registries and the API are separate doors. A browser session never works on a registry or the API, and a Token or API key never signs anyone in.
- Accounts come only from invitations, or from signing in through a Team's own identity provider at one of its verified domains.
- You can see every browser you are signed in on and sign out of any, or all. Removing someone from a Team, or removing a passkey, signs out their other sessions.
A record of every change
- The audit log records who issued or revoked a Token, invited or removed someone, granted a Pack, published or unpublished a version, and every sign-in, with the time and IP address.
- Events are never edited, never contain a secret, and are kept for a year. Team Admins see their own Team's log.
Where your packages live
- Dists, the zips and tarballs PolyPack serves, and container image layers are stored in a private Hetzner Object Storage bucket in Falkenstein, Germany, with versioning so a deleted file can be recovered.
- Downloads are checked by PolyPack, then served through a link that expires after five minutes.
- The database is backed up daily, and we have tested restoring it.
- All traffic is encrypted in transit.
- The container registry hosts (your-team.cr.polypack.io) are served directly rather than through Cloudflare, so images of any size can be pushed. PolyPack limits the rate of requests from every Token and address itself.
Found a problem?
If you think you have found a security issue in PolyPack, please email [email protected] rather than reporting it publicly, and we will reply.