This page is docs/GUARD.md in the repository. The repository copy is the source; this is the same text with its links rewritten for the wiki.
When VeilVoice says a file changed
VeilVoice keeps a record of what its own files look like and compares them against it. This page is what that record is, what a report of a change actually tells you, and what to do about one.
The short version, which the program itself says on every path through this feature: it detects, it does not prevent, and a report of a change is not by itself evidence of an attack.
What the record is
The first launch that finds no record writes one: for each watched file, its size and its SHA-256. By default that is the running program and the app lock beside it. Every launch after that compares the files against the record and shows the answer on the Lock tab.
Nothing has to be switched on and there is no command to remember. That is deliberate, and it is a correction: veilvoice guard init was a command you had to know about, which meant the people most likely to be targeted were the people least likely to have run it.
The record is taken at first launch rather than at install, because installing a package runs as an administrator and the record belongs to the account that will run the program. A record written into the administrator's own configuration directory describes a file nobody checks.
Sealed, and not sealed
With an app lock set, the record is sealed under your app-lock passphrase, and the check runs at the moment you unlock, because that is the one moment the passphrase exists in memory. Somebody who changes the program file now has to change the record too, and to do that they need your passphrase.
With no app lock, there is no passphrase to seal it with, so the record is written in the clear and the Lock tab says so in those words. It still catches a file that changed by accident, a half-finished update or a careless overwrite. It does not catch somebody who thought to rewrite the record as well, and a record sealed under a key kept beside it would be a decoration rather than a protection.
This is the single most important thing on this page. An unsealed record is a consistency check. A sealed one is a tamper check. They look identical in the window except for the sentence that says which one you have, so read that sentence.
What a report of a change means
It means the bytes on disk are not the bytes that were recorded. It does not say who changed them or why, and it usually cannot: naming the program responsible needs system auditing that is switched off on most machines, so most of the time VeilVoice will honestly report that it does not know.
Work through these in order.
Did you just update? Then the change is the update, and this is the whole of the ambiguity: an update you installed and a file somebody swapped are identical on disk. There is nothing clever to be done about that, so UPDATING.md says how to make the difference in advance, by checking the new archive's signature before you put it in place.
Did anything else touch the folder? An antivirus product that rewrites executables, a packaging tool that re-signs them, a backup restore, a half-finished copy or a disk that ran out of space during one all produce this report and none of them is an attack.
Neither of those? Then treat it as a possible tamper, and the response is the same as for any binary you are unsure about: do not run it, fetch a fresh release, and check that release against the published signature as described in GUIDE_VERIFY.md. Do not use the suspect copy to do the checking, for the obvious reason.
Taking the record again
Once you know why a file changed and you are satisfied with the answer, record the new state:
veilvoice guard init --sealed
--sealed asks for a passphrase and seals the record with it. Without the flag the record is written in the clear, with the limits described above.
Watching more than the program
The window watches the program and the app lock. The command line does the same job and takes a list, so it can watch anything you want it to notice changing, which is how a policy file or a set of configuration files gets the same treatment:
veilvoice guard init --sealed ./veilvoice ./policy.toml
veilvoice guard check --watch-dir ./plugins
veilvoice guard status
check compares the watched files against the record. --watch-dir also reports files that have appeared in a directory, which is the other half of the question: a file that was added is invisible to a record of files that already existed. status says where the record is kept and what it is worth, and prints the same account of its limits that the window shows.
init, check and status read the same record the window uses, so a record taken in one is seen by the other.
What it does not do
- It does not prevent a change. Nothing here can; a program cannot protect its own file from a process with the rights to rewrite it.
- It is not tamper-proof unless the record is sealed, and then only as far as your passphrase is.
- It does not name what changed a file, except on a machine with system auditing on.
- It does not check anything except the files it was told to watch. It is not an antivirus product and does not scan.
Where to go next
UPDATING.md: why an update looks exactly like a tamper, and what to do about it.GUIDE_VERIFY.md: checking a release against the published signature, which is the check this one is not.USER_GUIDE.md: the app lock, and the rest of the window.COMMANDS.md:veilvoice guardin the list of every command.
This page is also Doc-GUARD in the GitHub wiki, and both are generated from the same document in the repository.