Skip to content

Implement audit closure hardening and docs#34

Merged
Telli merged 4 commits intomainfrom
codex/audit-closure-docs
Mar 27, 2026
Merged

Implement audit closure hardening and docs#34
Telli merged 4 commits intomainfrom
codex/audit-closure-docs

Conversation

@Telli
Copy link
Copy Markdown
Contributor

@Telli Telli commented Mar 25, 2026

Updated the docs to match the implemented audit-closure work, including README.md, SECURITY.md, docs/COMPATIBILITY.md, docs/QUICKSTART.md, docs/USER_GUIDE.md, docs/TOOLS_GUIDE.md, docs/sandboxing.md, docs/ROADMAP.md, and docs/architecture-startup-refactor.md. The updates cover the hardened plugin IPC model, approval posture and simulator, incident export, estimated token admission control, sandbox lease observability, and the staged startup composition.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 25, 2026

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: This PR closes out audit items by hardening plugin IPC, expanding operator/admin tooling, and updating documentation to match the new security posture surfaces.

Changes:

  • Hardened JS/TS plugin bridge transports (socket/hybrid) with per-plugin private runtime socket directories and an authenticated local IPC handshake.
  • Added admin/operator endpoints: GET /admin/posture, POST /admin/approvals/simulate, and GET /admin/incident/export, plus matching CLI commands.
  • Introduced optional estimated-token admission control to reject turns before calling the LLM when remaining session budget is likely insufficient.
  • Made session admission stricter (serialized admission + explicit capacity rejection) and improved session-lock cleanup/disposal on shutdown.
  • Expanded RuntimeMetrics to cover approvals, session capacity/evictions, plugin bridge auth/restarts, browser cancellation resets, and sandbox lease lifecycle.
  • Added atomic JSON file persistence helpers and applied them to operator/admin stores (policies, metadata, grants, audit).
  • Enforced plugin-root containment for package entry paths and native dynamic plugin assembly paths with structured diagnostics.
  • Updated docs (README/SECURITY/Guides/Roadmap) to reflect the hardened IPC model, approval semantics, incident export, sandbox observability, and staged startup composition.

Technical Notes: Adds new tests covering admission control, posture/simulation/export endpoints, bridge auth, socket transport auth failures, plugin containment checks, and new observability counters.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

try
{
if (Directory.Exists(_socketDirectory))
Directory.Delete(_socketDirectory, recursive: true);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DisposeCoreAsync recursively deletes _socketDirectory; when SocketPath is configured, _socketDirectory is derived from Path.GetDirectoryName(socketPath) and may point at an operator-managed directory. That can cause unintended permission/deletion attempts outside the bridge’s private runtime directory.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

.ToArray();

var autonomyHook = new AutonomyHook(effectiveTooling, NullLogger.Instance);
var allowed = await autonomyHook.BeforeExecuteAsync(request.ToolName!, argumentsJson, ct);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval simulation normalizes file_writewrite_file for the approval-gated check, but the autonomy check calls AutonomyHook.BeforeExecuteAsync with the raw request.ToolName. If callers use the file_write alias, the simulator could report allow in readonly mode even though write_file would be treated as write-capable.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

return true;
}

private static bool IsEstimatedBudgetAdmissionError(Exception ex)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsEstimatedBudgetAdmissionError relies on substring-matching the exception message, so a wording change would make admission-control rejections look like provider failures and return the generic error text. A dedicated exception type/code would make this path more robust.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@Telli Telli merged commit 59bd907 into main Mar 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant