Documentation
¶
Overview ¶
Package blobsig verifies a sigstore (cosign keyless) signature of a downloaded file, offline: the certificate chains to the Sigstore public good Fulcio roots, the signature is in the Rekor transparency log (the inclusion proof and signed timestamp travel in the bundle), and the certificate names exactly the signer the caller expects (OIDC issuer and subject, for a GitHub workflow its file and ref).
Sensors use it before they install content that runs on tenant code (the sast-rules bundle, for example): a mirror, a proxy or a compromised download host cannot substitute files, because only the expected release workflow can produce a valid bundle.
The trust root (trusted_root.json, the Sigstore public good instance's Fulcio CAs, Rekor and CT log keys) is embedded and refreshed with SDK releases, so verification needs no network.
Stability: Beta (docs/STABILITY.md).
Index ¶
Constants ¶
const GitHubActionsIssuer = "https://token.actions.githubusercontent.com"
GitHubActionsIssuer is the OIDC issuer of GitHub Actions workflow identities.
const MaxBundleBytes = 1 << 20
MaxBundleBytes bounds a bundle a caller reads before Verify.
Variables ¶
This section is empty.
Functions ¶
func Verify ¶
Verify checks bundleJSON, a sigstore bundle (cosign sign-blob --bundle), as the signature of the content read from artifact, made by want.
func VerifyDigest ¶
VerifyDigest is Verify for an artifact the caller already hashed (SHA-256).
Types ¶
type Signer ¶
Signer is the identity a signature must carry: the certificate's OIDC issuer and its subject (SAN), both compared exactly.
func GitHubWorkflow ¶
GitHubWorkflow is the signer identity of a GitHub Actions workflow run: https://github.com/<repo>/<workflowPath>@<ref>, for example GitHubWorkflow("openctemio/sast-rules", ".github/workflows/release.yml", "refs/tags/v0.1.0").