fossa_block_package
Block a package from FOSSA quality policies by adding a blocked-dependency rule. Specify package locator, optional versions, and policy IDs to enforce compliance.
Instructions
Block a package by adding a blocked-dependency rule to one or more FOSSA quality policies.
WRITES TO FOSSA. Requires FOSSA_ALLOW_WRITES=true.
package_locator is the versionless locator, e.g. pip+aiofile or
npm+left-pad. Omit versions to block every version; pass
versions=["3.11.1"] to block only those. policy_ids are the numeric ids
of QUALITY policies — a block rule cannot attach to a licensing, security,
or SBOM policy. Use fossa_unblock_package to reverse it.
Idempotent: re-blocking the same package on the same policy reuses the existing rule instead of adding a second one.
This uses an endpoint FOSSA does not document, captured from its web app. It may change without notice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| versions | No | ||
| policy_ids | Yes | ||
| package_locator | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||