Cosign
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
Container images signed and verified with cosign, https://github.com/sigstore/cosign, signed with a key, with or without a transparency log, verified against that key or keyless against the identity in a Sigstore certificate.
One model type, @dataverket/cosign/signer, one signing identity. sign signs images named by digest with annotations, verify checks them against the public key, or keyless against a certificate identity and its OIDC issuer, and records what it found, verified or not, so a workflow can assert; attest attaches a predicate file as an attestation of a type and verifyAttestation checks those; signBlob and verifyBlob do the same for a file, with a Sigstore bundle beside it; describe records cosign's version and the public key in effect with its fingerprint; generateKeyPair makes a key pair and records it with the private key as a sensitive field, in the vault. The private key is a PEM from a vault expression, a KMS or HSM reference, or a key file: a PEM reaches cosign through its environment, never a file or an argument, and never appears in a record, a log or an error. Tags are refused: what is signed is a digest.
With tlog false, the default, signatures go to the registry only, through a signing config with no transparency log that the model generates per run; with tlog true they are recorded in Rekor and a log entry is required to verify. A signing config or trusted root of your own, for private Sigstore infrastructure, replaces that. Two workflows: @dataverket/cosign-sign signs digests with a key from a vault and verifies them; @dataverket/cosign-verify gates on a public key, read-only. A skill, cosign, says which to run for what, and how to put a key in the vault. Written against cosign 3.1.4.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| key? | string | The private key: a PEM, written as a vault expression; a KMS or HSM reference (awskms://, gcpkms://, azurekms://, hashivault://, k8s://, pkcs11:); or a key file, absolute or relative to the repository root. Empty for a signer that only verifies |
| password? | string | The key's passphrase, written as a vault expression; empty for an unencrypted key |
| publicKey? | string | The public key verify checks against: a PEM, or a file absolute or relative to the repository root; derived from key when empty |
| certificateIdentity? | string | For keyless verification: the exact identity the signing certificate must name, such as a GitHub workflow URL; verify, verifyAttestation and verifyBlob then check the certificate and its log entry instead of a public key. Needs oidcIssuer and tlog true |
| certificateIdentityRegexp? | string | For keyless verification: a regular expression the certificate's identity must match, instead of certificateIdentity |
| oidcIssuer? | string | For keyless verification: the OIDC issuer that vouched for the identity, such as https://token.actions.githubusercontent.com; required with an identity |
| tlog? | boolean | Record every signature in a transparency log and require a log entry when verifying; false signs through a signing config with no log service and verifies ignoring the log. Keyless verification requires true |
| signingConfig? | string | A Sigstore signing config file for sign and attest, relative to the repository root, such as one naming a private Rekor or TSA; replaces what tlog chooses |
| trustedRoot? | string | A Sigstore trusted root file for sign, attest and verify, relative to the repository root, for private infrastructure |
| insecureRegistry? | boolean | Allow a registry whose certificate does not verify |
| httpRegistry? | boolean | Allow a registry served over plain HTTP |
| cosignBinary? | string |
| Argument | Type | Description |
|---|---|---|
| annotations? | array | Annotations carried by every signature, key=value |
| recursive? | boolean | For an image index, also sign every image in it |
| upload? | boolean | Push the signature to the registry; false signs and discards, a rehearsal |
| Argument | Type | Description |
|---|---|---|
| annotations? | array | Annotations a signature must carry to count, key=value |
| Argument | Type | Description |
|---|---|---|
| predicate | string | The predicate file, absolute or relative to the repository root |
| type? | string | The predicate type: slsaprovenance, slsaprovenance02, slsaprovenance1, link, spdx, spdxjson, cyclonedx, vuln, openvex, custom, or a URI |
| upload? | boolean | Push the attestation to the registry |
| Argument | Type | Description |
|---|---|---|
| type? | string | The predicate type an attestation must have to count |
| Argument | Type | Description |
|---|---|---|
| path | string | The file to sign, absolute or relative to the repository root |
| bundle? | string | Where the Sigstore bundle is written, absolute or relative to the repository root; <path>.sigstore.json when empty |
| Argument | Type | Description |
|---|---|---|
| path | string | The file to verify, absolute or relative to the repository root |
| bundle? | string | Its Sigstore bundle, absolute or relative to the repository root; <path>.sigstore.json when empty |
Resources
Sign images named by digest with a private key held in a vault, then verify every one of them against that key's public half and fail unless all verify. The key and its passphrase are named by vault and key, never passed as values, because workflow inputs are recorded in cleartext in the run history; the key reaches cosign through its environment, never a file or an argument. With tlog false, the default, signatures go to the registry only, through a signing config with no transparency log, and
Verify images named by digest against a public key and fail unless every one carries a signature that checks out, with the required annotations when any are given. Read-only: nothing is pushed anywhere. The public key is a PEM or a file in the repository, nothing secret. With tlog false, the default, the transparency log is ignored; with tlog true a log entry is required. Made to gate a deploy: run it on the digests a manifest pins before anything applies them. Its model is created on first use
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
Spawns a subprocess with Deno.Command().
- models/signer.ts:286 — no reason given