Skip to content

unattended-backpack/clay

Clay

CodeQL Create Release

We are the clay, and you are our potter; we are all the work of your hand.

Clay is a template repository from which we may create new projects.

Building

To build locally, you should simply need to run make; you can see more in the Makefile. This will default to building with the maintainer-provided details from .env.maintainer, which we will periodically update as details change.

You can also build container images using make docker, which uses a BUILD_IMAGE for building dependencies that are packaged to run in a RUNTIME_IMAGE. Configuration values in .env.maintainer may be overridden by specifying them as environment variables, including specific image names.

CLAY_NAME=clay POTTER_NAME=potter make docker
BUILD_IMAGE=registry.digitalocean.com/sigil/petros:latest make build
RUNTIME_IMAGE=debian:bookworm-slim@sha256:... make build

Configuration

Our configuration follows a zero-trust model where all sensitive configuration is stored on the self-hosted runner, not in GitHub. This section documents the configuration required for automated releases via GitHub Actions.

Running this project may require some sensitive configuration to be provided in .env and other files; you can generate the configuration files from the provided examples with make init. Review configuration files carefully and populate all required fields before proceeding.

Runner-Local Secrets

All automated build secrets must be stored on the self-hosted runner at /opt/github-runner/secrets/. These files are mounted read-only into the release workflow container; they are never stored in git.

Required Secrets

GitHub Access Tokens (for creating releases and pushing to GHCR):

  • ci_gh_pat - A GitHub fine-grained personal access token with repository permissions.
  • ci_gh_classic_pat - A GitHub classic personal access token for GHCR authentication.

Registry Access Tokens (for pushing container images):

  • do_token - A DigitalOcean API token with container registry write access.
  • dh_token - A Docker Hub access token.

GPG Signing Keys (for signing release artifacts):

  • gpg_private_key - A base64-encoded GPG private key for signing digests.
  • gpg_passphrase - The passphrase for the GPG private key.
  • gpg_public_key - The base64-encoded GPG public key (included in release notes).

Registry Configuration (registry.env file):

This file contains non-sensitive registry identifiers and build configuration:

# The Docker image to perform release builds with.
# If not set, defaults to unattended/petros:latest from Docker Hub.
# Examples:
#   BUILD_IMAGE=registry.digitalocean.com/sigil/petros:latest
#   BUILD_IMAGE=ghcr.io/your-org/petros:latest
#   BUILD_IMAGE=unattended/petros:latest
BUILD_IMAGE=unattended/petros:latest

# The runtime base image for the final container.
# If not set, uses the value from from .env.maintainer.
# Example:
#   RUNTIME_IMAGE=debian:trixie-slim@sha256:66b37a5078a77098bfc80175fb5eb881a3196809242fd295b25502854e12cbec
RUNTIME_IMAGE=debian:trixie-slim@sha256:66b37a5078a77098bfc80175fb5eb881a3196809242fd295b25502854e12cbec

# The name of the DigitalOcean registry to publish the built image to.
DO_REGISTRY_NAME=

# The username of the Docker Hub account to publish the built image to.
DH_USERNAME=unattended

Public Configuration

Public configuration that anyone building this project needs is stored in the repository at .env.maintainer:

  • CLAY_NAME - The published name for the Clay Docker image.
  • POTTER_NAME - The published name for the Potter Docker image.
  • BUILD_IMAGE - The builder image for compiling Rust code (default: unattended/petros:latest).
  • RUNTIME_IMAGE - The runtime base image (default: pinned debian:trixie-slim@sha256:...).

This file is version-controlled and updated by maintainers as infrastructure details change.

Verifying Release Artifacts

