PHP implementation of The Update Framework (TUF)




PHP-TUF is in a pre-release state and is not considered a complete or secure version of the TUF framework. It should currently only be used for testing, development and feedback.

Do not use in production for secure target downloads!!

PHP-TUF is a PHP implementation of The Update Framework (TUF) to provide signing and verification for secure PHP application updates. Read the TUF specification for more information on how TUF is intended to work and the security it provides.

PHP-TUF project development is primarily focused on supporting secure automated updates for PHP CMSes, although it should also work for any PHP application or Composer project. Contributing projects:

PHP-TUF client requirements

The PHP-TUF client is designed to provide TUF verification to PHP applications for target signatures.

  • Minimum required PHP version: 8.1
  • Requires ext-json
  • The paragonie/sodium_compat dependency provides a polyfill for the Sodium cryptography library; however, installing ext-sodium is recommended for better performance and security.

Code style

The code generally follows PSR-2 with some additional formatting rules for code documentation and array formatting. Run PHPCS to check for code style compliance:

 composer phpcs


Test fixtures generation

Run the following command:

   composer fixtures

Fixtures should appear in fixtures/.

Running the PHP-TUF tests

  1. Ensure you have all required dependencies by running composer install.
  2. Run composer test at the project's root.

Dependency policies and information

To provide a lightweight, reliable, and secure client, external dependencies are carefully limited. Any proposed dependency additions (and those dependencies' dependencies) should undergo the Drupal core dependency evaluation process.

For evaluations and policies of current dependencies, see the PHP-TUF dependency information.