Set artifact filtering rules
Use allowed and blocked regular expression patterns to control which artifact names can be pushed to a registry on every push.
Artifact filtering rules use regular expressions to control which artifacts can enter a registry. You set rules at the registry level, and they apply on every push.
Two rule types are available:
Allowed patterns: a push succeeds only when the artifact name matches at least one allowed pattern. If allowed patterns are configured and the artifact name does not match, the push is rejected.
Blocked patterns: a push is rejected when the artifact name matches a blocked pattern, regardless of allowed pattern settings.
When both are set, the blocked pattern takes precedence: an artifact that matches both an allowed and a blocked pattern is rejected.
Before you begin
Your role must include Create/Edit permission on the registry. Go to RBAC and permissions for details.
Set filtering rules
In the left navigation, select Registries.
Click the registry you want to configure.
Select the Configuration tab.
In the Artifact filtering rules section, click the edit icon to open the drawer.
Enter a regex pattern in the Allowed Patterns or Blocked Patterns field, then press Enter to add it. Repeat for each pattern.
Save the setting.
Patterns are evaluated against the artifact name (excluding the registry prefix and version). Patterns are matched using standard regex, not wildcards.
Pattern examples
Restrict to production artifacts only
To allow only artifacts whose names end with -prod and reject any that start with dev-:
Allowed patterns:
.*-prodBlocked patterns:
dev-.*
This allows api-service-prod and worker-prod, and rejects dev-api-service and dev-worker.
Block a specific artifact name
To prevent a known problematic package from being pushed:
Blocked patterns:
legacy-auth-service
Allow only a namespaced prefix
To enforce that all artifacts in the registry belong to a specific team namespace:
Allowed patterns:
team-payments/.*
Considerations
Patterns apply to pushes only, not to pulls. Existing artifacts in the registry are not retroactively blocked.
If no allowed pattern is set, all artifact names are permitted unless blocked.
Each pattern must match the entire artifact name.
.*-prodmatches any name ending with-prod; use^my-service$to match a single exact name.To remove a pattern, open the Artifact filtering rules edit drawer and delete the pattern entry.
Troubleshooting
Next steps
Last updated
Was this helpful?