Repository Policies

AppTrust governance for Move and Copy operations on repositories.

Repository Policies let you govern your repositories the moment a package is moved or copied into a local repository in Artifactory.

Where AppTrust lifecycle policies evaluate artifacts as they progress through defined application lifecycle stages, Repository Policies evaluate artifacts at the point of a specific Artifactory action. The underlying policy rules are the same for both lifecycle and repository policies – only the scopes differ. For Repository Policies, you define a policy scope that targets one or more local repositories.

If a package violates the policy, the action is blocked (or flagged with a warning, depending on how the policy is configured) and the user or CI pipeline receives immediate, actionable feedback explaining why.

Why use Repository Policies

Repository Policies expand your control and governance across your Artifactory repositories. They provide key capabilities for your workflows:

  • Immediate enforcement: Create a policy and enforcement begins right away, scoped to the repositories you choose.
  • Governing critical repositories: Protect and govern critical repositories—such as your production repositories—to ensure they remain trusted.
  • Flexible lifecycle governance: Ideal for development lifecycles that do not require full application version promotion, allowing you to achieve robust governance through policy enforcement on your desired repositories.

How it works

You create a policy and scope it to one or more local repositories (up to 200 repository keys per policy). The policy defines:

  • Operation Type: The actions it gates: Move, Copy, or both
  • Rule Condition: The governance rule to evaluate, such as a critical CVE severity threshold
  • Decision: One of the following results:
    • Pass: The rule is satisfied and the operation is performed.
    • Fail: AppTrust will not perform the requested operation.
    • Warning: AppTrust will perform the operation, but issue a warning that the rule was actually violated.
    • Error: The evaluation could not be completed, and AppTrust will not perform the operation.

When you or CI pipeline performs a matching operation — for example, moving test_package-1.0.0.tar.gz into prod-npm-repo — AppTrust evaluates the applicable policies before the operation completes. If the package violates a policy, AppTrust blocks the action and displays a banner. Afterwards, you can view which policies passed or failed, and switch to Triggered Issues to inspect the specific findings — such as CVE IDs and severity scores — that caused the failure.

Every evaluation, whether triggered from the UI or the API, is recorded and audited in the Evaluation page with the actor, action type, artifact, policy name, result, and timestamp, so you can always trace back what happened.

Scope and permissions

Repository Policies apply only to local repositories.

Creating, editing, or deleting a repository-scoped policy is restricted to users with Administrator role in the JFrog Platform. Non-administrator users don't see the repository scope option in the policy wizard.

What is supported

Repository Policies support the following package formats:

  • Supported Packages: npm, PyPI, NuGet, Gems, Cargo, Composer, Bower, Pub, Hex, CRAN, Swift, Chef, Puppet, Ansible, Vagrant, Helm, TerraformBackend, YUM, Alpine, Opkg, Conda, P2, Skills, AgentPlugins, AgentPackages, AIEditorExtensions, JetBrainsPlugins, VCS.
  • Package Evaluation: Each package moved or copied to the selected repositories will be evaluated to determine if evidence exists to meet the policy. If the evidence does not exist, the policy will fail or issue a warning (depending on the policy decision); otherwise, it will pass.

Waivers are currently not supported for repository policies.

Security Policies

For security policies, you must ensure that the repository source (the repository from which items are moved or copied) is enabled in JFrog Xray. Without scanning available for the relevant package on the source repository, the policy will fail due to missing scanning data, ensuring that policies only pass with verified proof.

Required configurations in Xray:

  • The source repository should be enabled in Xray, and package scanning needs to be completed.
  • Advanced security policies may require additional configuration in Advanced Security, such as:
    • Contextual analysis: For applicable CVE scanning.
    • Secrets: For secret exposure policies.

What’s Next?

The following pages walk you through creating and managing Repository Policies, including scoping a policy to repositories, choosing operation types, and reading evaluation results.


Did this page help you?