Skip to main content
The Truthlocks Protect GitHub Action creates cryptographic proofs of authorship for your code and build artifacts on every push, pull request, or release. Each protected file gets an attestation anchored to the transparency log, giving you a timestamped, verifiable record of when the content existed.

Prerequisites

Quick start

Add the following workflow to your repository:
Store your Truthlocks token as a repository secret named TRUTHLOCK_TOKEN.

Inputs

You must provide either files or directory. If both are omitted, the action exits with an error.

Categories

Use the category input to classify the protected content: code, research, design, media, dataset, ai-output, writing, digital-art, other

Outputs

The action provides three outputs you can reference in subsequent workflow steps:

Using outputs in your workflow

Examples

Protect source files on push to main

Protect build artifacts on release

Private protections

Set visibility: private to protect content without listing it publicly. Private protections are still verifiable by attestation ID but do not appear in your public portfolio.

How it works

The action:
  1. Installs the @truthlock/protect CLI
  2. Authenticates using your token
  3. Computes a SHA-256 hash of each file (the file content is never uploaded)
  4. Mints an attestation for each hash, anchored to the transparency log
  5. Outputs the attestation IDs and a verification badge URL
Each attestation is a cryptographic proof that the file existed with that exact content at the time of the workflow run.

Protect CLI

Protect files from the command line for local workflows.

Content protection

Full guide to protecting content and sharing proof links.