Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

42 Commits

Folders and files

Repository files navigation

skill-trust

skill-trust is a signing and verification system for AI agent skills.

The project lets organizations sign a complete skill directory and lets a desktop or remote agent harness verify that directory before loading or executing it. The initial implementation is designed around Sigstore components and Red Hat Trusted Artifact Signer (RHTAS), with a portable Go binary and library at the center.

The goal is not to put skills into an OCI registry. A skill should remain a portable directory or package that can be verified locally on a user's desktop, on a remote harness, or inside CI using the same content identity and verification policy.

Why this exists

An Agent Skill is more than its SKILL.md file. A skill directory can contain instructions, Bash/Python/JavaScript scripts, references, assets, hidden files, and other resources. A change to any of those files can change what an agent does.

skill-trust makes that change detectable:

  1. The complete skill directory is converted into a canonical file manifest.
  2. The manifest digest is signed using Sigstore or RHTAS.
  3. The signature bundle and manifest travel with the skill in .skill-trust/.
  4. A harness verifies the content, signer, provenance, and trust material before loading or executing the skill.
  5. Any modification, missing metadata, or policy failure blocks execution.

The project reuses Sigstore signing and verification primitives rather than creating a new cryptographic protocol. Sigstore supports file/blob signing, keyless certificates, key-based signatures, bundles, transparency evidence, and custom service endpoints. See the Sigstore blob signing documentation and custom component configuration.

Project status

The design is complete and the core implementation is shipped: the canonical manifest (spec and Go package with cross-platform test vectors), key-based and keyless signing, the policy-driven verification engine, and the skill-trust CLI. Harness adapters, GitHub Actions workflows, and public/RHTAS signing fixtures follow the backlog order.

Skill format and signed boundary

The project follows the Agent Skills directory model: SKILL.md is required, while directories such as scripts/, references/, and assets/ are common optional content. Other files are allowed and are included in the signed boundary. See the Agent Skills specification.

Example:

my-skill/
├── SKILL.md
├── scripts/
│   ├── collect.py
│   └── validate.sh
├── references/
├── assets/
└── .skill-trust/
    ├── manifest.json
    └── bundle.sigstore.json

Everything except .skill-trust/ is part of the signed content. The reserved control directory is excluded to avoid a self-referential digest. Symlinks and special filesystem entries are rejected in the first version.

The canonical manifest includes normalized relative paths, entry types, file content digests, executable permission bits, the manifest format version, and the hash algorithm. Host-specific timestamps, owners, absolute paths, and other unstable filesystem metadata are not signed. The full specification with test vectors is in docs/MANIFEST.md.

Command-line interface

# Print version information:
skill-trust version

# Compute the canonical manifest of a skill directory:
skill-trust manifest ./my-skill

# Sign with a release key (offline; no log entry or timestamp):
skill-trust sign ./my-skill --key release.key

# Sign keyless in CI (Fulcio + Rekor + TSA per a services file):
skill-trust sign ./my-skill --id-token "$OIDC_TOKEN" --services services.json

# Verify a skill against an organization policy:
skill-trust verify ./my-skill --policy policy.json

# Inspect the control files of a signed skill (no policy, no crypto):
skill-trust inspect ./my-skill

Every command accepts --json for machine-readable output. Stable exit codes:

Code Meaning
0 success; for verify, the skill is allowed
1 verification decision: the skill is blocked (findings reported)
2 operational error (arguments, unreadable input, trust unavailable)

verify is fail closed: any missing control file, any content difference, or any failed check blocks the skill, and no decision is rendered without usable trust material. The CLI never executes, imports, or interprets skill content.

Keyless signing is the primary workflow. Public Sigstore is the initial CI test target, and RHTAS is supported through configurable Fulcio, Rekor, TUF/trusted-root, and timestamp services (trust configuration, operator guide — including offline verification of committed RHTAS-signed fixtures). Key-based signing with PEM keys is shipped; KMS or hardware-backed keys interoperate through cosign-produced bundles. Organization policy can require specific signer identities, OIDC issuers, source/provenance claims, evidence (transparency log entries, RFC 3161 timestamps), freshness limits, and trust roots (policy reference; worked examples with machine-checked fixtures in examples/policy/).

