Repository navigation
Development Guide
This guide describes how to work on Secure Package without weakening its security boundaries.
app/
Api/
Archive/
Client/
Crypto/
Project/
Security/
Storage/
bin/
config/
docs/
public/
tests/
archive/
The project uses PSR-4 autoloading:
SecurePackage\\ -> app/
A class such as:
SecurePackage\\Project\\V14PackageReader
maps to:
app/Project/V14PackageReader.php
Do not mix security responsibilities without a reason.
For example:
- cryptographic primitives belong in
app/Crypto; - package format validation belongs in
app/Project; - HTTP/session policy belongs in
app/Securityandapp/Api; - ZIP safety belongs in
app/ArchiveandPackageArchive; - runtime persistence belongs in
app/Storage.
This makes security review easier because each boundary has a narrow purpose.
When adding a parser or verifier, prefer:
unknown field -> reject
invalid type -> reject
invalid encoding -> reject
missing required data -> reject
ambiguous path -> reject
unexpected extra data -> reject
Avoid permissive fallbacks that silently reinterpret security-sensitive data.
A new V14 header or manifest field should trigger a deliberate schema decision.
Ask:
- Is it authenticated?
- Is it included in the header binding if it affects cryptographic meaning?
- Does the parser enforce its type and range?
- Does it create a new downgrade or substitution possibility?
- Does the test suite cover both valid and malicious forms?
Do not reuse an existing key merely because it is convenient.
Prefer a new explicit HKDF purpose/context when a distinct security purpose exists.
For example:
purpose = "manifest"
purpose = "filename"
purpose = "files"
purpose = "file"
The purpose string is part of the domain separation.
Associated data should bind the operation to the correct package context whenever practical.
Examples already used by V14 include package ID, header binding, node ID, file ID, chunk index, and expected plaintext size.
Any change to:
- filename parsing
- path normalization
- archive extraction
- package inventory
- blob verification
- manifest validation
- restore ordering
- temporary file handling
should add or update negative tests.
Do not rely only on a successful round-trip.
Do not add passwords, patterns, recovery keys, CSRF tokens, session cookies, or authorization data to logs.
Audit events should remain useful without becoming a secret storage channel.
php bin/self-check.php
php bin/source-audit.php
php bin/security-test.php --full
find public/client -type f -name '*.js' -print0 | xargs -0 -n1 node --check
composer validate --strict --no-check-publish
composer audit --no-interactionBefore publishing a release:
- update
VERSIONdeliberately; - update
CHANGELOG.mdwith user-visible changes; - verify tests;
- generate a real
composer.lockwhen dependencies are involved; - sign the active source tree;
- verify the signature through an external trust root;
- package and checksum the release;
- verify after deployment.
Version numbers describe releases; commit messages describe changes.
Prefer:
feat(crypto): ...
fix(storage): ...
fix(security): ...
refactor(api): ...
chore(ci): ...
Use release tags such as:
v14.1.0
v14.1.1
v14.2.0
Do not use a version number as the name of every commit.
Security-sensitive changes should explain:
- the threat or bug;
- the exact boundary changed;
- the new invariant;
- the tests added;
- any deployment impact;
- any format compatibility impact.
For cryptographic or parser changes, independent review should be treated as a target requirement rather than assumed from automated tests.
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