Skip to main content

Package Rules

A package rule targets a piece of software by name in a package catalog (for example a Homebrew cask or an npm package) rather than by a raw hash or Team ID. Workshop resolves the package to its concrete identifiers and materializes ordinary execution rules from them. As new versions are published, Workshop re-resolves the package and adds rules for them. When a version or binary no longer passes your CEL filters, Workshop removes its rules. You manage one package rule instead of a growing list of hashes. See How rules stay in sync for what each sync adds, updates, and removes.

One package rule can cover many versions and, depending on the rule type, many binaries per version. That reach is what makes the filters below useful: they let you narrow a broad package rule down to exactly the versions and binaries you want to trust.

info

Package rules are a licensed feature. If the package rule form is not available, talk with us to get access.

Creating a package rule​

Open Rules → Package and click Create Package Rule. A package rule has a few core fields plus the optional filters described later.

Package source and name​

Pick the Package Source that hosts the software, then enter the Package Name as it appears in that catalog:

SourceName example
Homebrewwget (formula)
Homebrew Caskfirefox (cask)
NPMexpress
GitHubowner/repo
Rust (crates.io)rustls
VS Codepublisher.name
Terraform Pluginhashicorp/aws
URLa direct download URL
Nixripgrep (nixpkgs)

For a Homebrew formula or cask from a third-party tap, enter user/tap/name. For example, after brew tap atlassian/acli, enter atlassian/acli/acli. Do not enter the tap's GitHub repository (atlassian/homebrew-acli). Workshop reads only public taps. If the tap is private, Workshop cannot find the package.

You can paste several names at once, such as the output of brew list --formula --full-name for Homebrew or brew list --cask --full-name for Homebrew Cask. The --full-name flag writes tap packages in the user/tap/name form. Each name becomes its own package rule, with the same source, policy, tags, and filters. Each tag you select also creates its own package rule, so 3 names and 2 tags create 6 package rules.

Workshop looks the package up in the catalog and reports how many execution rules it will create so you can see the reach before saving. When you add more than one name, that estimate is skipped.

Catalogs often keep old names as aliases: pkg-config and pkgconf are the same Homebrew formula. Workshop keeps the name you entered and shows the name it resolves to next to it, on both the package rules list and the rule's detail page.

Tags​

Package rules respect the same tag scoping as other rules. Select at least one tag. Pick the global tag to apply the rule everywhere, or pick one or more other tags to limit it to the hosts that carry them.

Policy​

The Policy decides what the materialized execution rules do:

  • Allow: permit the package's binaries to run.
  • Allow as Compiler: allow the binaries and treat them as trusted compilers for transitive allowlisting.
  • Block: prevent the package's binaries from running.
  • CEL: evaluate a CEL expression at execution time to decide allow or block.

For Block and CEL policies you can set an optional Custom Block Message (shown to the user when execution is blocked, HTML supported) and a Custom URL for a help or appeal link.

Preferred rule type​

A package rule materializes into execution rules of the type you pick under Preferred Rule Type:

Rule typeMaterializes toPer-binary filter
Binaryone rule per binaryavailable
CDHashone rule per binaryavailable
Signing IDone rule per signing identitynot applicable
Team IDone rule per signing identitynot applicable
Certificateone rule per signing identitynot applicable

Binary and CDHash are the only types that expose per-binary identifiers, so the binary-selection filter is available only for them. The signing-identity types cover every binary signed with that identity, so there is nothing per-binary to filter.

Rule type fallback​

Workshop picks the rule type separately for each version and build target. If no binary in a build has an identifier of the preferred type, Workshop uses the next type in this order:

  1. Team ID
  2. Certificate
  3. Signing ID
  4. CDHash
  5. Binary

Workshop moves only down this list. For example, a Signing ID rule can fall back to CDHash or Binary, but it never falls back to Team ID or Certificate. Ad-hoc signed binaries, for example many Nix builds, have no usable signing identity. If no binary in a build has a signing identity, Workshop creates CDHash or Binary rules for that build. If only some binaries in a build have a Team ID, Workshop creates the Team ID rule, and the other binaries in that build get no rule.

