Add global using for Xunit in test project Enhance ImportValidatorTests with async validation and quarantine checks Implement FileSystemQuarantineServiceTests for quarantine functionality Add integration tests for ImportValidator to check monotonicity Create BundleVersionTests to validate version parsing and comparison logic Implement VersionMonotonicityCheckerTests for monotonicity checks and activation logic
3.1 KiB
3.1 KiB
AirGap Importer Scaffold (prep for AIRGAP-IMP-56-001/56-002/58-002)
Scope for prep
- Provide minimal project and test scaffolds so downstream implementation can wire DSSE, TUF, Merkle validation, and audit logging without redoing structure.
- Capture trust-root inputs required (bundle path, signing keys, allowed algorithms, validity window).
What landed (2025-11-20)
- New project:
src/AirGap/StellaOps.AirGap.Importer/StellaOps.AirGap.Importer.csproj(net10.0, deterministic-only dependencies). - Planning layer:
BundleImportPlanneremits deterministic plan steps and early validation reasons (bundle-path-required,trust-roots-required,invalid-trust-window). - Contracts:
TrustRootConfigrecord carries root bundle path, trusted key fingerprints, allowed algorithms, and optional validity window. - Validation shape:
BundleValidationResultcentralises success/failure reasons for replay/capture. - Tests:
tests/AirGap/StellaOps.AirGap.Importer.Testsvalidate planner behavior without external feeds.
Updates (2025-11-20)
- Added DSSE verifier (RSA-PSS/SHA256) with PAE encoding + trusted key fingerprint checks.
- Added TUF metadata validator (root/snapshot/timestamp) with hash consistency guard.
- Added deterministic Merkle root calculator for bundle object staging.
- Expanded tests for DSSE, TUF, Merkle helpers.
- Added trust store + root rotation policy (dual approval) and import validator that coordinates DSSE/TUF/Merkle/rotation checks.
Updates (2025-12-15)
- Added monotonicity enforcement primitives under
src/AirGap/StellaOps.AirGap.Importer/Versioning/(BundleVersion,IVersionMonotonicityChecker,IBundleVersionStore). - Added file-based quarantine service under
src/AirGap/StellaOps.AirGap.Importer/Quarantine/(IQuarantineService,FileSystemQuarantineService,QuarantineOptions). - Updated
ImportValidatorto include monotonicity checks, force-activate support (requires reason), and quarantine on validation failures. - Added Postgres-backed bundle version tracking in
src/AirGap/StellaOps.AirGap.Storage.Postgres/Repositories/PostgresBundleVersionStore.csand registration viasrc/AirGap/StellaOps.AirGap.Storage.Postgres/ServiceCollectionExtensions.cs. - Updated tests in
tests/AirGap/StellaOps.AirGap.Importer.Teststo cover versioning/quarantine and the new import validator behavior.
Next implementation hooks
- Replace placeholder plan with actual DSSE + TUF verifiers; keep step ordering stable.
- Feed trust roots from sealed-mode config and Evidence Locker bundles (once available) before allowing imports.
- Record audit trail for each plan step (success/failure) and a Merkle root of staged content.
Determinism/air-gap posture
- No network dependencies; BCL +
Microsoft.Extensions.*only. - Tests use cached local NuGet feed (
local-nugets/). - Plan steps are ordered list; do not reorder without bumping downstream replay expectations.
How to consume
# run tests offline once feed is hydrated
DOTNET_NOLOGO=1 dotnet test tests/AirGap/StellaOps.AirGap.Importer.Tests/StellaOps.AirGap.Importer.Tests.csproj --no-build
Owners
- AirGap Importer Guild / Security Guild (per sprint 0510).