- Block the installation and return an
HTTP 403with the block reason when the package is in the Endor Labs malware database, or a policy condition matches Block. The Package Firewall records a log with the package, version, and reason. - Allow the installation if a policy condition matches with Warn. The Package Firewall records a warning log with the package, version, and reason.
- Allow the installation if no malware is detected. No log is recorded.
malware detected for package <name>@<version>: Endor Labs classified the package as malware.package license is restricted: The license violates your Package Firewall policy.package does not meet min_age_hours requirement: The package is newer than the minimum age set in your policy.
Package Firewall support matrix
The following table outlines the package managers and ecosystems the Package Firewall supports through direct integration.Configure the Package Firewall
Complete the following steps to configure direct integration with the Package Firewall:- Create an API key for the Package Firewall.
- Configure your package manager configuration file.
- Verify your setup.
Create an API key for the Package Firewall
Create an API key dedicated to the Package Firewall so that can authenticate to it. You can create it through one of the following methods:- Using the Endor Labs user interface, with the Package Firewall User role. See API keys to learn more.
- Using endorctl, with the
SYSTEM_ROLE_PACKAGE_FIREWALLrole. Make sure to install and configure endorctl before you create the key.
<namespace>with your namespace.<API key name>with the name of the API key for the Package Firewall use case.<YYYY-MM-DDTHH:MM:SSZ>with the API key expiration in ISO 8601 UTC format, for example2026-12-31T23:59:59Z.
- API key:
spec.key - API secret:
spec.secret
Configure your package manager configuration file
Configure your package manager configuration file with the Package Firewall URL, your API key as the username, and your API secret as the password. The Package Firewall authenticates installation requests by validating the username and password pair. Replace<api-key> and <api-secret> with the credentials you saved in the previous step.
Verify your setup
To verify your setup, install a package that Endor Labs has classified as malware. The Package Firewall should block the installation and return anHTTP 403.
The following examples show the test command for each package manager.
npm
npm
Run the following command to test the Package Firewall with npm.When the Package Firewall blocks the package, the output looks similar to the following. The
403 Forbidden response confirms that the firewall blocked the package.pnpm
pnpm
Run the following command to test the Package Firewall with pnpm.When the Package Firewall blocks the package, the output looks similar to the following. The
Forbidden - 403 response confirms that the firewall blocked the package.Yarn Classic (v1)
Yarn Classic (v1)
Run the following command to test the Package Firewall with Yarn Classic.When the Package Firewall blocks the package, the output looks similar to the following. The
Forbidden - 403 response confirms that the firewall blocked the package.Yarn Berry (v2+)
Yarn Berry (v2+)
Run the following command to test the Package Firewall with Yarn Berry.When the Package Firewall blocks the package, the output looks similar to the following. The
403 (Forbidden) response confirms that the firewall blocked the package.Bun
Bun
Run the following command to test the Package Firewall with Bun.When the Package Firewall blocks the package, the output looks similar to the following. The
403 response confirms that the firewall blocked the package.pip
pip
Run the following command to test the Package Firewall with pip.When the Package Firewall blocks the package, the output looks similar to the following. The
403 response confirms that the firewall blocked the package.uv
uv
Run the following command to test the Package Firewall with uv.When the Package Firewall blocks the package, the output looks similar to the following. The
(403 Forbidden) response confirms that the firewall blocked the package.Poetry
Poetry
Run the following command to test the Package Firewall with Poetry.When the Package Firewall blocks the package, the output looks similar to the following. The
403 Forbidden response confirms that the firewall blocked the package.Go
Go
Run the following command to test the Package Firewall with Go.When the Package Firewall blocks the package, the output looks similar to the following. The
403 Forbidden response confirms that the firewall blocked the package.Next steps
- Configure which packages the firewall flags and how it responds. See Package Firewall policy to learn more.
- Review the events the firewall records. See View Package Firewall logs to learn more.