Agent Installation and Configuration
The Wisec agent is a self-contained Go binary designed to run in any CI/CD environment (GitLab CI, GitHub Actions, Jenkins, etc.). It collects build information, generates an immutable event, signs it cryptographically, and sends it to the Wisec API Gateway.
Requirements
- A Linux-based CI/CD runner (e.g.,
alpine:latestorubuntu:latest). gitinstalled in your CI/CD environment (for collecting commit, branch, and file change data).gitleaksinstalled in your CI/CD environment (for collecting secrets and sensitive data).curlto download the agent binary.- A Wisec account with at least one project created.
- A generated Agent Signing Key (Private Key) from the Wisec dashboard.
Core Agent Integrations
The Wisec agent is built to be "environment-aware" and automatically uses common tools to enrich the data it collects.
-
git: The agent usesgitcommands (git log,git diff) to automatically collect critical information about the commit, author, branch, and which files were changed or deleted. This is essential for providing context to the build event. -
gitleaks: If the agent detects thatgitleaksis installed in the environment, it will automatically run it to scan for hardcoded secrets. The results are bundled into the event payload, providing immediate visibility into secret leaks directly within the Wisec dashboard. The secret itself never leaves your CI: the agent runs gitleaks with--redactand keeps only the rule, the file and the line of each finding (since v1.2.0). Since v1.5.0, the reports the agent reads as inputs (the SARIF report ofWISEC_SCAN_REPORT_PATHand the SBOM) are not scanned for secrets: they quote code and vulnerability texts that gitleaks mistakes for keys, and a real secret they quote is still found in its source file. You can add a.gitleaksignorefile to your repository to manage false positives.
1. Download the Agent
The Wisec agent binary is served from a public Scaleway Object Storage bucket, in the EU, for easy and reliable access. Pin a version and verify its checksum before running it: an unpinned binary cannot be reproduced or audited after the fact, which is precisely what Wisec exists to avoid.
curl -fsSLO https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64
curl -fsSL https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64.sha256 | sha256sum -c -
mv wisec-agent-v1.5.0-linux-amd64 wisec-agent
chmod +x wisec-agent
The agent is open source under Apache 2.0. Every release is also published on the GitHub releases page, with binaries for Linux and macOS on amd64 and arm64, and a SHA256SUMS file. Use whichever source your runner can reach; the object storage mirror exists for runners that have no access to GitHub.
The unversioned https://wisec-downloads.s3.fr-par.scw.cloud/agent URL always points at the latest build. It is convenient for a quick trial, but pin a version for any pipeline you rely on.
2. Environment Variables
The agent requires the following environment variables to be configured in your CI/CD pipeline's settings (e.g., GitLab CI/CD Variables, GitHub Actions Secrets). These should be marked as secret/masked variables to prevent accidental exposure.
-
WISEC_PROJECT_ID:- Purpose: The unique identifier for the project in Wisec where this pipeline's events will be logged.
- Value: Obtain this from your Wisec dashboard's "Projects" page (in the "Project ID" column) or from the creation confirmation modal.
- Example:
1(if it's your first project)
-
AGENT_PRIVATE_KEY_HEX:- Purpose: The private part of your Ed25519 signing key pair. The agent uses this to cryptographically sign each event, ensuring immutability and authenticity.
- Value: Generate this from your Wisec dashboard's Settings page, under "Agent Signing Keys". Copy the displayed private key immediately.
- Example:
f0e1d2c3b4a5968778695a4b3c2d1e0f102132435465768798091a2b3c4d5e6f(a long hexadecimal string)
-
WISEC_API_ENDPOINT:- Purpose: The full URL of the Wisec API Gateway endpoint where pipeline events should be sent.
- Value:
https://api.wisec.io/api/v1/events
-
WISEC_BINARY_PATH(optional, not secret):- Purpose: The path of the file your pipeline delivers (binary,
.jar, archive). The agent computes its SHA-256 and the SLSA provenance then names that file as what was built. See Binding the proof to the delivered artifact. - Example:
dist/myapp
- Purpose: The path of the file your pipeline delivers (binary,
-
WISEC_IMAGE_DIGESTS(optional, not secret, agent v1.3.0+):- Purpose: The container images your build pushed, pinned by digest, separated by commas, spaces or newlines. Each one becomes a subject of the SLSA provenance. See Container images.
- Example:
rg.fr-par.scw.cloud/acme/api@sha256:9f86d081884c7d65...
Note on API keys
API keys (wsk_…, Pro plan), created from the Settings page, are for the API for integrations: read access you hand over, for instance, to a partner you mandate. The wisec-agent does not use them: it authenticates with its signing key.
3. Binding the proof to the delivered artifact (optional)
By default, the SLSA provenance Wisec issues for a build identifies it by its source commit: it proves which revision was built, with which dependencies and which scanners. It does not name the file you ship.
To bind the proof to that file (a binary, a .jar, an archive), set WISEC_BINARY_PATH to its path. The agent computes its SHA-256 and signs it with the build record, and the provenance names that digest as its subject. Anyone who receives the file can then check it is the one that was attested: sha256sum <file> must print the value found in subject[0].digest.sha256.
The agent must then run after the build, since the file has to exist when it starts. In the examples of the integration guides, wisec_notify runs alongside the build so that the CVE analysis starts as early as possible. To bind the artifact, run it once the build is done and give it the file; each guide shows how (GitLab, GitHub Actions, Azure DevOps, Jenkins). The trade-off: the analysis starts later, so the gate may wait a little longer.
Good to know:
- One file per build. If your build produces several, point at the one you deliver, or at an archive that contains them.
- If the file is missing or unreadable, the build is still notarized, but the provenance falls back to the source commit. Check it on the attestation page of the dashboard: the subject reads
artifact sha256:…when the binding worked,source commit …otherwise. - For a container image, do not use
WISEC_BINARY_PATHon adocker saveexport: its digest is not the one registries and tools verify. Declare the image itself, as below.
Container images
Since agent v1.3.0, the provenance can also name the container images your build pushes. Set WISEC_IMAGE_DIGESTS to their references pinned by digest (registry/repo@sha256:<hex>), separated by commas, spaces or newlines. Each image becomes a subject of the provenance, next to the file from WISEC_BINARY_PATH if you set one. A reference without a digest is ignored: a tag can be moved to another image, so only the digest identifies what was built.
Use the digest the registry returns when you push. Depending on your tooling:
# docker push: the registry digest is recorded once the image is pushed
docker push "$IMAGE"
docker inspect --format '{{index .RepoDigests 0}}' "$IMAGE"
# docker buildx
docker buildx build --push --metadata-file meta.json -t "$IMAGE" .
echo "$IMAGE@$(jq -r '.["containerimage.digest"]' meta.json)"
# Kaniko
/kaniko/executor --destination "$IMAGE" --digest-file digest.txt
echo "$IMAGE@$(cat digest.txt)"
# crane, for an image already in the registry
echo "$IMAGE@$(crane digest "$IMAGE")"
For a multi-platform image, declare the digest of the index, which is what all these commands return, not the digest of a single platform. Recent Docker versions (29 and later) also attach their own provenance attestation to every build and push an index even around a single-platform image; some registries, including GitLab's, reject it with blob unknown to registry. Set BUILDX_NO_DEFAULT_ATTESTATIONS=1 in the build job to push the plain image. Anyone can then check the attestation against the registry: docker pull <image> or crane digest <image> prints the digest, which must equal digest.sha256 of the matching subject.
4. Integrate into your CI/CD Script
Once the agent is downloaded and environment variables are set, you can integrate it into your CI/CD pipeline script. Refer to the Quick Start Guide for an example.