Skip to content

Programs and connections in the audit trail, and an execution trace setting - #59

Merged
mayur-tolexo merged 1 commit into
mainfrom
docs/audit-event-classes
Nov 2, 2026
Merged

mayur-tolexo merged 1 commit into
mainfrom
docs/audit-event-classes

Conversation

@mayur-tolexo

Copy link
Copy Markdown
Collaborator

Why
The audit trail now records every program that ran in a sandbox and every connection those programs opened, not only the calls made to it. A sandbox can also turn that recording off. The SDK had no models for the new events and no way to set it.

What

  • Events come in three OCSF classes: API Activity (6003), Process Activity (1007) and Network Activity (4001). New models AuditProcess, AuditFile, AuditDstEndpoint and AuditDevice; api and resources are now optional, since program and connection events carry neither.
  • actor.user.type uses the OCSF captions (User, API Key, System, Unknown), and the API key moves to actor.user.programmatic_credentials.
  • sandboxes.update and sandbox.update accept execution_trace; sandbox.execution_trace reports it.
  • An "Audit trail" reference section covering the classes, which filters apply to which class, and how to tie a program to the call that started it. README and examples/audit_trail.py updated.

Example

trail = sandbox.audit(limit=50)
for e in trail.data:
    proc = e.process or e.actor.process
    what = e.api.operation if e.api else (proc.name if proc else None)
    print(e.time, e.type_name, what, e.status)

sandbox.update({"execution_trace": False})
print(sandbox.execution_trace)  # False

Hold the release until the API serves the new actor captions everywhere: responses are validated strictly, so an API still sending the old lowercase values fails to parse.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 27c00af5-9ecf-4a2e-b538-02f09d6d2e63
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mayur-tolexo
mayur-tolexo force-pushed the docs/audit-event-classes branch from 0686a79 to 7bf6444 Compare October 21, 2026 05:23
@mayur-tolexo
mayur-tolexo marked this pull request as ready for review November 2, 2026 13:11
@mayur-tolexo
mayur-tolexo force-pushed the docs/audit-event-classes branch from 27d2cb5 to 0428b42 Compare November 2, 2026 13:11
…on_trace

The audit trail returns three OCSF event classes: API Activity for a call,
Process Activity for a program that ran in the sandbox, and Network Activity
for a connection it opened. AuditProcess, AuditFile, AuditDstEndpoint and
AuditDevice are exported; api and resources are None outside API Activity.

sandboxes.update and sandbox.update accept execution_trace to turn program
recording off or back on, and sandbox.execution_trace reports it.

The API reference gains an Audit trail section covering the classes, their
fields, which filters apply to which class, and how to tie a program to the
call that started it. The audit_trail example prints all three classes and
does that walk.

The step-by-step examples README shows the output both audit examples now print.

Signed-off-by: Mayur Das <mayur.das@neevcloud.com>
@mayur-tolexo
mayur-tolexo force-pushed the docs/audit-event-classes branch from 0428b42 to a29f8f0 Compare November 2, 2026 13:12
@mayur-tolexo
mayur-tolexo merged commit 527d63c into main Nov 2, 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