Kernels documentation
kernels verify-signature
Get started
Use kernels
QuickstartUse layersLock kernel versionsEnvironment variablesProjects using kernelsMigrate from older versionsKernels securityFAQ
Python API
kernels CLI
Overviewkernels cache lskernels infokernels describe-apikernels variantskernels versions (deprecated)kernels lockkernels downloadkernels benchmarkkernels verify-signature
Build kernels
Write kernelsBuild with NixDevelop locallySet up your IDESet up for Metal kernelsDevelop kernels with agentsSecure your kernelsGitHub Actions & HF Jobs
kernel-builder CLI
Advanced practices
Kernel specifications
Concepts & design
Resources
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.18.1).
kernels verify-signature
Use kernels verify-signature to verify the metadata signature and check
that kernel files match the digest embedded in the metadata.
This command requires the sigstore package, which is installed with the sigstore extra: pip install "kernels[sigstore]".
Usage
kernels verify-signature <repo_id> <version> [--all-variants] \ [--filter-unsigned] [--filter-no-digest]
What It Does
- Checks that the signing identity in
metadata.json.sigstoreis approved. - Verifies that
metadata.jsonis not tampered with, using the signature inmetadata.json.sigstore. - Verifies that other kernel files are not tampered with, using the digest
in
metadata.json.
Examples
Verify version 1 of the kernels-community/relu kernel. Only checks
the variant that is compatible with the current system:
kernels verify-signature kernels-community/relu 1
Verify all build variants of the same kernel:
kernels verify-signature kernels-community/relu 1 --all-variants
Example Output
$ kernels verify-signature kernels-community/relu 1
✅ torch211-cxx11-cu126-x86_64-linux: the metadata is correctly signed and the files match the digest in the metadata
$ kernels verify-signature kernels-community/flash-attn2 1
❌ torch211-cxx11-cu126-x86_64-linux: not signed, so its integrity cannot be verifiedOptions
| Option | Description |
|---|---|
--all-variants | Verify all build variants of each kernel instead of just the variant that is compatible with the current system. |
--filter-no-digest | Skip variants that do not have a digest in the metadata (typically older builds that precede code signing). |
--filter-unsigned | Skip variants that do not have a detached signature (typically older builds that precede code signing). |