Release v0.1.5 — Adversarial Security & DRY Hardening Release
OKF Agent Memory v0.1.5 is a comprehensive security and maintenance release integrating an autonomous adversarial audit loop with Google Jules, reinforcing path traversal and symlink boundary containment, and centralizing metadata sanitization across core, CLI, and Model Context Protocol (MCP) interfaces.
Key Fixes & Improvements
1. Automated Adversarial Security Loop (Google Jules Integration)
- Autonomous Remediation Loop: Added native branch discovery and verification workflows for daily adversarial audits performed by Google Jules.
- Deterministic Isolated Review (
make jules-review): Builds, tests, and verifies pending Jules remediation branches inside temporary, isolated Git worktrees without altering the active working directory. - Streamlined Integration (
make jules-merge): Seamlessly merges verified audit remediations intodevelopwith automated quality and OKF v0.2 conformance gates. - Branch Listing (
make jules-list): Discovers pendingsecurity-audit-*andjules-*branches across remotes.
2. Deep Boundary Containment & Symlink Defense
- Ancestor Symlink Resolution: Evaluates parent/ancestor directory symlinks in
cmd/okf/mcp.go(resolveBundleDir) to enforce strict server root containment even when target bundle paths do not yet exist. - Symlink Target Inspection: Ensures
resolveInBundleresolves symlinks to verify targets are legitimate.mdfiles within the bundle and do not escape to arbitrary system files. - Reserved Document Protection: Enforces case-insensitive protection for reserved bundle documents (
index.mdin subdirectories, rootlog.md, and rootAGENTS.md) across logical paths and physical symlink targets. - Root Scope Isolation: Scoped reserved
AGENTS.mdandlog.mdprotection strictly to the bundle root, ensuring legitimate nested concepts (e.g.,architecture/agents.md) are never falsely rejected.
3. Centralized DRY Input Sanitization & Metadata Hardening
- Single Source of Truth (
pkg/okf/mutate.go): Centralizedtype,title, anddescriptionvalidation directly insideSaveConcept(viasanitizeConceptMetadata), eliminating redundant duplicate validation across CLI and MCP handlers (-98 lines of boilerplate). - Whitespace-Only Protection: Strictest enforcement against empty or pure-whitespace strings in
type,title, anddescriptionon all creation and update paths. - Actor Fallback:
actorarguments that are empty or contain only whitespace automatically fall back to"agent/okf-tool". - Graph Loop Protection:
RelateConceptsenforces upfrontValidateConceptID, trims whitespace and.mdextensions, and strictly prevents self-referencing relationship loops (sourceID == targetID). - Lookup Resilience: Concept IDs in MCP handlers (
okf_show,okf_create,okf_update,okf_relate) and CLI commands are trimmed of surrounding whitespace before map lookups.
4. Delimiter Smuggling & Log Header Injection Protection
- Frontmatter Delimiter Protection: Prevents YAML delimiter smuggling (
---) and multi-line injections across concept metadata fields. - Log Header Spoofing Prevention: Sanitizes carriage returns and newlines in
AppendLogEntryandRelateConceptsdescriptions to prevent forged date headings (## YYYY-MM-DD).
5. Documentation & Engineering Guidelines
- Continuous Security Audit Process: Documented the adversarial audit model and Jules lifecycle in
convention/security-audit.md. - Coding Standards & Best Practices: Documented Clean Code, TDD, DRY, zero-dependency engineering, and Go idioms in
convention/coding-standards.md.
Installation & Upgrade
Via Go Install
go install github.com/okf-memory/okf-agent-memory/cmd/okf@v0.1.5Via Homebrew
brew update
brew upgrade okfPre-built Binaries
Pre-built standalone binaries and starter pack distributions for macOS (ARM64/x86_64), Linux (ARM64/x86_64), and Windows (ARM64/x86_64) are attached to this release.
Full Changelog: v0.1.4...v0.1.5