Skip to content

fix: improve cloud audit summaries - #140

Merged
Mr-Lucky merged 2 commits into
mainfrom
fix/cloud-audit-summaries
Oct 10, 2026
Merged

Mr-Lucky merged 2 commits into
mainfrom
fix/cloud-audit-summaries

Conversation

@Mr-Lucky

Copy link
Copy Markdown
Contributor

Summary

  • Keep clean DSH, Codex, and Claude Code runtime events local instead of uploading them to Cloud.
  • Generate meaningful, privacy-safe Cloud summaries from original tool actions and bounded metadata.
  • Prevent raw request/response data, headers, output, absolute paths, credentials, and evaluator text from entering Cloud payloads.
  • Add regression coverage and update the runtime privacy documentation.

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (32 tests)
  • Manually tested the change

Related Issues

Closes #

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

AgentGuard PR Review

I found one actionable issue in the patch.

  1. severity: high — src/runtime/protect.ts / src/runtime/audit.ts (buildRuntimeAction, nativeHookAuditInput, nativeHookSafeMetadata, safeProtectedFileReference)
    • What can go wrong: The new “safe original-action summary” path can still leak sensitive native-tool input through event.metadata.nativeToolInput and nativeToolArgumentKeys. nativeToolInput is populated from pickNativeToolAuditInput(toolInput) without any redaction or validation, and nativeToolArgumentKeys is copied from arbitrary tool-input keys. Those fields are then used to reconstruct Cloud summaries for both native post-tool events and DSH events. A malicious or just unexpected tool payload can therefore move secrets, absolute paths, or other sensitive values into Cloud-visible summaries even when the rest of the event is redacted locally.
    • Concrete fix: Before storing or using nativeToolInput / nativeToolArgumentKeys, apply strict allowlist validation and redaction:
      • only retain inputs for explicitly supported actions and field names;
      • run the retained string through the same redaction/bounding logic used for cloud payloads;
      • drop nativeToolArgumentKeys unless each key matches an allowlist and is proven non-sensitive;
      • add tests covering secret-bearing tool_input fields to ensure they do not appear in Cloud payloads.

@Mr-Lucky
Mr-Lucky merged commit 5de7c28 into main Oct 10, 2026
4 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.

2 participants