All releases include GPG-signed artifacts for verification. Each release contains:

  • image-digests.txt - A human-readable list of all container image digests.
  • image-digests.txt.asc - A GPG signature for the digest list.
  • Per-image manifests and signatures for each built image:
    • <image>-ghcr-manifest.json / <image>-ghcr-manifest.json.asc - GitHub Container Registry OCI manifest and signature.
    • <image>-dh-manifest.json / <image>-dh-manifest.json.asc - Docker Hub OCI manifest and signature.
    • <image>-do-manifest.json / <image>-do-manifest.json.asc - DigitalOcean Container Registry OCI manifest and signature.

Quick Verification

Download the artifacts and verify signatures:

# Import the GPG public key (base64-encoded in release notes).
echo "<GPG_PUBLIC_KEY>" | base64 -d | gpg --import

# Verify digest list.
gpg --verify image-digests.txt.asc image-digests.txt

# Verify image manifests for each image.
gpg --verify <image>-ghcr-manifest.json.asc <image>-ghcr-manifest.json
gpg --verify <image>-dh-manifest.json.asc <image>-dh-manifest.json
gpg --verify <image>-do-manifest.json.asc <image>-do-manifest.json

Manifest Verification

The manifest files contain the complete OCI image structure (layers, config, metadata). You can use these to verify that a registry hasn't tampered with an image.

# Pull the manifest from the registry.
docker manifest inspect ghcr.io/unattended-backpack/...@sha256:... \
  --verbose > registry-manifest.json

# Compare to the signed manifest.
diff ghcr-manifest.json registry-manifest.json

This provides cryptographic proof that the image structure (all layers and configuration) matches what was signed at release time.

Cosign Verification

Images are also signed with cosign using GitHub Actions OIDC for keyless signing. This provides automated verification and build provenance.

To verify with cosign:

# Verify image signature (proves it was built by our workflow).
cosign verify ghcr.io/unattended-backpack/...@sha256:... \
  --certificate-identity-regexp='^https://github.com/unattended-backpack/.+' \
  --certificate-oidc-issuer=https://token.actions.githubusercontent.com

Cosign verification provides:

  • Automated verification (no manual GPG key management).
  • Build provenance (proves image was built by the GitHub Actions workflow).
  • Registry-native signatures (stored alongside images).

Note: Cosign depends on external infrastructure (GitHub OIDC, Rekor). For maximum trust independence, rely on the GPG-signed manifests as your ultimate root of trust.

Local Testing

This repository is configured to support testing the release workflow locally using the act tool. There is a corresponding goal in the Makefile, and instructions for further management of secrets here. This local testing file also shows how to configure the required secrets for building.

Security

If you discover any bug; flaw; issue; dæmonic incursion; or other malicious, negligent, or incompetent action that impacts the security of any of these projects please responsibly disclose them to us; instructions are available here.

License

The license for all of our original work is LicenseRef-VPL WITH AGPL-3.0-only. This includes every asset in this repository: code, documentation, images, branding, and more. You are licensed to use all of it so long as you maintain maximum possible virality and our copyleft licenses.

Permissive open source licenses are tools for the corporate subversion of libre software; visible source licenses are an even more malignant scourge. All original works in this project are to be licensed under the most aggressive, virulently-contagious copyleft terms possible. To that end everything is licensed under the Viral Public License coupled with the GNU Affero General Public License v3.0 for use in the event that some unaligned party attempts to weasel their way out of copyleft protections. In short: if you use or modify anything in this project for any reason, your project must be licensed under these same terms.

For art assets specifically, in case you want to further split hairs or attempt to weasel out of this virality, we explicitly license those under the viral and copyleft Free Art License 1.3.

Original Licenses

TODO: remove this section if not forking.

We stand on the shoulders of giants. This repository is a fork of upstream TODO which we modify and run for Sigil's own needs. This original project is licensed under the TODO license, the original text of which has been maintained in the original_licenses/ directory. The commit hash of initial divergence is TODO; our license only applies to any of our own code or modifications that have not been upstreamed and absolutely does not apply to any original code or future upstream code we may choose to merge.

About

We are the clay, and you are our potter; we are all the work of your hand.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages