> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-gitops/security/audit-trail.md).

# Audit Trail for GitOps

Review the GitOps-specific events that Harness Audit Trail tracks, including application, agent, and repository changes.

Harness captures key GitOps events in the [Audit Trail](https://developer.harness.io/docs/platform/governance/audit-trail/audit-trail) to help you track changes, enforce governance, and meet compliance requirements. This topic lists the GitOps-specific audit events that Harness supports.

***

## What you will learn from this topic

* **Supported audit events:** Which GitOps entities Harness tracks in the audit trail, including applications, application sets, agents, repositories, clusters, certificates, and GnuPG keys.
* **System reconciler events:** How Harness records delete events that originate from the GitOps reconciler instead of the Harness UI.
* **YAML differences:** How to view the YAML difference for a GitOps audit event.

***

## Supported GitOps audit events

Harness records GitOps audit events for changes made through the Harness API as well as background changes that the GitOps reconciler triggers, for example when you delete resources directly from the cluster instead of through the Harness UI.

The following sections list the audit events Harness supports for each GitOps entity.

### Applications

Harness tracks the following events for GitOps applications:

* Create Application
* Update Application
* Delete Application
* Sync start

{% hint style="info" %}
**ApplicationSet-managed applications**

For applications that an ApplicationSet creates and manages, Harness supports only the **Delete** and **Sync start** events in the audit trail.
{% endhint %}

### ApplicationSets

Harness tracks the following events for ApplicationSets:

* Create ApplicationSet
* Update ApplicationSet
* Delete ApplicationSet

### GitOps agents

Harness tracks the following events for GitOps agents:

* Create GitOps Agent
* Update GitOps Agent
* Delete GitOps Agent

### Git repositories

Harness tracks the following events for Git repositories:

* Create Git Repository
* Update Git Repository
* Delete Git Repository

### Repository credential templates

Harness tracks the following events for repository credential templates:

* Create Credential Template
* Update Credential Template
* Delete Credential Template

### GitOps clusters

Harness tracks the following events for GitOps clusters:

* Create GitOps Cluster
* Update GitOps Cluster
* Delete GitOps Cluster

### Repository certificates

Harness tracks the following events for repository certificates:

* Create Certificate
* Update Certificate
* Delete Certificate

### GnuPG keys

Harness tracks the following events for GnuPG keys:

* Create GnuPG Key
* Update GnuPG Key
* Delete GnuPG Key

***

## System reconciler events

Harness also tracks delete events that the **GitOps reconciler** triggers.

For example, if you delete a GitOps-managed resource, such as an application or a repository, directly from the cluster (for instance, through Argo CD), Harness detects the change, reconciles the state, and records the corresponding delete event in the audit trail.

***

## View YAML differences

For each GitOps audit event, you can view the YAML difference to understand what changed.

To view the diff, do the following:

1. Click the event summary panel to open the event details.
2. Click **View YAML Difference** in the event details panel.

![GitOps audit event details panel showing the View YAML Difference option](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-37059549e179578282e08929bb356fb3c223aad8%2Fgitops-audit-logs.png?alt=media)

***

## Next steps

* Go to [Audit Trail](https://developer.harness.io/docs/platform/governance/audit-trail/audit-trail) to review audit events across all Harness modules.
* Go to [Audit streaming](https://developer.harness.io/docs/platform/governance/audit-trail/audit-streaming) to stream audit events to an external logging system.
