In plain words
A supply-chain attack hides malicious code in something you depend on, such as an npm package, a build tool or a GitHub Action, so it runs with your app's access when you install or build.
Where you see it
A minor update to a date-formatting package adds a postinstall script that reads environment variables and sends them to an unknown server. Harbor's CI runs npm install with deploy keys in its environment, so the script would run there too.
What goes wrong
- Installing whatever name the agent suggests
Agents sometimes suggest packages that don't exist, and attackers register those names. Check that a package is real, maintained and widely used before adding it, and watch for near-miss spellings.
- Secrets available to every install
If CI exposes deploy keys while dependencies install, any package's install script can read them. Install in a step without secrets, and give each later step only the secrets it needs.
- Versions and tags that move
A caret range, or a GitHub Action pinned to @v4, can change under you without a commit. Commit the lockfile, use npm ci, and pin third-party Actions to a full commit SHA.
What to tell your agent
Quick check
Sign in to earn +10 XP for itA new version of a small dependency adds a postinstall script that sends environment variables to an unknown address. Where is Harbor most exposed?