Skip to content

ShellGuard v0.0.1.7

Choose a tag to compare

@github-actions github-actions released this 04 Sep 05:45
· 185 commits to main since this release

🦞 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.ts auto-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 (hkdfSha256 and aesGcmDecrypt). 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 AAD totp_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.tsx automatically detects encrypted .bak uploads 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_pearls via GET /api/vault as 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.md and added compatibility_layer.md as 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.ts validates 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 sync
  • 09f4c57 β€” feat: sgtotp.bak import compatibility layer with ShellGuard-TOTP
  • 68da985 β€” feat: add AGENTS.md configuration for Gemini identity and architectural constraints
  • 7b7a90c β€” feat: implement dynamic theme engine with adaptive light/dark mode and multi-accent support
  • 074eab0 β€” merge: strict RELEASE-doc mirror in release pipeline
  • 7054595 β€” ci: strict RELEASE-doc mirror in release pipeline
  • b0fcc47 β€” chore: remove outdated release notes for v0.0.1.5
  • 138952b β€” 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 shellguard

Upgrading from Source

git fetch --tags
git checkout v0.0.1.7
npm install
npm run build
npm run scuttle:prod

Companion 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.