Skip to content

Commit 5fc83a6

Browse files
authored
Add venv and auth info for libraries verify (#2881)
## Type of change ### What should this PR do? Add more info for `chainctl libraries verify` ### Why are we making this change? Internal user questions on slack. Fix chainguard-dev/internal#5595 ### What are the acceptance criteria? Review ### How should this PR be tested? Try with an example project.
1 parent a9be34c commit 5fc83a6

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

content/chainguard/libraries/verification.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,17 @@ chainctl libraries verify flask-3.0.1-py3-none-any.whl
116116
```
117117

118118
The analysis of wheel files is fast because the provenance information is
119-
available within the archive.
119+
available within the archive. Python development tools often unpack the wheel
120+
file and you can also scan these extracted packages. For example, if you create
121+
a virtual environment in your Python project, you can subsequently analyze the
122+
package in the virtual environment:
123+
124+
```sh
125+
python3 -m venv venv
126+
source ./venv/bin/activate
127+
pip3 install -r requirements.txt
128+
chainctl libraries verify --detailed ./venv/
129+
```
120130

121131
Analyze a local Java `.jar` file:
122132

@@ -127,7 +137,8 @@ chainctl libraries verify commons-lang3-3.17.0.jar
127137
Verifying a JAR file is performed by looking up checksums and provenance
128138
information from the Chainguard repositories. This requires network access and
129139
can take longer if you analyze multiple files or archives that contain multiple
130-
libraries.
140+
libraries. Typically, you find the JAR files in the local Maven repository cache
141+
in `~/.m2/repository`:
131142

132143
Analyze a deployment archive for your custom application that contains other
133144
libraries:
@@ -185,7 +196,9 @@ chainctl libraries verify localhost/myapp:latest
185196
The following examples use Maven Central and PyPI URLs and returns a negative
186197
result, because packages were not built by Chainguard. A practical use of this
187198
functionality points to an internal repository manager with a mixture of
188-
artifacts from Chainguard and elsewhere.
199+
artifacts from Chainguard and elsewhere. Note that authentication to the
200+
repository is not supported and you must download artifacts to a local directory
201+
as an alternative method to verify them.
189202

190203
Analyze a remote artifact on Maven Central:
191204

0 commit comments

Comments
 (0)