Skip to content

OKF Agent Memory v0.1.5

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Sep 11:23

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 into develop with automated quality and OKF v0.2 conformance gates.
  • Branch Listing (make jules-list): Discovers pending security-audit-* and jules-* 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 resolveInBundle resolves symlinks to verify targets are legitimate .md files within the bundle and do not escape to arbitrary system files.
  • Reserved Document Protection: Enforces case-insensitive protection for reserved bundle documents (index.md in subdirectories, root log.md, and root AGENTS.md) across logical paths and physical symlink targets.
  • Root Scope Isolation: Scoped reserved AGENTS.md and log.md protection 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): Centralized type, title, and description validation directly inside SaveConcept (via sanitizeConceptMetadata), 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, and description on all creation and update paths.
  • Actor Fallback: actor arguments that are empty or contain only whitespace automatically fall back to "agent/okf-tool".
  • Graph Loop Protection: RelateConcepts enforces upfront ValidateConceptID, trims whitespace and .md extensions, 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 AppendLogEntry and RelateConcepts descriptions to prevent forged date headings (## YYYY-MM-DD).

5. Documentation & Engineering Guidelines


Installation & Upgrade

Via Go Install

go install github.com/okf-memory/okf-agent-memory/cmd/okf@v0.1.5

Via Homebrew

brew update
brew upgrade okf

Pre-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