We are to design a pipeline that verifies container image provenance using Sigstore within a GitOps flow. This includes integration points, rollback strategy, and auditing artifacts.
Background:
GitOps: A way of implementing continuous delivery for cloud-native applications. It uses Git as a single source of truth for declarative infrastructure and applications. Tools like Argo CD or Flux CD monitor Git repos and apply changes to the cluster.
Sigstore: An open source project that provides services for software signing, verification, and provenance. Key components: cosign (CLI for signing and verifying), rekor (immutable transparency log), fulcio (code signing certificate authority), and ctlog (certificate transparency logs). It allows signing container images and other artifacts, and then verifying them.
Goal: Verify container image provenance (i.e., that the image was built from a particular source and signed by a trusted identity) in a GitOps flow. This means that when we deploy an application via GitOps, we want to ensure that the container image we are about to deploy has been signed and that the signature matches the expected provenance.
Design Considerations:
Integration Points: Where does Sigstore verification fit into the GitOps pipeline? Typically, a GitOps workflow:
Developer commits application code and container image reference (tag or digest) to a Git repository (e.g., in a K8s manifest).
GitOps operator (e.g., Argo CD) detects the change and synchronizes the cluster state to match the Git repo.
The operator applies the manifests, which may include deploying a container image.
We need to add a step that verifies the image's signature and provenance before applying the manifests. This could be done:
Before the GitOps operator applies the manifests: The operator could be configured to run a verification step (via an admission controller or as a pre-sync hook).
As an admission controller: Kubernetes admission controllers can intercept requests to create pods (or other resources) and validate them. We could have a validating admission webhook that checks the image signature using cosign or a library. This would be a cluster-level enforcement.
As part of the GitOps operator's sync process: Both Argo CD and Flux have hooks or sidecars that can run custom logic. For example, Argo CD has resource hooks and also supports an "exec" plugin for external verification. Flux has image automation and also supports policy enforcement with tools like OPA or Kyverno, but we can also integrate with Sigstore.
Given we want to integrate with GitOps, we should consider the operator's capabilities.
Rollback Strategy: If verification fails, what happens?
The GitOps operator should not apply the manifest that references an unverified image.
It should mark the application as OutOfSync or Failed and possibly alert.
The previous version (which was verified) remains deployed.
If we want to rollback to a previous version, we can revert the Git commit to the previous state. The GitOps operator will then sync to that state, which should have a verified image.
Additionally, we might want to have a mechanism to automatically rollback if a new image fails verification? That might be tricky because the Git state is the source of truth. If we push a new manifest with an unverified image, the operator will not sync it. But if we have already synced and then later the image is found to be compromised? That's a different scenario: we might need to scan images continuously? But our focus is on verification at deploy time.
However, note: Sometimes images are signed after they are pushed? Typically, we sign the image during the CI/CD build process and push the signature to the registry (or Rekor). So at deploy time, the signature should already exist. But if the signature is revoked or the key compromised, we might want to prevent deployment of that image even if it was previously verified. That requires a more dynamic check (like checking a revocation list or using a policy that says "only images signed with keys that are currently valid"). But for simplicity, we might assume that once verified at deploy time, it's okay until the next deployment.
Rollback in the context of a failed sync: The operator will keep the previous state. So rollback is simply reverting the Git commit.
Auditing Artifacts: We need to keep an audit trail of which images were deployed, their signatures, and the verification results. This might involve:
Logging verification results (success/failure) with details (image digest, signature, certificate, etc.) in a centralized logging system.
Storing the provenance information (like the build details from SLSA or in-toto) maybe in an immutable log (Rekor) and we can query it.
The GitOps operator itself might have an audit log of sync operations. We can augment it with verification status.
Also, we might want to store the verified image digests in a database for compliance.
Proposed Architecture:
We'll design a pipeline that integrates Sigstore verification into a GitOps flow using Argo CD as an example (similar for Flux).
Step-by-step:
Image Signing (CI):
During the CI build, after building the image, use cosign sign to sign the image with a key (or with an identity like GitHub Actions OIDC). The signature is stored alongside the image (in the registry's signature store) and also optionally uploaded to Rekor for transparency.
The CI also generates an attestation (provenance) using cosign attest or slsa-json and signs that too. This attestation contains details about the build (source repo, commit, builder, etc.).
The CI then updates the Git repository with the new image reference (tag or digest) and possibly the digest is immutable so we can verify against that.
GitOps Deployment:
The application manifest in Git references the image by digest (preferred) or tag. If by tag, we should also have an image digest from the registry to avoid tag mutability issues. But for verification, we need the exact digest.
Argo CD detects the change and starts a sync.
Verification Integration:
Option A: Use an Admission Controller.
Deploy a validating admission webhook in the cluster that intercepts Pod creation (or all workload resources). The webhook uses cosign verify (or a library) to check the image signature and attestations against a policy (e.g., require a signature from a specific key or issuer, and require attestation with certain predicates).
Pros: Enforces policy cluster-wide, regardless of deployment method (not just GitOps). Cons: Might add latency to every pod creation; requires running a webhook service.
Option B: Argo CD resource hooks.
Argo CD supports pre-sync and post-sync hooks. We can define a hook resource (like a Job) that runs cosign verify on the images in the manifests before the actual deployment. If the verification fails, the hook fails and the sync is marked as failed, and the application is not updated.
We can define this hook in the same Git repo as the application, so it's versioned with the app.
Example:
yaml
Detailed Design:
Components:
CI Pipeline (outside GitOps but part of the overall flow):
Push the image and the signatures/attestations to the registry.
Update the application's K8s manifest in Git (e.g., change the image tag to the new digest or tag). This commit should include the new image reference and possibly other changes.
Git Repository:
Contains the application deployment manifests (YAML) that reference the container image.
Also, may contain the Argo CD Application resource that points to this directory.
GitOps Operator (Argo CD):
Monitors the Git repo.
Upon change, it fetches the repo, renders manifests (using Kustomize/Helm).
If using a Config Management Plugin (CMP):
The plugin is invoked. It first runs the usual tool to generate manifests.
Then it scans the manifests for container images (all fields: image, containers[*].image, initContainers[*].image, etc.).
For each image, it runs cosign verify with appropriate policy (e.g., check signature against a trusted key or issuer, and check attestation for SLSA provenance). The plugin uses a configured key or uses Fulcio to verify against an OIDC identity.
If any image fails verification, the plugin exits with non-zero and Argo CD marks the sync as failed. The logs are captured.
If all pass, the plugin outputs the manifests to stdout, and Argo CD proceeds to apply them.
If not using a plugin, we could use a PreSync hook Job, but that's more complex as described.
Signature Verification:
Use cosign in the plugin. The plugin will need to have cosign installed and have access to the public keys or be configured to use Fulcio for OIDC-based verification.
Policy: We might require that the image is signed by a specific key (or a key in a trusted set) and that it has an attestation with an SLSA predicate indicating a trusted builder. The policy can be codified in the plugin script or in a separate policy file.
Rollback:
If sync fails due to verification, the application remains at the previous version.
Security Considerations:
The plugin must run with minimal privileges. It only needs network access to the container registry (and possibly Rekor) and to run cosign.
The plugin should not have access to Kubernetes cluster resources beyond what Argo CD already has (it runs on the repo-server, which is a separate pod).
The trusted public keys should be stored securely (e.g., in a Kubernetes Secret mounted into the plugin pod, or in a vault).
If using OIDC verification, we need to trust the OIDC issuer (e.g., GitHub, Google) and configure Fulcio correctly.
Scalability:
The plugin runs for every sync. Verifying multiple images might take time. We can parallelize verification within the plugin.
Caching: cosign caches public keys and transparency log entries. We can leverage that.
Alternatives:
Use Kyverno with verifyImages policy. Kyverno runs as an admission controller and can verify images. It can also generate policy reports. This is another integration point: we install Kyverno in the cluster and write a policy that requires all images to have a valid signature from a trusted issuer. This policy applies to all workloads, not just those deployed via GitOps. This might be simpler because we don't need to modify Argo CD. But the question asks for integration points within GitOps flows, so we should mention this as an alternative.
Conclusion:
We'll present a design that uses a Config Management Plugin for Argo CD to integrate Sigstore verification. We'll also discuss an alternative using an Admission Webhook or Kyverno. We'll describe rollback strategy and auditing.
Let's structure the answer:
Overview
Integration Points
CI signing
GitOps operator (Argo CD) with CMP
Alternative: Admission Controller or Kyverno
Rollback Strategy
Auditing Artifacts
Security and Operational Considerations
Example Configuration (optional, but helpful)
We'll write in a clear, structured manner.
Design: Container Image Provenance Verification with Sigstore in GitOps Flows
This design integrates Sigstore (cosign, rekor, fulcio) into a GitOps pipeline (using Argo CD as the reference implementation) to verify container image provenance before deployment. It covers integration points, rollback strategy, and auditing.
Push image, signature, and attestation to registry.
Update application manifest in Git with immutable digest (e.g., @sha256:...) rather than mutable tags.
Output: Signed image + attestation in registry; Git commit with new image digest.
B. GitOps Operator (Argo CD)
Integration Method: Config Management Plugin (CMP)
Argo CD’s CMP executes during the manifest rendering phase, before any resource is applied. This allows verification prior to sync.
Implementation:
Create a custom CMP script (e.g., verify-sigstore.sh):
bash
#!/bin/bash
# 1. Render manifests (Kustomize/Helm)
"$@" > rendered.yaml
# 2. Extract container images from rendered.yaml
images=$(yq e '.. | select(has("image")) | .image' rendered.yaml | sort -u)
# 3. Verify each image with cosign
for img in $images; do
if ! cosign verify --key /tmp/pubkey "$img"; then
echo "Verification failed for $img" >&2
exit 1
fi
done
# 4. If all pass, output rendered manifests
cat rendered.yaml
Register the CMP in Argo CD ConfigMap (argocd-cm):
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
repoURL: https://git.example.com/app.git
targetRevision: main
plugin:
name: verify-sigstore # Uses the CMP
destination: ...
Flow:
Argo CD detects Git change → renders manifests via CMP.
CMP renders, extracts images, verifies signatures/attestations with cosign.
If verification fails: CMP exits non-zero → Argo CD marks sync Failed; no resources are applied.
If verification passes: Manifests are applied → sync Successful.
C. Alternative Integration Points
ValidatingAdmissionWebhook: Cluster-wide enforcement. A webhook verifies every Pod creation using cosign. Works for any deployment method but adds latency.
Kyverno Policy: verifyImages rule with Sigstore. Simpler to deploy but less GitOps-specific.
Argo CD Resource Hook: PreSync Job that verifies images. Complex because the Job must access rendered manifests (requires extra scripting to fetch from Git at the same revision).
3. Rollback Strategy
Goal: Ensure only verified images are deployed; quick reversion to last known-good state.
Mechanism:
Automatic Block on Failure: If a new image fails verification, sync is aborted. The previous version remains deployed.
Manual Rollback:
Revert the Git commit that introduced the unverified image.
Argo CD detects the reversion → syncs with the previous image (which should pass verification).
Optional: Automate rollback via Argo CD AppProject webhook or CI job that reverts on sync failure (use with caution).
Immutable Digests: Using digests (vs tags) ensures the rolled-back image is exactly the previously verified one.
No Partial Rollbacks: Rollback is at the Git commit level, ensuring all manifests (not just image) revert consistently.
4. Auditing Artifacts
Audit trails must capture verification outcomes, provenance data, and deployment metadata.
Artifacts to Store:
Verification logs: Success/failure, image digest, signature certificate subject, attestation type (SLSA), Git commit SHA, timestamp, Argo CD app/namespace.
Rekor entries: All signatures/attestations are logged in Rekor (immutable transparency log). Query by image digest for forensic analysis.
GitOps operator logs: Argo CD audit log (sync operations, user actions).
CMP Logging: The custom plugin writes JSON audit events to stdout/stderr. Argo CD aggregates these into its logs.
Log Shipping: Use a log collector (Fluentd, Loki) to ship Argo CD and plugin logs to a central store.
Rekor Queries: Periodic jobs to pull verification events from Rekor and correlate with GitOps events.
Audit Service: Microservice that consumes events (via webhook from CMP or from log stream), enriches with SLSA provenance from Rekor, and stores in DB. Exposes API for compliance queries.
Store public keys in a Kubernetes Secret mounted into the CMP pod (or use a secrets manager).
For OIDC-based verification (e.g., GitHub Actions), configure Fulcio to trust the issuer; no key needed.
CMP Isolation: Run CMP in a dedicated, minimal container image with only cosign, yq, and required tools.
Performance: Parallelize cosign verification in CMP; cache Rekor/registry responses.
Policy Flexibility: The CMP script should read allowed issuers/keys from a ConfigMap or OCI artifact to avoid redeploying the plugin for policy changes.
Failure Modes:
Registry/Network unreachable: CMP should fail fast, block sync.
Missing signature/attestation: Fail sync.
Expired/Revoked certificates: Cosign checks revocation via Rekor? Not by default; consider integrating with Certificate Transparency logs or a CRL. For high-security, use short-lived certificates via Fulcio.
Checks signature validity and presence of SLSA attestation.
Success → outputs manifests → Argo CD applies.
Failure → exits 1 → Argo CD marks sync Failed; previous deployment stays.
Audit: CMP logs event → collected by Loki → audit service stores in DB; Rekor entry exists.
7. Trade-offs & Alternatives
Approach
Pros
Cons
Argo CD CMP
Tight GitOps integration; verification before apply; per-app policies.
Requires custom plugin; only works with Argo CD (not Flux).
Admission Webhook
Cluster-wide; works with any deployment method.
Adds pod-creation latency; central point of failure.
Kyverno
Declarative policies; easy to deploy.
Less GitOps-specific; policy evaluation happens after resource creation (validate) but still blocks.
Flux + Policy Controller
Native to Flux; uses OPA/ Gatekeeper.
Requires additional components; similar to admission webhook.
Recommendation: Use Argo CD CMP for GitOps-centric verification, supplemented by a cluster-wide admission webhook for defense-in-depth.
8. Summary Checklist
CI signs images and generates SLSA attestations.
Git manifests use immutable digests.
Argo CD configured with custom CMP that:
Renders manifests.
Extracts images.
Verifies signatures & attestations via cosign.
Fails sync on any failure.
Public keys/issuers stored securely (Secret or external).
Audit logs shipped to central store; Rekor entries correlated.
Rollback process documented (Git revert).
Optional: Admission webhook for additional enforcement.
This design ensures that only provenance-verified images are deployed via GitOps, with clear rollback paths and full audibility.
apiVersion: argoproj.io/v1alpha1
kind: HookDefinition
metadata:
name: cosign-verify
spec:
hook:
resource:
- |
apiVersion: batch/v1
kind: Job
metadata:
name: cosign-verify
spec:
template:
spec:
containers:
- name: cosign
image: gcr.io/projectsigstore/cosign:v2
command: ["cosign", "verify", "--key", "/keys/pub.key", "{{.App.Name}}/{{.App.Labels.component}}:{{.App.Spec.Image}}"]
# Actually we need to parse the manifests to get image references. Might be complex.
restartPolicy: Never
But Argo CD hook definitions are cluster-level. Alternatively, we can define a hook in the Application manifest as an argocd annotation? Actually, Argo CD supports resource.exclusions and resource.inclusions and also sync options. But hooks are defined separately.
Another approach: Use an Argo CD plugin (exec plugin) that runs verification before sync. This requires customizing the Argo CD repo-server or argocd-cmp-server? Actually, Argo CD supports custom tooling via resource.customizations but that's for health/sync. There is also the ability to define a sync wave and use a resource hook.
Simpler: Use Kustomize or Helm hooks? But the GitOps operator applies manifests directly, not via Helm unless using Helm charts.
Option C: Argo CD's ImageUpdater? Actually, ImageUpdater is for updating image tags. Not verification.
Option D: Flux's Image Verification:
Flux has built-in support for image verification with Sigstore? I think Flux has an image-reflector and image-automation controllers. There is also a policy controller? Actually, Flux has a source and kustomize/helmControllers. But for Sigstore, there is an experimental feature: fluxcd/source-controller can verify signatures? I recall that Flux has a cosign controller? Not exactly.
Flux has a ImagePolicy resource that can check if an image is signed? I think there is a community plugin: fluxcd/image-verify? Possibly.
Alternatively, we can use Kyverno policy for image verification. Kyverno can check signatures using cosign as a CLI in a policy? Kyverno has a verifyImages policy that integrates with Sigstore. That might be a good option because it can be used with any GitOps tool.
Given the above, the most straightforward and cluster-wide approach is to use a ValidatingAdmissionWebhook or a Kyverno policy. But the question asks for integration points within GitOps flows. So we should present a design that is specific to GitOps operators.
Let's choose Argo CD as the GitOps operator and use a resource hook to run a verification Job before the actual application resources are applied. This keeps the verification logic in the Git repo alongside the app, and it's triggered only for that app.
But we must note: The hook runs as a Job in the cluster, so it needs permissions to access the container registry and maybe Rekor. Also, the hook must extract the image references from the manifests that are about to be applied. That's tricky because the manifests are not applied yet. However, Argo CD hooks can be defined as separate resources that are applied at a specific point in the sync. The hook can be a Job that uses the same manifests (or parses them) to get the image names. But the hook runs after the manifests are rendered? Actually, the hook is a separate resource that Argo CD applies during the sync. The hook can have access to the application's source, but it's not trivial.
Alternatively, we can use an Argo CD plugin that runs on the repo-server during the manifest generation phase. Argo CD supports custom tooling via resource.customizations and also has the ability to run arbitrary commands as part of the argocd-cmp-server (the cluster's execution environment for Kustomize/Helm). But that's more advanced.
Another idea: Use Argo CD's sync waves and a pre-sync Job that verifies the images. The Job would be defined in the same Git repo and included in the application's manifest set. We can use an argocd.argoproj.io/hook: PreSync annotation on that Job. That Job will run before other resources. The Job would need to know which images to verify. We can pass them as environment variables or arguments. But then we have to maintain the image list in two places? We can generate the Job from a template that picks up the image from the Deployment spec? That's not straightforward because the Job is applied at the same time as the Deployment, so it cannot read the Deployment's spec before it's created.
Perhaps a better approach is to have a separate verification step that runs on the GitOps operator side (controller) before it applies the manifests. This would require modifying the operator's code or using an admission controller that is only triggered for resources managed by Argo CD? Not easily.
Considering the complexity, I think the most practical is to use a ValidatingAdmissionWebhook that verifies every Pod creation. This is independent of GitOps but ensures that no pod with an unverified image is ever created. The GitOps operator will attempt to create the pod, the admission webhook will check, and if it fails, the creation is rejected. The sync will fail. This gives a consistent policy across all deployment methods.
But the question asks for integration points within GitOps flows. So we should describe both: an integration point in the GitOps operator (using hooks or plugins) and also an alternative using admission control.
Given the prompt, we need to design a pipeline, so we can propose:
CI: Sign images and attestations.
GitOps Operator (Argo CD): Configured to use a pre-sync hook that runs a verification Job. This Job uses cosign to verify the images referenced in the application's manifests. To get the image references, we could have the Job read the manifest files from the Git repo (since the Job runs in the cluster, it might not have the Git repo content unless we mount it? But the Job is applied to the cluster, it doesn't have direct access to the Git repo. However, the Job container image could include a script that fetches the manifest from the Git repo? That's messy.
Actually, Argo CD provides the application's source in a ConfigMap or as part of the revision? There is a way: The hook can be defined with a template that uses the same source as the application? Not directly.
Alternatively, we can avoid the hook and instead use a post-render hook? Argo CD has a concept of resource.modifications but that's for modifying resources before applying.
After reading Argo CD documentation: Argo CD supports resource hooks (lifecycle hooks) that are resources with specific annotations. These hooks are applied at the specified hook phase (PreSync, Sync, PostSync). The hook resources are created before other resources in the PreSync phase. The hook can be any resource, including a Job. The Job can have a command that verifies the images. But how does it know which images to verify? We could pass the image names as arguments from the Application spec? Argo CD does not directly pass parameters to hooks. However, we can use environment variables from the Application's parameters? Not directly.
Another approach: The hook Job can query the Argo CD API to get the list of resources that are about to be applied? Possibly, but that's complicated.
Given these challenges, maybe the best is to use a GitOps operator that supports policy evaluation before sync. For example, Argo CD can integrate with Open Policy Agent (OPA) or Kyverno? Actually, Kyverno can be used as an admission controller, but also it can run in a policy report mode. But for blocking deployments, we want the check to happen at sync time.
Wait: Argo CD has a feature called Resource Filters and also Health Checks. But not for verification.
I recall that Argo CD has an exec plugin for custom health/verification? There is a concept of resource.customizations where you can define a custom health check for a resource. But that's after creation.
Actually, Argo CD sync process:
Generate manifests (via Kustomize/Helm or plain YAML).
Compare with live state.
Apply changes (create/update/delete resources).
We want to intercept after step 1 (we have the manifests) but before step 3. That's exactly what a resource hook with PreSync does: it runs before any resource is applied. So if we can define a hook that verifies the images in the generated manifests, we can fail the sync if verification fails.
How to get the generated manifests? Argo CD stores the rendered manifests in a ConfigMap? Actually, Argo CD's repo-server renders the manifests and sends them to the Application Controller. The Application Controller then applies them. The hook resources are also part of the manifests? The hook is defined in the same Git repo, so it gets rendered too. But the hook Job runs before other resources. The Job could have access to the rendered manifests because they are in the same revision? Not necessarily, because the Job is applied after the manifests are generated but before they are applied to the cluster. The Job container could potentially read the manifest files from the application's source if we mount them as a volume? But the Job is a Kubernetes resource; it doesn't automatically mount the source code.
However, Argo CD has a feature: App Project and Application with a source that points to a Git repo. The hook Job could be configured to use a container image that includes a script to clone the Git repo at the specific revision? That would require network access and credentials. But we can use an Argo CD secret to provide a token? That's possible.
But that seems heavy.
Alternative: Use Argo CD's sync options to run a plugin? There is an experimental feature: --plugin? Actually, Argo CD supports config management plugins (CMP) that are executed on the repo-server to generate manifests. That's during the manifest generation step. We could write a CMP that not only generates the manifests but also verifies the images in those manifests, and fails if verification fails. This would prevent the sync from even starting if verification fails. That's a clean integration point.
So, we can design a Custom Config Management Plugin for Argo CD that:
Calls the usual Kustomize/Helm to generate manifests.
Parses the generated manifests to extract all container image references.
For each image, runs cosign verify (or uses a library) to check signature and attestations.
If any verification fails, the plugin exits with error, and Argo CD marks the sync as failed and does not apply the manifests.
If all pass, the plugin outputs the manifests as usual.
This plugin would be configured in the Argo CD argocd-cm ConfigMap and then used by specific applications by setting spec.source.plugin field.
That seems like a solid integration point.
Similarly, for Flux, we could write a Kustomization or HelmRelease controller that has a verification step? Flux uses Kustomize and Helm as well, and it has a concept of Kustomization that runs on the cluster? Actually, Flux's source-controller fetches the sources and then the kustomize-controller or helm-controller renders and applies. We could modify the kustomize-controller to include a verification step? Or we could use a mutating webhook to inject a verification init container? That's not for verification.
Given the complexity of modifying Flux, maybe for Flux we would rely on admission control or Kyverno.
But the question says "inside GitOps flows", so we need to describe integration points for both? Or we can pick one and describe.
Since the design should be generic, we can describe two possible integration points:
Pre-sync verification plugin (Argo CD CMP or Flux custom controller).
Admission controller (cluster-wide).
We'll focus on the plugin approach for Argo CD as a primary example.
Rollback Strategy:
When the verification plugin fails, the sync is aborted. The application remains at the previous version (which was successfully synced and verified).
To rollback manually, the operator reverts the Git commit to the previous state and triggers a sync. That sync will run verification on the previous images (which should pass) and apply.
There is no automatic rollback because we don't want to deploy an unverified image. So if a new image fails verification, the deployment is blocked. The team must fix the issue (sign the image correctly or use a different image) before merging.
However, if we want to automatically rollback after a failed verification of a new version, we could have a process that automatically reverts the Git commit? That's risky because maybe the Git commit also changed other configs. But we could have a script that triggers a revert if sync fails? That might be part of the GitOps operator? Not typically.
So, rollback is manual via Git revert.
Auditing Artifacts:
We need to log verification results. The plugin (or admission webhook) should log to a central logging system (e.g., Loki, Elasticsearch) with details: timestamp, application, image, digest, signature certificate subject, verification result, and the Git commit SHA.
Additionally, we should store the attestation data (the provenance) in an immutable store (Rekor) as part of signing. So auditing can query Rekor for the image's provenance.
We can also have a compliance database that records every successful deployment with the image digest and the associated Git commit. This could be a simple SQL table populated by the GitOps operator or a sidecar.
The GitOps operator's own audit logs (Argo CD has an audit log) should also be correlated.
We can design a separate audit service that listens to events from the GitOps operator and from the verification component, and aggregates them.
To rollback, an operator reverts the Git commit to the previous one. The next sync will run verification on the old images (which should pass) and apply, effectively rolling back.
Optionally, we can configure Argo CD to automatically rollback to the previous version if a sync fails? Argo CD has an auto-rollback feature? Actually, Argo CD has syncOptions: Prune=false etc. It doesn't automatically rollback on failure. But we could set up a webhook that on sync failure, automatically creates a PR to revert? That's custom.
Auditing:
The plugin should log verification results to STDOUT/STDERR, which Argo CD captures and stores in its logs. We can configure Argo CD to ship logs to a central system.
Additionally, we can have the plugin send an audit event to a central audit service (via HTTP) with details: app name, namespace, image, digest, verification status, Git commit, timestamp, and the signature details (if verified).
The audit service stores these in a database and also indexes them for search.
The attestation data (the SLSA JSON) is stored in Rekor when we signed it, so we can always retrieve it later for forensic analysis.