Skip to main content
← Policy Library
POLICY

Allow approved plugin packages

Require statically inspected plugin packages to have an approved manifest name before installation or execution.

policy.d/allowed-plugin-packages.yaml
View source ↗
Policy reason

Only approved plugin packages may be installed or activated

policy.d/allowed-plugin-packages.yaml
apiVersion: atmos/v1
kind: Policy
metadata:
name: allowed-plugin-packages
description: Require statically inspected plugin packages to have an approved manifest name before installation or execution.
spec:
policies:
allowed-plugin-packages:
on: plugin
action: deny
reason: Only approved plugin packages may be installed or activated
with:
allowed_plugins:
- acme/oidc
- acme/platform
rule: >-
input.phase == 'package' && !(input.name in params.allowed_plugins)

1 Configure

Set with.allowed_plugins to exact metadata.name values from the plugin manifests you approve. These are package names such as acme/oidc, not the project's aliases, OCI repository paths, or capability names. Entries do not support wildcards or namespace-prefix matching.

The rule applies only in the package phase, after static inspection makes the manifest name available. The earlier source phase carries an empty name and does not match this rule. Installation, cached activation, publication, signing, and conformance testing must still pass the package check. Approved local development packages pass this rule; a separate registry or signature policy can still reject them. The registry library policy also denies explicit offline layout imports, even when the layout claims an approved repository.

Use approved plugin registries alongside this policy to block unapproved destinations before network access. A package can claim an approved name; pair these rules with signature verification to authenticate its publisher. source is the declared repository, not proof of publisher identity. Protect the project lockfile used to select cached releases. These policies cannot weaken signature requirements.

2 Save

Save the CEL policy as policy.d/allowed-plugin-packages.yaml. Install only one implementation of each policy.

Atmos discovers policy.d/ at the project root selected by atmos.yaml discovery. Set ATMOS_POLICY_DIR to use another directory.

3 Run

atmos plugin install oci://registry.example.com/team/oidc --as corporate --version 1.2.0

Review required tools and callback settings before running. In CI, load policies from a protected, pinned revision. See enforcement configuration.

Explore inputs and expected decisions →