---
title: "Simulate policy changes before saving"
description: "Test a policy against a package in your workspace, whether it's a new draft or a change to a policy that's already live."
canonical_url: "https://cloudsmith.com/changelog/simulate-policy-changes-before-saving"
last_updated: "2026-12-01T12:03:47.647Z"
---
# Simulate policy changes before saving

Test a policy against a package in your workspace, whether it's a new draft or a change to a policy that's already live.

In the web app, the policy editor has a new **Simulation** tab:

1. Select the **Simulation** tab.
2. Select a package. Simulation runs against one package at a time.
3. Review the policy input and output, including whether the policy matched the package.  


```json
{
  "_key": "d8489cc32b13",
  "_type": "image",
  "alt": "The policy simulation tab in the Cloudsmith web app.",
  "asset": {
    "_createdAt": "2026-12-01T11:45:06Z",
    "_id": "image-14c213a7683c93187a891f6808c752c58a4a92c5-1152x854-gif",
    "_rev": "nMhHPG8dGubkSwFQoOiQUE",
    "_type": "sanity.imageAsset",
    "_updatedAt": "2026-12-01T11:45:06Z",
    "assetId": "14c213a7683c93187a891f6808c752c58a4a92c5",
    "extension": "gif",
    "metadata": {
      "_type": "sanity.imageMetadata",
      "blurHash": "VUC6+Bof%gof-;~qj?R*j[WB~qj?Rkj[WB_3j[WBj@WB",
      "dimensions": {
        "_type": "sanity.imageDimensions",
        "aspectRatio": 1.3489461358313817,
        "height": 854,
        "width": 1152
      },
      "hasAlpha": true,
      "isOpaque": true,
      "lqip": "data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAPABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAUGB//EACUQAAIABQMDBQAAAAAAAAAAAAECAAMEBQYHEVETFSIhQlNxkv/EABUBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAAAAAAAAAAAAAAABEB/9oADAMBAAIRAxEAPwDOci1azelu9Yki9zllpOZVAA9BvC1NZ85DeV9nkfQidyegrGv9w2lqV677eQ5hT2ur+MfoRYjaMR1MyqrtjzZt0msxmsNyBwIIlsGt9StlYMg36re4cCCC6Jj/2Q==",
      "palette": {
        "_type": "sanity.imagePalette",
        "darkMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#3e4f60",
          "foreground": "#fff",
          "population": 0.15,
          "title": "#fff"
        },
        "darkVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#273652",
          "foreground": "#fff",
          "population": 0.4,
          "title": "#fff"
        },
        "dominant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#273652",
          "foreground": "#fff",
          "population": 0.4,
          "title": "#fff"
        },
        "lightMuted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#bdc4c4",
          "foreground": "#000",
          "population": 0.02,
          "title": "#fff"
        },
        "lightVibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#7798d4",
          "foreground": "#fff",
          "population": 0.06,
          "title": "#fff"
        },
        "muted": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#8c8c94",
          "foreground": "#fff",
          "population": 0.32,
          "title": "#fff"
        },
        "vibrant": {
          "_type": "sanity.imagePaletteSwatch",
          "background": "#3b6ec7",
          "foreground": "#fff",
          "population": 0.27,
          "title": "#fff"
        }
      },
      "thumbHash": "zPcNBYC4qKh/h4d/h+d4jW2wlAYo"
    },
    "mimeType": "image/gif",
    "originalFilename": "image1.gif",
    "path": "images/rafvlnhi/production/14c213a7683c93187a891f6808c752c58a4a92c5-1152x854.gif",
    "sha1hash": "14c213a7683c93187a891f6808c752c58a4a92c5",
    "size": 62077,
    "uploadId": "4821d5eb51337dfd3cf3b22244f9c9719ac05d8a",
    "url": "https://cdn.sanity.io/images/rafvlnhi/production/14c213a7683c93187a891f6808c752c58a4a92c5-1152x854.gif"
  },
  "link": {
    "_type": "link",
    "href": null,
    "openInNewTab": false
  },
  "markDefs": null
}
```

```json
{
  "_key": "2eeafe5dab2c",
  "_type": "callout",
  "content": [
    {
      "_key": "1d2451b29fd2",
      "_type": "block",
      "children": [
        {
          "_key": "117a0d796740",
          "_type": "span",
          "marks": [],
          "text": "Simulation does not save the policy, apply any actions, or generate a decision log. It is not available for cooldown policies."
        }
      ],
      "markDefs": [],
      "style": "normal"
    }
  ],
  "markDefs": null,
  "variant": "info"
}
```

Policy simulation is available to Ultra and Enterprise customers using policy management with [policy as code](https://docs.cloudsmith.com/supply-chain-security/policy-as-code). For details, see [Create a policy as code](https://docs.cloudsmith.com/supply-chain-security/policy-as-code/create-a-policy-as-code) in the Cloudsmith documentation.
