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.Documentation Index
Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Truthlocks Verify account at verify.truthlocks.com
- A personal access token from verify.truthlocks.com/settings
- A GitHub repository with Actions enabled
Quick start
Add the following workflow to your repository:TRUTHLOCK_TOKEN.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
token | Yes | — | Your Truthlocks personal access token |
files | No | — | Files or glob patterns to protect (space-separated) |
directory | No | — | Directory to protect (all files, up to 3 levels deep) |
category | No | code | Content category for the protections |
visibility | No | public | public or private |
title-prefix | No | — | Prefix added to each protection title |
files or directory. If both are omitted, the action exits with an error.
Categories
Use thecategory 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:| Output | Description |
|---|---|
attestation-ids | Comma-separated list of attestation IDs created |
protection-count | Number of files protected |
badge-url | Verification badge URL for the first attestation |
Using outputs in your workflow
Examples
Protect source files on push to main
Protect build artifacts on release
Private protections
Setvisibility: 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:- Installs the
@truthlock/protectCLI - Authenticates using your token
- Computes a SHA-256 hash of each file (the file content is never uploaded)
- Mints an attestation for each hash, anchored to the transparency log
- Outputs the attestation IDs and a verification badge URL
Related
Protect CLI
Protect files from the command line for local workflows.
Content protection
Full guide to protecting content and sharing proof links.

