---
url: /gst-manager-whmcs/features/file-integrity.md
description: >-
  How GST Manager verifies its own files with HMAC-SHA256 — the four issue
  types, the component breakdown, and the Sync Status panel with Auto-Sync, Sync
  All, and template sync to your themes.
---

# File Integrity

GST Manager keeps a tamper-proof record of its own files so you can trust that what's running is
exactly what was installed. If anything about a module file changes unexpectedly — or the record
of it does — the module tells you, in plain language, under **Global Settings → Sync Status**.

![GST Manager file-integrity and sync panel](/gst-manager-whmcs/img/gst-file-integrity-panel.png)
*Addons → GST Manager → Global Settings → Sync Status*

::: info What "integrity" means here, without the jargon
Each module file gets a unique fingerprint, and that fingerprint is sealed with a secret so it
can't be quietly rewritten. This is **HMAC-SHA256** verification. In practice it means GST
Manager can detect both a changed *file* and a changed *record* of that file — you get a clear
warning either way, and you never have to compare anything by hand.
:::

## The four issue types

When GST Manager checks its files it reports one of these for anything that isn't as expected:

* **Tampered** — a file's contents changed from what was installed.
* **Missing** — a file that should be there is gone.
* **Added** — a file appeared that shouldn't be part of the module.
* **HMAC Invalid** — the sealed record itself doesn't add up, which points to record-level
  tampering rather than a file change.

A clean check reports no issues — that's the state you want to see.

## The component breakdown

So you can see *what* was checked, the panel groups files by component and shows a count for
each:

| Component | What it covers |
| --- | --- |
| **Core** | The main program files that run GST Manager. |
| **Templates** | The GST invoice templates deployed to your themes. |
| **Hooks** | The pieces that plug GST Manager into WHMCS events. |
| **Main file** | The module's entry file. |

The panel also shows the **last snapshot time**, so you know how recent the check is. A baseline
is created when you first activate the module and refreshed after each sync.

## The Sync Status panel

Alongside integrity, the same **Sync Status** panel keeps your invoice templates in step with the
verified versions:

* **Auto-Sync** — a toggle that, when on, automatically re-deploys templates to a theme whenever
  a mismatch is spotted on an admin page load. Leave it on and your templates keep themselves
  current.
* **Theme Sync Status table** — a row per theme showing its overall **Status**, the state of
  **invoicepdf.tpl** and **invoicepdffooter.tpl**, and a per-theme **Sync** action.
* **Sync All** — re-deploys templates to every theme at once.

When a sync runs you'll see a confirmation such as *"Templates synced successfully."*

::: tip Keep your active theme in sync
Template files live inside each WHMCS theme, so an update or a manual theme edit can leave them
out of date. Auto-Sync (or a quick **Sync All**) puts the correct GST templates back in place —
especially your **active** theme, which is the one customers actually see.
:::

## Where to go next

* [Setup Wizard](/gst-manager-whmcs/features/setup-wizard) — Step 7 deploys the templates
* [Configuration](/gst-manager-whmcs/configuration) — where templates and settings live
* Back to the [overview](/gst-manager-whmcs/)