2026.9 CDHash and Binary rules match only the builds that Workshop read. When a Team ID, Certificate, or Signing ID package rule has CDHash or Binary rules, its details page shows the warning Some binaries are matched by hash. To match these binaries by hash on purpose and clear the warning, change the preferred rule type to CDHash or Binary.

Simple filters​

Every package rule can be narrowed with the built-in filters, all optional:

  • Min Release Date and Max Release Date: keep only versions released within a date window.
  • Version Filter: an RE2 regular expression matched against the version string (for example ^1\. to pin to the 1.x series).

Homebrew version strings can have two suffixes. _N is a formula revision, and -N is a bottle rebuild. A version can have both, for example 3.14.2_1-1. If your Version Filter ends with $, write it so that it also matches these suffixes. For example, ^3\.14\.2([_-].*)?$ matches 3.14.2, 3.14.2_1, and 3.14.2_1-1.

These filters decide which versions Workshop asks the catalog about, so they control what gets added. If you narrow a simple filter later, rules that were already materialized stay in place. To make narrowing remove existing rules, use the version selection CEL filter instead. For example, version.startsWith("1.") as a version selection filter removes rules for versions outside the 1.x series, while ^1\. as a Version Filter only stops adding them.

Advanced CEL filters 2026.7​

Two optional CEL expressions give you finer control than the simple filters. Open Advanced (CEL Filters) in the package rule dialog to set them.

