Skip to content

Audit log records who and where but not what, and has no job ID #500

Description

@retr0h

audit.Entry (internal/audit/types.go) holds user, roles, method, path, operation ID, source IP, response code and duration. The middleware (internal/controller/api/middleware_audit.go) never reads the request body and does not record the job ID the handler creates.

Impact: after an incident the audit log can show who called command/shell against which host and when, but not what ran. File writes, sysctl values and cron content are equally unrecorded, and an audit entry cannot be joined to the job's status timeline.

Fix: record a redacted summary of the request for mutating operations (command and arguments, target path, key) and the job ID. Agent-side events such as redelivery would make the trail complete.


Found in the September 2026 codebase review. Tracked in the review tracking issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions