This guide needs the SafeDep Cloud Team or Enterprise plan and the Admin role. See pricing.
Block one package
- The selector is a PURL. Without a version or
--vers, the block selects every version. --verstakes a range, as'>=1.2.0'. Quote it, because the shell reads>.--reasonis required. PMG shows it in the block message. The pull request check shows it on a private repository only.--ticketand--requested-byare optional. Tools never receive them.
r_9c1x4kq7dm. Each decision of the rule cites that id.
Block a namespace
A block entry can use a prefix that ends with/* or .*:
--vers to limit it to a range. A prefix such as pkg:npm/* selects every package of an ecosystem and stops every install of it, and the command warns you.
Block a list of packages
Write one selector on each line of a file. A line can add a range after a space. A line that starts with# is a comment.
iocs.txt
-f - to read the list from standard input.
Block for one group only
By default a rule attaches to the policy base and applies to every endpoint and project. To block for the subjects of one policy override, add--override NAME:
Check the block
-
List the endpoints that did not apply the new revision yet. Use the revision number that the create command printed:
-
List the decisions of the rule:
How fast a block reaches PMG
PMG fetches the policy in the background after a command, at most once every 5 minutes. So the first install after a block can still use the previous policy. To fetch at once on one machine, runpmg cloud sync.
Remove the block
Next steps
Package Rules
Selectors, prefixes and how a block beats a trust entry.
Explain a Decision
Find the rule behind a block.
Audit Policy Changes
See who added or removed a rule.
Command Reference
Every flag of
safedep policy rule.