Both filters:

  • Must evaluate to a boolean. true keeps the version or binary, false drops it.
  • Remove rules as well as add them. If a version or binary that was covered stops passing a filter, Workshop removes its rules on the next sync. For the Binary and CDHash rule types, a rolling window such as version_rank <= 5 retires old versions as new ones ship. For Team ID, Certificate, and Signing ID, Workshop removes a rule only when no kept version uses the same identifier. Most versions share one identifier, so these rules usually stay.
  • Are ANDed with the simple filters above and with each other. A version or binary is covered only if every filter that applies to it returns true.
  • Are evaluated by Workshop when it materializes the rule, not by Santa at execution time. This is a different, smaller surface than the execution-context CEL described in the CEL Guide: there is no execution context here, so no target.* signature fields, args, ancestors, or return-value keywords like ALLOWLIST, only the variables listed below and a boolean result. (The target variable in the version filter below is unrelated to execution CEL's target: here it is a plain build-target string.)

Version selection​

The Version Selection filter runs for each build of each version. A version can ship several builds, one per platform target, and target lets you filter those individually. Use it to soak-test new releases, keep only the newest few versions, or drop builds for platforms you do not ship.

Variables:

VariableTypeDescription
versionstringThe version string, e.g. 1.25.0
released_attimestampRelease date of this version. For Homebrew, the date Homebrew published it
targetstringBuild target, e.g. arm64_tahoe. See Build targets
latest_released_attimestampRelease date of the newest version in the filtered set
version_rankint1 for the newest version, increasing for older ones
version_countintNumber of versions in the filtered set

version_rank, version_count, and latest_released_at are computed over the versions that already passed the simple filters (date window and version regexp), not the entire upstream catalog. Tightening a simple filter changes all three.

2026.9 Some versions have no known release date. If the result of your filter depends on released_at or latest_released_at for such a version, Workshop leaves that version undecided: it adds no rules for the version and removes none it already has. For example, both released_at < now() - days(30) and released_at > now() - days(365) leave it undecided. If any version in the filtered set has no release date, latest_released_at is unknown for every version, because the undated version can be the newest. Versions from the URL source never have a release date, so a filter that depends on the date leaves every URL version undecided. Do not use a date filter on a URL package rule. Some old versions, and sometimes the first version of a package, also have no date. After each sync, the package rule details page shows how many versions are undecided. Once the release date is known, the next sync applies your filter as usual. A filter that does not depend on the date, such as version_rank <= 5, still applies to the version.

Helper functions (the same relative-time helpers used elsewhere in Workshop CEL):

now() // the current time
today() // the current date at UTC midnight
days(N) // a duration of N days

Use now() - days(30) for relative windows. CEL's duration() literal does not accept a day suffix (duration("30d") is invalid), so build day-scale durations with days(N).

Examples:

// Soak new releases: only trust versions at least 30 days old.
released_at < now() - days(30)
// Keep only versions released within 60 days of the newest one.
released_at >= latest_released_at - days(60)
// Keep only the five newest versions.
version_rank <= 5
// Drop a build target you do not deploy.
!target.contains("big_sur")
// Only versions released in roughly the last year.
released_at > today() - days(365)

Build targets​

The target value depends on the package source:

Sourcetarget value
HomebrewThe bottle tag, for example arm64_tahoe, arm64_sequoia, sonoma, or all. A bottle is the prebuilt archive that brew install downloads. A tap formula without bottles has arm64, amd64, or default
Homebrew CaskFor homebrew/cask, a macOS tag such as arm64_sequoia, or default. For a tap cask, the architecture that the cask declares, or default
GitHubThe name of the release asset
NPMany, or the operating system and CPU of the build
Rust (crates.io)any
URLany
Terraform Plugin<os>_<arch>, for example darwin_arm64
NixThe Nix system, for example aarch64-darwin
VS CodeThe extension platform

Some installers change a binary when they install it, so the installed binary has a different hash from the download. Workshop also adds the hash that the binary has after installation, as a separate build. One download can have more than one installed hash, so Workshop adds a build for each. Each of these builds has a suffix on its target:

SuffixInstaller
_brew_codesignHomebrew
_brew_rubymacho6Homebrew
_gh_extension_16kgh extension install on Apple silicon
_gh_extension_4kgh extension install on Apple silicon

A Homebrew binary that Homebrew relocates and signs at install time has only the suffixed builds, for example arm64_sequoia_brew_codesign and arm64_sequoia_brew_rubymacho6. It has no build with the plain arm64_sequoia target. For this reason, do not compare target with ==. Use startsWith:

// Keep the Apple silicon Sequoia builds, including the installed variants.
target.startsWith("arm64_sequoia")

Binary selection​

The Binary Selection filter runs once per binary within a matched version. It is available only for the Binary and CDHash rule types, which create one rule per binary. Use it to allow a package's main executable while excluding the bundled helper binaries it ships.

Variables:

VariableTypeDescription
pathstringPath of the binary inside the package, e.g. Firefox.app/Contents/MacOS/firefox
hashstringSHA-256 hash of the binary
cdhashstringCode directory hash of the binary

Paths are package-relative: they include the bundle root (for example Firefox.app/Contents/MacOS/firefox, or wget/1.25.0/bin/wget for a formula), not a path anchored at Contents/. Match with contains and endsWith rather than startsWith so a rule keeps working regardless of the bundle name:

// Exclude bundled helper binaries (auto-updaters, embedded frameworks, etc.).
!path.contains("/Contents/Frameworks/")
// Allow only the app's main executable.
path.endsWith("/Contents/MacOS/firefox")

Versions Workshop covers​

Workshop reads a limited number of versions for each package:

SourceVersions
Homebrew (formulae and third-party tap casks)Up to 250
Homebrew Cask (homebrew/cask)The current version only
GitHubUp to 250 releases
Terraform PluginUp to 250
NPMUp to 100
NixUp to 100 for each system
Rust (crates.io) and VS CodeUp to 10
URLOne version each time the file changes. The version string is the SHA-256 hash of the file

Workshop skips GitHub prereleases, but they count toward the 250 releases.

For homebrew/cask, Workshop reads only the current version, and it keeps each version that it read. Versions from before Workshop first read the cask have no rule. If the vendor signs the app with a Developer ID, use the Team ID or Signing ID rule type, which also match versions that Workshop did not read.

Some old versions are not available. For example, Workshop cannot read a Homebrew version whose bottle is no longer published. If you need rules for a version that Workshop does not cover, create an execution rule of type Binary for it.

Nix builds​

Hosts install Nix packages from a channel, so Workshop reads only the Hydra builds that a nixpkgs channel released. Hydra is the build service of the Nix project. It reads these channels:

  • nixpkgs-unstable
  • The newest release channel, for example nixpkgs-26.05-darwin
  • Older release channels that released an update recently

Each rebuild of a version has a different binary, so Workshop reads every channel build of each version. The limit of 100 versions applies to each system, for example aarch64-darwin. The release date of a version is the date of its newest successful Hydra build. This date can move later, but it never moves earlier.

Removed packages 2026.9​

If Homebrew removes a formula or cask after Workshop first read it, the rule shows Removed upstream. Workshop keeps the existing rules, but it adds no new versions. For new versions, add execution rules of type Binary, or create a package rule for the new name if the package moved. The package rules list shows the same badge, and the package rule form shows a warning when you enter the name.

If Homebrew removed a formula or cask before Workshop first read it, Workshop cannot find the package, and the form says that it cannot find it. Create execution rules of type Binary for the versions you need.

How rules stay in sync​

Workshop re-resolves a package rule when you create or edit it, when the catalog reports a change to the package, and on a timer every 25 to 35 minutes. Use the Sync Execution Rules action on a package rule to run a sync now.

Each sync runs three stages:

  1. Remove. Workshop checks the rules the package rule already manages against the preferred rule type and the CEL filters. Rules that no longer pass are removed.
  2. Filter. The catalog's current list of versions goes through the same filters.
  3. Add and update. Rules for anything in that list that is not materialized yet are added. Rules whose policy no longer matches the package rule are updated. This stage never removes a rule.

In practice:

  • A version the catalog no longer reports keeps its rules. Catalogs re-index packages and purge old history, so a missing version is not a reason to remove rules. To remove every rule a package rule created, delete the package rule and check Also delete all execution rules associated with this package.
  • A policy change applies to every rule the package rule manages, including rules for versions the catalog no longer reports.
  • Narrowing a simple filter stops adding rules but does not remove existing ones. Narrowing a CEL filter does both.
  • If you change the preferred rule type, rules for the versions the catalog currently reports are replaced with the new type. Rules for versions it no longer reports keep the old type.

Sync status 2026.9​

The package rules list and the package rule details page show the result of the last sync:

StatusMeaning
Not synced yetWorkshop did not sync the rule yet. The package rules list shows -.
Identifiers availableThe sync finished, and Workshop has identifiers for the package.
No macOS binariesWorkshop has no binaries for the package after the simple filters, so it adds no rules. Either the package has no macOS binaries, or your Min Release Date, Max Release Date, or Version Filter excludes every version.
Ingestion incompleteWorkshop did not finish reading the package. Workshop tries again on the next sync.
Validation failedWorkshop did not find the package, or the package cannot be used.
Ingestion failedWorkshop found the package but was not able to read its binaries.
ErrorThe sync stopped because of an error.

On the details page, two statuses always show a longer text: "Ingestion OK, but package has no binaries" and "Ingestion incomplete, check back later".

The dot next to the status is red when the status is Validation failed, Ingestion failed, or Error. It is amber when the status is Ingestion incomplete. It is also amber when the status is Identifiers available but no version matched in this sync and no version is undecided. That sync adds no rules. It is gray when the status is Not synced yet. In all other cases the dot is green, also for No macOS binaries.

When a sync fails, Workshop shows the reason. The reason is under the status on the details page, and it shows when you hover over the status in the package rules list.

After a sync that finishes, the details page shows how many versions match your filters, for example "12 of 40 versions match your filters." A version matches when it passes your filters and has at least one binary that Workshop can make a rule for. The second number counts the versions that Workshop read and that passed the simple filters. It does not count versions that Workshop does not cover. The page also shows how many versions are undecided, and it lists up to 20 of the newest versions that did not match. If no version matches, change your filters, or look at the list of versions that did not match to find the cause.

A version has no rule 2026.9​

If a version that your hosts run has no rule, do these steps:

  1. Open the package rule details page. Read the status and the failure reason.
  2. Look for the version in the list of versions that did not match. If it is there, your CEL filters drop it, or Workshop found no binary in it that it can make a rule for. Make sure that you compare target with startsWith, not ==.
  3. If the details page shows undecided versions, the version can have no release date. See version selection.
  4. If the version is not in the list, look at the count of versions that the list does not show. Then make sure that your Version Filter allows the Homebrew _N and -N suffixes, and that your Min Release Date and Max Release Date allow the version. If those allow it, Workshop does not cover the version. See Versions Workshop covers. Create an execution rule of type Binary for it.
  5. After you change the package rule, run Sync Execution Rules.

Materialized rules are ordinary execution rules and are enforced by Santa like any other. See Rule Packs for the related mechanism that materializes a curated set of rules maintained by North Pole Security.