Skip to content

Commit 8a12c19

Browse files
committed
updating our BUS documentation to improve clarity
1 parent 5aa1d9a commit 8a12c19

1 file changed

Lines changed: 37 additions & 65 deletions

File tree

Lines changed: 37 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,62 @@
11
import { Note, BlockImage } from '@/components'
22

3-
# Block Until Scan
3+
# Enforce package signing and policy enforcement on all downloads
44

5-
**Block Until Scan** is a security feature designed to enhance the integrity and security of software packages served by Cloudsmith, guaranteeing that all relevant security and compliance policy checks (licenses, vulnerabilities, package deny policies) are fully completed *before* a package is made available for download.
5+
Cloudsmith can enforce package signing and security policies on **every** download from upstream registries, including the very first request for a new package.
66

7-
---
7+
By default, Cloudsmith applies full signing and policy enforcement **after** the first download of a package that is proxied from an upstream registry. For stricter environments, you can enable an optional synchronous enforcement mode that blocks initial downloads until scanning and policy checks are complete.
88

9-
By enabling Block Until Scan, all package requests originating from upstreams configured in "Cache and Proxy" mode are subjected to a mandatory scanning and policy evaluation process. This ensures that only packages meeting your organization's security policies can be accessed by users.
10-
11-
Without Block Until Scan, packages could be served to clients *before* all necessary policy checks were completed (unless the package was already synced in the repository, and policy checks had been completed prior to that). This allowed for the initial download of packages that may subsequently fail policy checks.
12-
13-
## How to Use It
14-
15-
<Note variant="important">
16-
📘 The Block Until Scan feature is in **Early Access (EA)**. To enable Block Until Scan for your workspace, please [contact Cloudsmith Support](https://cloudsmith.com/company/contact-us).
17-
18-
**Workspace-Wide Setting**
19-
20-
Please note that Block Until Scan is a global setting that affects **all repositories** within a given workspace. Its activation will impact all applicable package flows.
9+
<Note variant="note">
10+
📘 This feature is in **Early Access (EA)**. To enable it for your workspace, please [contact Cloudsmith](https://cloudsmith.com/company/contact-us).
2111
</Note>
2212

23-
### Requirements
24-
25-
- **Active Security Policies**: At least one active classic policy with a _quarantine_ action enabled is required. Without such a policy, the system would have no criteria to evaluate incoming packages.
26-
- **Upstream Configuration ('Proxy and Caching' mode)**: the repository must have an upstream configured with ['Proxy and Caching'](/repositories/upstreams#supported-formats) mode enabled. Block Until Scan is explicitly applied to packages undergoing the caching and evaluation pipeline within Cloudsmith.
13+
## Default asynchronous enforcement behavior
2714

28-
### Steps to Validate Block Until Scan
15+
By default, Cloudsmith enforces policy evaluation and package signing **after** the first download of a package that is proxied from an upstream registry:
2916

30-
To verify the functionality of Block Until Scan, follow these steps:
17+
- When a package is first requested from an upstream registry in **Cache and Proxy** mode, it is served immediately.
18+
- Cloudsmith then caches, scans, signs, and evaluates the package for policy violations in the background.
19+
- After this asynchronous evaluation is complete, all subsequent requests for that package are subject to full security enforcement and will be blocked if they violate your policies.
3120

32-
#### 1. Configure an Upstream
21+
This ensures zero delay for the initial developer but means a vulnerable or non-compliant package could be downloaded once before being quarantined.
3322

34-
[Configure a repository](/repositories/upstreams) with an upstream in 'Proxy and Caching' mode. For example, enable a Python upstream with PyPI.
23+
## Synchronous enforcement mode
3524

36-
<Note>
37-
📘 Note that incoming packages from sources different to an upstream are also subjected to Block Until Scan. Downloads won't be allowed until all security checks have been completed.
38-
</Note>
25+
For environments that require maximum security at every point of access, Cloudsmith offers an optional **synchronous enforcement mode**. In this mode, every package (including the first request of a new package) is fully scanned, signed, and evaluated against policies **before** it is made available to an end user.
3926

40-
#### 2. Create a Vulnerability policy
27+
### How it works
4128

42-
Browse to your Workspace Settings and [create a new vulnerability policy](/policy-management/vulnerability-policy). Define your policy with:
43-
- A name.
44-
- A [package Search Query](/artifact-management/search-filter-sort-packages) to scope the filter to `format:python AND requests`. We're targeting only packages named `requets` from Python, following the example in the next step. Adjust the policy to affect only to your desired scope if you use a different package for this example.
45-
- A severity threshold set to `High`.
46-
- A Quarantine action enabled.
29+
When synchronous enforcement mode is enabled:
4730

48-
Then, click in **+ Create Policy**.
31+
1. When a new package is requested from an upstream registry, Cloudsmith holds the request until synchronization is complete.
32+
2. During synchronization, Cloudsmith parses the package metadata, performs security scanning, signs the package, and evaluates it against all active policies.
33+
3. If a package violates a policy with a **quarantine** action, Cloudsmith intercepts the request, moves the package to quarantine before the initial download completes, and returns `403 Forbidden` to the developer or CI/CD pipeline.
34+
4. If the policy is configured for other non-blocking actions (such as **add tag**), the package is still served, with the tag or other metadata applied.
4935

50-
#### 3. Pull a new package from your repository
51-
52-
Execute a command to pull a new package. For example, `requests==0.2.2`. This package contains a known vulnerability with a high severity CVE: `2018-18074`. If this package already exists in your repo, find a different one that hasn't been synced and cached before:
53-
54-
```bash
55-
pip download requests==1.2.0 --index-url https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
56-
```
57-
58-
<Note>
59-
📘 **Performance Impact**
60-
61-
When a package is not yet cached within Cloudsmith, every package and its dependencies must undergo a series of synchronous operations before being served:
62-
63-
* **Parsing**: The package metadata must be parsed.
64-
* **Scanning**: The package is scanned for malware, vulnerabilities, and license compliance.
65-
* **Policy Evaluation**: The package is evaluated against all active policies.
36+
<Note variant="note" headline="Tip">
37+
If a developer receives a `403 Forbidden` error during a download request, they should check the affected package in Cloudsmith to see which specific security policy triggered the quarantine.
6638
</Note>
6739

68-
#### 4. Observe Behavior
40+
## How to enable synchronous enforcement mode
6941

70-
When Block Until Scan is enabled, the initial download request for an uncached package will be temporarily blocked until the policy evaluation has completed:
71-
- **Successful Scan**: If the package passes all policy checks, the download will proceed, and the package will be served normally.
72-
- **Policy Matched**: If the package is matched against a policy, the package is processed exactly as the matched policy specifies:
73-
- If the policy's action is **quarantine**, the package is quarantined and any download attempt returns **403** Forbidden.
74-
- If the policy's action is **tag, allow**, or any other non-blocking action, the package is served normally (with the tag or other metadata applied).
42+
Once the Cloudsmith team has enabled this feature for your workspace, you must also configure the following:
7543

76-
If the package fails a policy check (e.g., due to a vulnerability or license issue), or if the scanning process encounters an unrecoverable error, the download will be blocked with a `403 Forbidden` error code.
44+
- **Configure upstreams in Cache and Proxy mode**: Configure repositories to connect to upstream registries in **Cache and Proxy** mode. If an upstream is configured in **Proxy Only** mode, downloads are held until synchronization is complete, but no policies are evaluated or enforced on that package.
45+
- **Create at least one policy with a quarantine action**: Create at least one license or vulnerability policy with a **quarantine** action. Without such a policy, the system has no criteria to evaluate incoming packages for blocking.
46+
- **Enable vulnerability scanning**: Enable **Scan for vulnerabilities** in the repository’s general settings so that Cloudsmith can run vulnerability checks as part of the enforcement process.
7747

78-
<Note variant="note" headline="First download without Block Until Scan">
79-
Without Block Until Scan, the same package would be delivered to the user immediately, before the full evaluation phase of the synchronization process had taken place. Cloudsmith would then asynchronously cache and synchronize the package after the first download. At this point, the system would apply the policy to the package and could then quarantine it. While future downloads of the package would then be blocked, this asynchronous processing means the initial downloads of the package could not be prevented if required.
80-
</Note>
48+
## What to expect when synchronous enforcement mode is enabled
8149

82-
## Summary
50+
Enabling synchronous enforcement mode can introduce additional latency and developer friction, especially for packages that are not yet cached in Cloudsmith. For each uncached package and its dependencies, Cloudsmith performs these synchronous operations before serving the download:
8351

84-
Block Until Scan helps your organization ensure that all software packages and their dependencies downloaded through Cloudsmith meet your security and compliance rules.
85-
While this scanning happens before you can download packages, the advantages are significant:
52+
- **Parsing**: Parse package metadata.
53+
- **Scanning**: Scan for malware, vulnerabilities, and license compliance.
54+
- **Evaluation and signing**: Evaluate the package against all active policies and sign it before making it available for download.
8655

87-
- **Enforce Security Policies across all your organization**: It blocks any package downloads until security checks has been completed. Only approved software components are used in your workloads, guaranteeing compliance with organizational standards and practices.
88-
- **Reduced Risk**: checking packages before running them reduces your exposure to non-compliant software.
56+
After evaluation:
8957

90-
In short, Block Until Scan is a crucial tool for securing and reducing risk in your software supply chain.
58+
- If the package passes all policy checks, the download proceeds and the package is served normally.
59+
- If the package violates a policy:
60+
- If the policy action is **quarantine**, the package is quarantined and any download attempt returns `403 Forbidden`.
61+
- If the policy action is **tag**, **allow**, or any other non-blocking action, the package is served normally, with the tag or other metadata applied.
62+
- If the package fails a policy check (for example, due to a vulnerability or license issue) or if scanning encounters an unrecoverable error, the download is blocked with a `403 Forbidden` error code.

0 commit comments

Comments
 (0)