Repository navigation
ShellGuard v0.0.1.7
π¦ ShellGuard β Release v0.0.1.7
Cross-Ecosystem Sovereign 2FA β Web Vault & Android Companion In Lockstep
βββββββββββ ββββββββββββββ βββ βββββββ βββ βββ ββββββ βββββββ βββββββ
βββββββββββ ββββββββββββββ βββ βββββββ βββ βββ ββββββββ ββββββββ ββββββββ
ββββββββββββββββββββββ βββ βββ βββ ββββ βββ βββ ββββββββ ββββββββ βββ βββ
ββββββββββββββββββββββ βββ βββ βββ βββ βββ βββ ββββββββ ββββββββ βββ βββ
βββββββββββ βββββββββββββββββββββββββββ βββββββββββββββββ βββ βββ βββ βββ ββββββββ
βββββββββββ βββββββββββββββββββββββββββ βββββββ βββββββ βββ βββ βββ βββ βββββββ
~ **ClawStack Mobile StudiosΒ©β’** ~
π The Core Summary
Welcome to v0.0.1.7 of ShellGuard! This release cements full cross-ecosystem interoperability between the self-hosted ShellGuard web vault and our standalone companion application, ShellGuard-TOTP (Android).
With the new sgtotp.bak client-side import engine, users can directly import mobile 2FA backups into the web vault. The system effortlessly parses encrypted shellguard-totp-backup-v1 envelopes (via HKDF-SHA256 and AES-GCM-256 with AAD verification and SHA-256 integrity checksum enforcement), unencrypted shellguard-totp-plain-export-v1 files, and bare JSON arrays. Imported seeds are sanitized, assigned fresh UUIDs, mapped into normalized user pods, and encrypted into standard vault pearls. Under our One-Way Mirror Sync architecture, these newly imported secrets seamlessly mirror back down to the Android app during subsequent sync cycles.
This release also resolves strict TypeScript type invariants, formalizes cross-ecosystem documentation in ARCHITECTURE.md and compatibility_layer.md, embeds Gemini identity and architectural constraints in AGENTS.md, and verifies a 100% green test oracle across all 13 test suites.
π Key Themes & Highlights
π± 1. sgtotp.bak Import Compatibility Layer & Client-Side Decryption
- Universal Format Sniffing:
src/lib/sgtotpBackup.tsauto-sniffs uploaded backup files to detect encrypted envelopes (shellguard-totp-backup-v1), structured plaintext exports (shellguard-totp-plain-export-v1), or bare JSON item arrays without leaking plaintext. - Pure Client-Side Zero-Knowledge Decryption: Encrypted envelopes are decrypted strictly in the browser using pure TypeScript WebCrypto fallback primitives (
hkdfSha256andaesGcmDecrypt). The user's export PIN or passphrase and unencrypted seeds never cross the network to the server. - Enforced AAD & Checksum Integrity: Key derivation uses HKDF-SHA256 (
ikm = exportKey,salt = ownerUuid,info = "clawchives-shellcryption-v1"). Decryption verifies AADtotp_backup:{ownerUuid}to eliminate substitution attacks, and strictly checks the SHA-256 hash of the decrypted payload against the envelope checksum. - Sanitization & Pod Normalization: Base32 secrets are validated and stripped of whitespace and hyphens. Fresh web UUIDs are assigned to prevent ID collision, and category strings are passed through
normalizePod()to ensure seamless integration into the user's existing pod hierarchy. - Interactive Export-Key Modal:
ImportExportView.tsxautomatically detects encrypted.bakuploads and displays an interactive modal prompting for the export key before completing the client-side import.
βοΈ 2. One-Way Mirror Sync Architecture
- Isolated Local Codes: Codes created directly on the Android device remain local (
isLocalOnly = true), keeping mobile additions completely autonomous and isolated from upstream synchronization conflicts. - Downstream Mirroring: The Android companion pulls remote
vault_pearlsviaGET /api/vaultas a read-only mirror, organizing them into a distinct"βοΈ Synced from ShellGuard"dashboard group. - Ecosystem Bridge: The mobile app exports only local codes into
sgtotp.bak. Importing this file into the web vault elevates local mobile codes to sovereign vault pearls, which then mirror back down to all connected mobile clients. - Official Companion Release Links: Integrated direct pointers to ShellGuard-TOTP Releases in
README.md,ARCHITECTURE.md, and release documentation.
π‘οΈ 3. Repository Hygiene & Identity Governance
- Identity Configuration (
AGENTS.md): Added explicit instructions and negative invariants governing Gemini/Antigravity behavior, memory-bank verification, and multi-agent orchestration limits. - Architecture Alignment: Formalized the cross-ecosystem boundary in
ARCHITECTURE.mdand addedcompatibility_layer.mdas the authoritative wire-format specification. - Clean Build Gates: Cleaned up temporary Android spec files in the root repository to maintain clean separation between the web vault codebase and the native Android repository.
π§ͺ 4. Complete Verification & Type Safety
- 22 Dedicated Unit Tests:
tests/unit/sgtotpBackup.test.tsvalidates format detection, encrypted round-trip decryption, wrong-key rejection, tampered checksum detection, AAD substitution prevention, Base32 normalization, and pod mapping. - 100% Passing Test Oracle: 202 tests passing across all 13 test suites (0 failures).
- Strict Type Safety: Zero TypeScript compiler errors (
tsc --noEmit) and a clean production Vite bundle.
ποΈ Architectural Topology Map
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ShellGuard Web Vault (:6464) β
β β’ Sovereign single-source-of-truth for vault pearls β
β β’ Master ShellCryption key (hu-) in browser memory β
β β’ Full CRUD on logins, notes, SSH keys, attachments β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βοΈ Read-Only Mirrorβ (GET /api/vault)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π± ShellGuard-TOTP (Android Client) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β "βοΈ Synced from ShellGuard" (Read-Only Mirror Group) β β
β β β’ Downstream mirror of web vault TOTP records β β
β β β’ Offline cache in SQLCipher Room DB β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β "π± Local Vault" (On-Device Codes, isLocalOnly = true) β β
β β β’ Scanned QR codes & manual additions on device β β
β β β’ Hardware-backed Android KeyStore protection β β
β β β’ NEVER pushed upstream directly β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
π¦ sgtotp.bak β (Export Local Codes Only)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Web Vault Import Compatibility Layer β
β β’ Format sniffing: encrypted / plain / bare array β
β β’ Client-side HKDF + AES-GCM-256 decryption β
β β’ Enforced SHA-256 payload checksum verification β
β β’ Base32 sanitization, fresh UUIDs, pod normalization β
β β’ Encrypted into vault_pearls (mirrors downstream) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Changes by Layer
| Component | Files | Description |
|---|---|---|
| Client Utilities | src/lib/sgtotpBackup.ts |
sgtotp.bak format sniffer, HKDF/AES-GCM client decryptor, AAD + checksum verification, and mapSgTotpItemsToVaultItems |
| Settings UI | src/components/Settings/ImportExportView.tsx |
Export-key modal for encrypted .bak imports, file upload handler, and notification feedback |
| Specifications | compatibility_layer.md |
Formal 2-way data interoperability specification and schema definitions |
| Documentation | README.md, ARCHITECTURE.md |
Added ShellGuard-TOTP Android companion links, One-Way Mirror Sync topology, and updated version badges |
| Tests | tests/unit/sgtotpBackup.test.ts |
22 comprehensive unit tests covering cryptographic round-trips, tampered checksums, and parser edge cases |
| Identity & CI | AGENTS.md, .github/workflows/release.yml |
Gemini identity rules and release document mirroring configuration |
π Commit Ledger (Since v0.0.1.6)
[pending]β chore: prepare release v0.0.1.7 with ShellGuard-TOTP companion sync09f4c57β feat: sgtotp.bak import compatibility layer with ShellGuard-TOTP68da985β feat: add AGENTS.md configuration for Gemini identity and architectural constraints7b7a90cβ feat: implement dynamic theme engine with adaptive light/dark mode and multi-accent support074eab0β merge: strict RELEASE-doc mirror in release pipeline7054595β ci: strict RELEASE-doc mirror in release pipelineb0fcc47β chore: remove outdated release notes for v0.0.1.5138952bβ docs: add themed release notes for v0.0.1.6
β‘ Deployment & Upgrade Instructions
Using Containerized Environments (Self-Hosted / Production)
docker pull ghcr.io/clawstackstudios/shellguard:v0.0.1.7
docker restart shellguardUpgrading from Source
git fetch --tags
git checkout v0.0.1.7
npm install
npm run build
npm run scuttle:prodCompanion Android Client
Download the latest APK or release bundle for the standalone Android Authenticator from:
π ShellGuard-TOTP GitHub Releases
The Code That Molts.
Maintained by ClawStack Mobile StudiosΒ©β’ under AGPL-3.0 license.