Verification is offline-capable when the distributed bundle and trusted-root material are available locally.

Harness enforcement

The verifier is authoritative only when a harness uses it. An arbitrary agent runtime that bypasses the verifier cannot be forced to honor a signature by a standalone file-format tool.

Two reference adapters implement the preflight contract:

  • OpenCode (adapters/opencode/): verifies skills before load, re-checks before tool execution and before every shell command. A modified Bash or Python script is blocked before it runs. A complete live-server walkthrough is in examples/opencode-adapter-demo.md.
  • Claude Code (adapters/claude-code/): plugin adapter using SessionStart, PreToolUse, and UserPromptSubmit hooks to verify skills before load, re-verify before any tool touching a skill file, and block tampered or unsigned skills. A complete hook-invocation walkthrough is in examples/claude-code-adapter-demo.md.

See the architecture and enforcement design for the trust boundary and adapter contract, and the threat model for what a signature does and does not prove.

GitHub Actions

The repository ships a reusable verification action, verify-skills. It discovers skill directories (an explicit list and/or glob patterns), verifies each against a signer/provenance policy, publishes human-readable and JSON reports (run summary plus artifact), and fails when content changed without a valid replacement signature. The policy decides the trust material — the embedded public Sigstore good instance or any configured trusted root such as RHTAS — so the same action verifies key-based, public-Sigstore-keyless, and RHTAS-keyless signatures.

verify-skills runs it on every pull request and push against the repository's own signed skills under skills/; the e2e-sign workflow exercises it against keyless signatures on public Sigstore and RHTAS.

Approved skills are signed and published by the release-sign workflow: keyless with GitHub OIDC, only from v* tags through the protected release environment, targeting public Sigstore or RHTAS. Each release ships the skill package, manifest, bundle, verification report, and the consumer policy. See docs/RELEASE.md.

Over the lifetime of a deployment, signer rotation, trust-root updates, and withdrawn skills are policy operations: verification is offline and distinguishes cryptographic validity from current authorization, with a defined block result for stale or withdrawn trust. See docs/LIFECYCLE.md.

The repository's own skills

Skills under skills/ are signed with the repository's demo signing key; pull requests verify them through the action. After changing skill content, re-sign and commit the updated .skill-trust/ control files (see .github/skill-trust/README.md — the committed key is a CI tamper seal, not a trust root).

Roadmap and issue backlog

The implementation backlog is in docs/PROJECT-ISSUES.md. The implementation order is:

  1. threat model and trust policy;
  2. canonical manifest and package rules;
  3. Sigstore/RHTAS signing and verification;
  4. Go CLI and reusable library;
  5. preflight enforcement contract;
  6. OpenCode adapter;
  7. GitHub Actions and public test signing;
  8. tamper and cross-platform test fixtures (testdata/fixtures/, with expected allow/block results, running on Linux and macOS CI); and
  9. key-based signing and enterprise lifecycle controls (rotation, trust-root updates, withdrawal: docs/LIFECYCLE.md).

Security limitations

A valid signature proves that the verified bytes match the signed bytes and that the signature satisfies the configured policy. It does not prove that a skill is benign, that static instructions are safe, or that a harness cannot be misconfigured to bypass verification. It also does not bind a skill's name or location: the manifest records paths relative to the skill root, so a valid skill directory can be renamed or re-hosted in another pipeline without changing its digest — pipelines that must accept only particular skills pin them with policy skill bindings. Runtime isolation, host permissions, secret management, and malware/prompt-injection analysis remain separate controls.

Contributing

Start with the design documents and issue drafts. Contributions should include fixtures for both valid and invalid skills, document analysis limitations, and avoid implying that signature verification is a complete safety guarantee.

License

No license has been selected yet.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages