Policy management

Centralize control over your entire software supply chain - every package, dependency, format, and team - before software reaches developers, pipelines, or production.

Cooldown policies

Hold new package versions back for a set window so nothing untested lands in a build and package managers just resolve to the latest version that passes.

Security and Compliance Features

Features to safeguard your teams, customers, and reputation. Cloudsmith is a central checkpoint for software integrity.
Continuous risk detection
Surface newly disclosed risks automatically with continuous monitoring of packages against the latest security advisories.
Standard policies
Protect against CVEs, license compliance violations, malicious packages, and unwanted packages with built-in policy types.
Docs
Policy as code
Define rules with OPA/Rego, enforced automatically across every pipeline.
Docs
Cooldown policies
Prevent newly published packages from being consumed until a configurable time window elapses.
Docs
Upstream trust
Prevent trusted packages from being overridden by identically-named packages from untrusted sources.
Docs
Package quarantine
Prevent packages from being distributed to teams and pipelines when they fail policy checks.
Docs
Generate SBOMs for containers
Automatically generate SBOMs for container images including transitive dependencies and license metadata.
Docs
Host SBOMs
Store and distribute SBOM files alongside their corresponding packages or container images.
Docs
License reporting
Report on license types across repositories and organizations to support compliance management.
Docs
Package signing
Sign uploaded packages automatically with GPG or RSA.
Docs
Custom signing keys
Ensure packages have not been tampered with by signing with your own custom encryption keys.
Docs
Sigstore cosign support
Automatically verify your packages as part of your build pipeline using Sigstore.
Docs
Geographic location / IP restrictions
Ensure your software doesn't flow to problematic territories or specific IP ranges.
Docs
Custom storage regions
Remain in compliance with your corporate standards by specifying storage regions for your software artifacts.
Docs
Malware scanning
Inspect package, container, and dependency contents for known malware signatures using ClamAV, included on every Cloudsmith plan.
Docs
Malicious package detection
Match every package against the OpenSSF Malicious Packages dataset via OSV.dev, catching typosquats, dependency confusion, and compromised maintainer releases.
Docs
Vulnerability scanning
Automatically scan supported package types for CVEs on upload, with on-demand and API-triggered rescans.
Docs
Continuous Security
Re-match existing artifacts against newly published vulnerability and malicious package data on an hourly basis, triggering policy action the moment a new threat appears. Early access with Enterprise Policy Manager.
Docs
Block until scan
Hold packages back from distribution until malware, vulnerability, and policy checks complete, so nothing reaches a pipeline unscanned.
Docs
GitHub secret scanning
Detect leaked Cloudsmith API keys and entitlement tokens committed to GitHub automatically, as a GitHub secret scanning partner.
Docs
Policy exemptions
Exclude specific packages from policy evaluation for legitimate exceptions, such as a legacy app that depends on a flagged version.
Docs

Access Control Features

Features to control who can access the packages, containers, models and data managed in your Cloudsmith workspace.
Single sign-on via social auth
Use your existing social sign-on provider to authenticate against Cloudsmith.
Teams (team-based controls)
Assign privileges and permissions to groups of users organized in teams.
Docs
Service accounts
Allow bots and services to interact with your Cloudsmith resources using dedicated service accounts.
Docs
Log exports
Take your log data away for further analysis with automated log exports.
Docs
OpenID Connect
Use ephemeral OIDC tokens to connect Cloudsmith with third-party services, without long-lasting credentials.
Docs
Single sign-on via SAML
Use your existing ID provider like Okta to authenticate Cloudsmith users.
Docs
SAML groups
Model your org's teams and permissions in your ID provider, and automatically map to Cloudsmith.
Docs
SCIM
Automatically reflect changes to your real-world org in your Cloudsmith teams and users.
Docs
API key policies
Mitigate against security breaches by ensuring keys are updated regularly and automatically invalidated.
Docs
Resources

Related security resources

blog

Securing LLM dependencies against serialisation attacks

At the time of writing, there are over 2.5 million models hosted on Hugging Face. While this democratisation of AI is changing how all work and develop with AI, it also introduces a massive supply chain risk. Every time a developer runs from_pretrained(), they are essentially pulling an opaque blob of data from a public registry. The core of the issue? We often don't know the provenance of these models, their true licensing constraints, or (most importantly) what code is tucked inside their weight files. What is a Pickle and why is it dangerous? In the Python ecosystem, Pickling is the standard way to serialise object structures into binary. In machine learning, it is the default format for PyTorch weights (.pt, .pth, .bin). However, the Pickle protocol is not just a data format; it is a stack-based virtual machine. When you unpickle a file, you aren't just reading data, you’re also executing a sequence of instructions (opcodes). The Security Flaw: Pickle was never designed to be secure against erroneous or maliciously constructed data. A malicious actor can craft a pickle file that, when opened, executes arbitrary code on your machine, like opening a reverse shell or exfiltrating environment variables. Visualising the attack with Picklescan You can see this in action using open-source tools like picklescan. By scanning a known dummy malicious model (ykilcher/totally-harmless-model), we can see exactly where the trap was set. Again, this is a dummy model. It’s not actually malicious. To my knowledge it doesn’t do anything. This is purely to demonstrate what a picklescan is looking for: The Result: The scanner identifies a dangerous global: the model is calling eval() during the load process, which executes the arbitrary code. This is the smoking gun of a serialisation attack. Outputs look like this: The scanner can also load Pickles from local files, directories, URLs, and zip archives. For the purpose of demonstration, let’s scan the pytorch_model.bin file associated with the sshleifer/tiny-distilbert-base-cased-distilled-squad model on Hugging Face: Preventing model serialisation attacks with Modelscan As discussed above, ML models are shared publicly over the internet, within and across teams. The rise of Foundation Models resulted in increasing consumption and further training/fine tuning of public ML models. Because developers use ML models to make critical decisions and power mission-critical applications, it makes sense that there would be more than one open-source scanning option, especially when vulnerabilities can appear in other scanners such as Picklescan. Modelscan is an open source project from Protect AI that scans models to determine if they contain unsafe code. It is the first model scanning tool to support multiple model formats. ModelScan currently supports: H5, Pickle, and SavedModel formats. This protects you when using PyTorch, TensorFlow, Keras, Sklearn, XGBoost, with more on the way. Scanning the entire local Hugging Face cache on my Macbook with Modelscan showed nothing suspicious when I scanned the original ykilcher’s Totally Harmless Model we downloaded earlier. To test this, we create a simple make-bad-model.py file: Then run the below commands to create the model and scan it with Modelscan: The above Python script provides a classic example of why pickling is dangerous and why tools like Modelscan exist. When you use __reduce__, you tell Python exactly how to reconstruct the object when it's loaded. By putting os.system or webbrowser.open inside that method, you turn a simple data file into an executable script. Once you point Modelscan at the correct filename, it should successfully flag test_critical.pkl because it detects the use of the os.system global within the pickle stream. When you’re done, you can clean up all the newly-created files with the below command: Defensive strategies with Cloudsmith To secure your AI pipeline, you should adopt a defence-in-depth strategy: Prefer safetensors: Use the new safetensors format, which is designed to be zero-copy and, crucially, non-executable. This is the ideal starting point. Vetting imports: Because some models force us to use file formats considered “less safe” than safetensors, we should only load models from trusted organisations, where possible. For example, I trust Nvidia or Google more than random publishers on the internet. Cross-format conversion: Use from_tf=True to load models from safer formats like JAX or TensorFlow when available. Automated protection with Cloudsmith’s Rego policies Manually scanning every model isn't scalable. This is where Cloudsmith comes in. In a previous blog post, we explained how to use Cloudsmith as your private proxy for AI models, and how to enforce Hugging Face policies in Enterprise Policy Manager (EPM) to automatically block potentially infected or unsafe models before they ever reach a developer's machine. Example 1: Blocking based on scan results The nice thing for Hugging Face users is that Hugging Face Hub already performs Pickle Scanning on all LLM Models. It then flags a model as safe or not. This Cloudsmith .rego policy rejects ingesting any model Hugging Face’s internal security scan did not mark as "SAFE". But as discussed earlier, we can run standalone picklescan almost anywhere to scan for files deemed insecure and verify those results against the existing Cloudsmith scans. However, it might be worth considering a more restrictive approach to the risky file formats that we accept into production. Example 2: Reducing the potential attack surface by extension If your LLMOps and security teams have standardised on the safetensors format, you can explicitly block legacy or high-risk formats. This reduces the overall attack surface by preventing the entry of formats known to support execution (like .pkl or .joblib). Do not blindly trust model weights Like a funhouse mirror, securing AL models isn’t always what it seems. Securing generative AI is about more than just protecting the code – it’s about protecting the data that behaves like code. By utilising flexible Rego policies within Cloudsmith, you move from a reactive posture (scanning after the fact) to a proactive one (blocking by policy). Check out our upcoming webinar with great insights about Hugging Face and evolving AI threats: Want a broader framework for protecting AI artifacts and model supply chains? Explore our practical guide to securing non-deterministic systems in LLMOps.

blog

NX npm Supply Chain Attack: How Cloudsmith Would Have Contained the Blast Radius

On August 26, 2025, attackers published malicious versions of the popular Nx build system and several plugins to npm, abusing a post-install script (telemetry.js) that ran on Linux and macOS to sweep developer machines and CI for secrets (SSH keys, GitHub/npm tokens, API keys, crypto wallets). Uniquely, the payload also tried to co-opt local AI CLI tools (Claude, Gemini, q) to help with recon and exfiltration, one of the first documented cases of malware doing so. 

blog

Policy Management Example: Quarantine Packages Using Policy as Code

Cloudsmith's policy management capabilities are built on Open Policy Agent (OPA), using Rego to define policy as code. These policies control how packages move through your systems. They're versioned, reviewable, and enforceable. Policy management is in early release, but it already draws on extensive metadata Cloudsmith collects from your artifacts: format, version, tags, license, vulnerability, malware scan results, and digital signatures. Policies tap into this data to take action based on what matters to your team. This article follows the example provided by Ciara Carey, a Solutions Engineer at Cloudsmith, shown in the video below. Viewing Code-Based Policies From the Cloudsmith interface, navigate to the Policies section. Select the Block Risky Packages policy to view the policy-as-code rules, written in Rego, for an example policy. These code-defined policies give you fine-grained control over artifact behavior. Exploring Policy Code This policy evaluates multiple risk indicators across all known vulnerabilities for a package to determine whether it should be flagged and quarantined. These indicators include CVSS and EPSS scores, the presence of a patch, and the age of the vulnerability. Adding Declarations At the top of the code, we set up our policy as code, written in Rego, with the necessary dependencies: We then declare the match variable to store whether the vulnerability matches our criteria: We’re testing against parameters including EPSS and CVSS scores, repo name, age, and CVE exclusion, and these are declared as variables: Detecting a Match The match is determined using a match if block, which evaluates the conditions for each vulnerability and sets match to true if all pass: This example uses a nuanced policy that checks for several risk factors before it triggers an action. Let’s examine these checks and the code they use. Target Repository and Iterate Vulnerabilities Make sure we are targeting our preferred repo: Then loop through each reported vulnerability. The policy then applies the conditions to every vulnerability in the dataset. A vulnerability is bound to the vulnerability parameter: Apply and Evaluate Conditions for Each Vulnerability The following checks are then applied to each vulnerability for the package: CVE on a user-maintained ignore list – Skips known and accepted vulnerabilities to reduce unnecessary noise: This uses a simple Rego helper rule to check if the vulnerability is in the ignore CVE list: Fix availability – This check ensures that a patched version of the package exists. If not, the policy will not trigger: Exceeds CVSS score threshold – Evaluates the severity of any vulnerability using a configured CVSS threshold: This uses a helper rule to check if the EPSS score exceeds our limit: Exceeds EPSS score threshold – Evaluates the likelihood of vulnerability exploitation using the configured EPSS threshold: And the helper rule: Check age of vulnerability – This checks the vulnerability's age by comparing its published date to a threshold of 30 days ago. This gives the vulnerability a grace period to establish itself. If the vulnerability was published before that date, it meets the age condition for further evaluation: Putting it all Together You can see the full listing below: Actioning and Enabling the Policy Using the Actions panel, you can add a series of actions taken in response to a policy trigger. In this example, Cloudsmith performs the following automated actions: Tags the package as "risky" – Adds a visible marker so teams can immediately identify problematic artifacts. Quarantines the package – Blocks the artifact from being downloaded, deployed to infrastructure, or promoted to other repositories. Once the actions have been added, toggle the switch to the right of the policy name to ensure the policy is active. Triggering the Policy To test the policy, upload a package that matches the policy conditions. For example, one with a known vulnerability that exceeds the configured CVSS and EPSS thresholds. Click Repositories and select one for upload. Then use Push/Pull Package to push a package that triggers the policy. Cloudsmith automatically scans the package, extracts metadata, and applies the policy. In the example, if the conditions match, Cloudsmith: Tags the package as risky Quarantines it to block deployment, download, and promotion Logs the decision for audit and review Using the API The API offers a range of instructions to manage policies as part of policy management. For example, use the simulate API to test policies without enforcing them. This returns results as if the policy were active, helping teams validate changes safely. Checking the Decision Log Open the decision log to examine how the policy responded. Locate the policy ID and view the result. The interface shows the evaluated Rego policy and the triggered event's full context. You'll find detailed metadata from the package, including: Checksum values Vulnerability scan results Tags Repository name This information forms the basis for policy evaluation. Scroll to the bottom to see what actions the policy took. The decision log provides a transparent record of what happened and why.

Frequently Asked Questions

Q&A on Cloudsmith's software supply chain security features. Book a demo with our team to get answers tailored to your situation.
  1. Standard policies cover vulnerabilities, licenses, malware and package deny rules. For anything more specific, write your own policy as code in OPA Rego and enforce it across every repository and format.

  2. A cooldown policy holds back newly published package versions until a window you set has passed, giving the security community time to vet them. Package managers resolve to the latest compliant version instead. Cooldown policies apply to Go, Maven, npm, NuGet and Python packages from public upstreams.

  3. Detection runs automatically for supported formats, with no configuration required. Packages are checked against trusted threat intelligence on upload and again on a recurring basis, so newly identified malicious packages are matched against artifacts you already hold. Results feed into your policies, so you can quarantine matches automatically.

  4. Yes. Cloudsmith automatically scans supported package types for CVEs on upload, and you can trigger further scans from the web app or the API. Scan results can drive policy actions such as quarantine.

  5. Continuous Security re-matches artifacts already in your workspace against newly published vulnerability and malicious package data. When a new threat appears, your policies re-evaluate the package and take action without a manual rescan.

  6. Yes. Cloudsmith generates SBOMs so you can trace exactly what each package contains, and signs the packages you publish so downstream consumers can verify authenticity and integrity before use.

We are here to help!
Speak with one of our experts to see Cloudsmith’s feature set in action and get tailored advice to fit your use case