@@ -3,7 +3,7 @@ title: "Chainguard Libraries Verification"
33linktitle : " Verification"
44description :
55 " Learn how to verify libraries and packages are from Chainguard
6- Libraries using the chainver tool for enhanced supply chain security"
6+ Libraries using the chainctl tool for enhanced supply chain security"
77type : " article"
88date : 2025-07-03T12:00:00+00:00
99lastmod : 2025-07-23T15:09:59+00:00
@@ -18,15 +18,16 @@ toc: true
1818
1919## Overview
2020
21- Chainguard's ` chainver ` tool verifies that your language ecosystem dependencies
22- come from Chainguard Libraries, providing critical visibility into your software
23- supply chain security. By verifying binary artifacts across your projects and
24- repositories, you can ensure dependencies are sourced from Chainguard's hardened
25- build environment rather than potentially compromised public repositories,
26- identify opportunities to improve security posture, and maintain compliance with
27- supply chain security policies.
21+ Chainguard's ` chainctl ` tool with the command ` libraries verify ` verifies that
22+ your language ecosystem dependencies come from Chainguard Libraries, providing
23+ critical visibility into your software supply chain security. By verifying
24+ binary artifacts across your projects and repositories, you can ensure
25+ dependencies are sourced from Chainguard's hardened build environment rather
26+ than potentially compromised public repositories, identify opportunities to
27+ improve security posture, and maintain compliance with supply chain security
28+ policies.
2829
29- The ` chainver ` tool :
30+ Command characteristics :
3031
3132- Uses a signature-based binary identification and a checksum fallback.
3233- Supports different binary formats, including JAR, WAR, EAR, ZIP, TAR, WHL, and
@@ -36,21 +37,23 @@ The `chainver` tool:
3637
3738## Requirements
3839
39- Before installing chainver , ensure you have the following installed and
40- available on your path:
40+ Before using chainctl to verify libraries , ensure you have the following
41+ installed and available on your path:
4142
4243- [ ` chainctl ` ] ( /chainguard/chainctl-usage/how-to-install-chainctl/ )
43- — A Chainguard-maintained tool used for authentication
44+ — Chainguard-maintained tool that includes the libraries verify command.
4445- [ ` cosign ` ] ( https://docs.sigstore.dev/cosign/system_config/installation/ ) — A
45- Sigstore-maintained tool used to verify signatures
46+ Sigstore-maintained tool used to verify signatures.
4647
4748You also need:
4849
4950- A Linux, macOS, or Windows system (x86_64 or arm64)
5051- Sufficient [ network access] ( /chainguard/libraries/network-requirements/ )
52+ - Your organization [ must include entitlement for access to Chainguard
53+ Libraries] ( /chainguard/libraries/access/#entitlement )
5154
52- Confirm that ` chainctl ` and ` cosign ` are installed and available on the ` PATH ` with the following commands:
53- commands:
55+ Confirm that ` chainctl ` and ` cosign ` are installed and available on the ` PATH `
56+ with the following commands:
5457
5558``` sh
5659chainctl version
@@ -60,58 +63,7 @@ chainctl version
6063cosign version
6164```
6265
63- ## Installation
64-
65- [ Download the latest release - version 0.5.0] ( https://dl.enforce.dev/chainver/0.5.0/chainver-v0.5.0.zip )
66-
67- ### Version-Agnostic Download
68-
69- Download the latest release using ` curl ` . Note that [ ` jq ` ] ( https://jqlang.org/download/ ) must be on the path.
70-
71- ``` sh
72- LATEST_URL=$( curl -s https://dl.enforce.dev/chainver/latest/latest-metadata.json | jq -r ' .download_url' ) && \
73- curl -LO " ${LATEST_URL} "
74- ```
75-
76- Once you've downloaded the archive, unpack the platform specific archive for
77- your system, and place the binary ` chainver ` for your platform on the path.
78-
79- ### Binary Install Script (macOS and Linux)
80-
81- The following command downloads the latest version of ` chainver ` as an archive, extracts it, verifies the download, and moves the binary to ` /usr/local/bin ` .
82-
83- First, set the ` ARCH ` variable to match your system using one of
84- the following options:
85-
86- - ` Linux_x86_64 ` - Linux with x86_64 processor
87- - ` Linux_arm64 ` - Linux with ARM processor
88- - ` Darwin_arm64 ` - macOS with Apple Silicon (M1/M2/M3)
89- - ` Darwin_x86_64 ` - macOS with Intel processor
90-
91- ``` sh
92- ARCH=Linux_x86_64 && \
93- LATEST=$( curl -s " https://storage.googleapis.com/us.artifacts.prod-enforce-fabc.appspot.com/?prefix=chainver/" | \
94- grep -oE ' chainver/[0-9]+\.[0-9]+\.[0-9]+/' | \
95- sed ' s|chainver/||g' | sed ' s|/$||g' | \
96- sort -V | tail -1) && \
97- curl -LO " https://dl.enforce.dev/chainver/${LATEST} /chainver-v${LATEST} .zip" && \
98- unzip -q chainver-* .zip && \
99- cd chainver-package && \
100- EXT=$( [ " $ARCH " = " Windows_x86_64" ] && echo " zip" || echo " tar.gz" ) && \
101- ./verify-signatures.sh archives/chainver_${LATEST} _${ARCH} .${EXT} && \
102- if [ " $ARCH " = " Windows_x86_64" ]; then \
103- unzip -q archives/chainver_${LATEST} _${ARCH} .zip; \
104- else \
105- tar xzf archives/chainver_${LATEST} _${ARCH} .tar.gz; \
106- fi && \
107- sudo mv chainver /usr/local/bin/ && \
108- cd .. && rm -rf chainver-* .zip chainver-package && \
109- chainver version
110- ```
111-
112- ## Authentication Setup
113-
114- ### Using chainctl
66+ ## Authentication and configuration
11567
11668You can authenticate with your Chainguard organization using ` chainctl ` . First,
11769initiate the login flow:
@@ -120,109 +72,106 @@ initiate the login flow:
12072chainctl auth login
12173```
12274
123- Log in using one of the provided options:
75+ TBD CONFIRM
76+ If you are member of one organization only, you can proceed to use `libraries
77+ verify` and other commands.
12478
125- Find your organization name:
79+ If you are member of multiple organizations you must provide the name of your
80+ organization using the ` --parent ` flag as follows, replacing
81+ ` <your-organization> ` with the name of your organization, with every command:
12682
12783``` sh
128- chainctl iam organizations list
84+ chainctl libaries verify --parent < your-organization > /path/to/artifact.jar
12985```
13086
131- When using ` chainver ` commands, provide the name of your organization using the
132- ` --parent ` flag as follows, replacing ` <your-organization> ` with the name of
133- your organization:
87+ To avoid the need for the additional parameter, you can configure a default
88+ organization with the following steps:
89+
90+ Find your organization name with the entitlement:
13491
13592``` sh
136- chainver --parent < your-organization > /path/to/artifact.jar
93+ chainctl iam organizations list
13794```
13895
139- ### Using Tokens
140-
141- For CI/CD pipelines or environments without ` chainctl ` , you can use a token.
142- First, [ create a pull token for Chainguard Libraries] ( /chainguard/libraries/access/#pull-token-for-libraries ) .
143-
144- Once you have your token, you can authenticate by passing it to ` chainver ` using
145- the ` --token ` flag:
96+ Set the configuration for the default group: TBD - this does NOT yet work, also maybe default.org-name instead??
14697
14798``` sh
148- chainver --token < your-chainguard-token > /path/to/artifact.jar
99+ chainctl config set default.group < your-organization >
149100```
150101
151- Alternatively, set the token as an environment variable :
102+ Verify the configuration :
152103
153104``` sh
154- export CHAINGUARD_TOKEN=your-chainguard-token
155- chainver /path/to/artifact.jar
105+ chainctl config view
156106```
157107
158- The following environment variables are supported:
159-
160- - ` CHAINCTL_TOKEN ` or ` CHAINGUARD_TOKEN ` - Authentication token
161- - ` JFROG_API_KEY ` - JFrog Artifactory access
162- - ` CLOUDSMITH_API_KEY ` - Cloudsmith access
108+ Ensure to use this configuration or add the ` --parent ` parameter in all
109+ following examples as necessary.
163110
164111## Usage
165112
166113Analyze a local ` .jar ` or ` .whl ` file:
167114
168115``` sh
169- chainver --parent < your-organization > commons-lang3-3.12.0.jar
116+ chainctl libraries verify commons-lang3-3.12.0.jar
170117```
171118
172119Analyze a container image on a registry:
173120
174121``` sh
175- chainver --parent < your-organization > cgr.dev/chainguard/nginx:latest
122+ chainctl libraries verify cgr.dev/chainguard/nginx:latest
176123```
177124
178125Analyze a local container:
179126
180127``` sh
181- chainver redis:latest
182- chainver nginx:alpine
183- chainver ubuntu:20.04
128+ chainctl libraries verify redis:latest
129+ chainctl libraries verify nginx:alpine
130+ chainctl libraries verify ubuntu:20.04
184131```
185132
186133Analyze a local image with localhost prefix:
187134
188135``` sh
189- chainver --parent < your-organization> localhost/myapp:latest
136+ chainctl libraries verify --parent < your-organization> localhost/myapp:latest
190137```
191138
192139Analyze with detailed output:
193140
194141``` sh
195- chainver --detailed /path/to/archive.zip
142+ chainctl libraries verify --detailed /path/to/archive.zip
196143```
197144
198145Analyze multiple artifacts with detailed output:
199146
200147``` sh
201- chainver --detailed artifact1.jar artifact2.zip
148+ chainctl libraries verify --detailed artifact1.jar artifact2.zip
202149```
203150
204- Receive JSON output for CI/CD integration :
151+ Receive JSON output:
205152
206153``` sh
207- chainver -o json /path/to/artifact.jar
154+ chainver libraries verify -o json /path/to/artifact.jar
208155```
209156
210- Generate inventory from repository. (Note that passing a URL from the public Maven Central repository will return a negative result, i.e. ` chainver ` will indicate that packages were not built by Chainguard.)
157+ Generate inventory from repository. Note that passing a URL from the public
158+ Maven Central repository returns a negative result, because packages were not
159+ built by Chainguard.
211160
212161``` sh
213- chainver inventory --ecosystem java remote:repo1.maven.org/maven2/org/apache
162+ chainctl libraries verify inventory --ecosystem java remote:repo1.maven.org/maven2/org/apache
214163```
215164
216165Analyze a remote artifact on Maven Central:
217166
218167``` sh
219- chainver --parent < your-organization > remote:repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
168+ chainctl libraries verify remote:repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
220169```
221170
222171Analyze a remote artifact on PyPI:
223172
224173``` sh
225- chainver --parent < your-organization > remote:files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl
174+ chainver libraries verify remote:files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl
226175```
227176
228177## Resources
@@ -231,6 +180,3 @@ chainver --parent <your-organization> remote:files.pythonhosted.org/packages/70/
231180- [ Chainguard Libraries Authentication] ( /chainguard/libraries/access/ )
232181- [ Learning Lab: Chainguard Libraries for Java] ( /software-security/learning-labs/ll202505/ )
233182- [ Learning Lab: Chainguard Libraries for Python] ( /software-security/learning-labs/ll202506/ )
234-
235-
236-
0 commit comments