Repository navigation
Testing and Validation
V14 includes a dedicated set of security and regression tests because the package reader and restore path are security-critical.
The tests/ directory includes coverage for:
CryptoRoundTripTest.phpKdfParameterTest.phpCanonicalJsonTest.phpCanonicalFuzzTest.phpV14DescriptorTest.phpV14HeaderBindingTest.phpV14PackageRoundTripTest.phpV14TamperHeaderTest.phpV14BlobTamperTest.phpV14RecoveryTest.php
V14PackageArchiveTest.phpV14PackageArchiveStorageTest.phpV14RestoreSafetyTest.phpTamperDetectionTest.phpFileRoundTripTest.phpPackageCatalogTest.phpPackageAuthorizationTest.php
ApplicationSecretsTest.phpSecurityDiagnosticsTest.phpSecurityInvariantTest.phpReplayGuardTest.phpReplayRaceTest.phpSignedStateTest.phpRestoreTokenTest.phpNameRegistryTest.php
ResumableUploadTest.phpUploadChecksumTest.phpV13UploadTest.phpZipPolicyTest.php
ReleaseIntegrityTest.phpReleaseVerifierTrustRootTest.phpSourceSecurityAuditTest.php
BrowserV13RoundTripTest.mjsV13DescriptorTest.php
Default:
php bin/security-test.phpFull:
php bin/security-test.php --fullThe fast suite runs a curated security-focused list. The full suite executes all tests/*Test.php files discovered by the script.
PHP syntax can be checked across the active source tree with:
find . -type f -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -lBrowser JavaScript syntax can be checked with:
find public/client -type f -name '*.js' -print0 | xargs -0 -n1 node --checkThe project validation record also checks active PHP and JavaScript syntax.
The repository's validation document reports:
- 103 active PHP files passed
php -l. - Active JavaScript files passed
node --check. -
php bin/self-check.phppassed the required PHP/Sodium/randomness/Argon2id checks. -
php bin/security-test.phppassed the fast security suite. -
php bin/source-audit.phppassed. - V14 package round-trip passed.
- V14 recovery restore passed.
- V14 header binding and strict schema tests passed.
- V14 header/completion tamper tests passed.
- V14 blob tamper and pre-write integrity tests passed.
- V14 restore-safety and no-overwrite tests passed.
- Replay race, upload checksum, signed state, authorization, and existing security regression tests passed.
The validation record also documents limitations:
- The validation sandbox did not have the PHP Zip extension, so
V14PackageArchiveTest.phpreported a skip. - Composer was not installed in that sandbox, so
composer validateandcomposer auditwere not run there. - No synthetic
composer.lockwas generated; release CI deliberately requires a real lockfile. - The development tree was unsigned, so tests that require an actual Ed25519 release artifact remained skipped until a real signing key was supplied.
These limitations are important. A test report should preserve both successful evidence and the conditions under which some checks could not run.
Tests focus on invariants rather than only happy-path examples.
Useful adversarial invariants include:
modified header -> reject
modified ciphertext -> reject
missing blob -> reject
unreachable blob -> reject
wrong Merkle root -> reject
unsafe restored name -> reject
existing destination -> reject
replay identifier -> reject
invalid release signature -> reject
untrusted external release key -> reject
The repository contains canonical JSON fuzz coverage and parser-focused validation, but the project still documents the need for continued adversarial testing, reproducible release validation, and independent review.
A green test suite means the tested assertions passed. It does not mean:
- the code is mathematically proven secure;
- every platform filesystem behaves identically;
- every PHP/Sodium version is equivalent;
- the host is trusted;
- the dependencies are risk-free;
- a third-party audit has occurred.
The project's security posture should therefore be communicated as explicit threat-model coverage plus evidence, not as a numeric security score.
Secure Package V14 · SECURE-PKG-V14 · Version 14.1.0 · MIT License · Author: ElmanCod110
This Wiki describes the implementation currently documented by the repository. Security-sensitive behavior should be verified against the active source tree before production deployment.
Start
V14 Engine
Security
Integration
Operations
- Storage and Data Lifecycle
- Deployment
- Testing and Validation
- Release and Supply Chain
- Migration V13 to V14
Contributing