OrganizationAudit Log

Audit Log

Immutable, searchable audit trail of every significant action in your organization.

Every significant action on Drok is recorded in an immutable audit log. Who did what, when, and from where — for every repository change, permission modification, authentication event, and administrative action.

Viewing the Audit Log

Web Interface

Navigate to Organization Settings > Audit Log. The log displays events in reverse chronological order with filtering and search.

CLI

drok audit-log my-org
drok audit-log my-org --since 2024-01-01 --until 2024-01-31
drok audit-log my-org --actor @alice
drok audit-log my-org --action "repo.*"

API

curl "https://drok.us/api/v1/orgs/my-org/audit-log?per_page=100" \
  -H "Authorization: Bearer $Drok_TOKEN"

Event Categories

Repository Events

EventDescription
repo.createRepository created
repo.deleteRepository deleted
repo.visibility_changeRepository visibility changed
repo.transferRepository transferred to another owner
repo.archiveRepository archived or unarchived
repo.settings_changeRepository settings modified

Access Events

EventDescription
access.collaborator_addCollaborator added to repository
access.collaborator_removeCollaborator removed from repository
access.permission_changePermission level changed
access.team_repo_addTeam granted repository access
access.team_repo_removeTeam repository access revoked

Authentication Events

EventDescription
auth.loginUser login (method: password, SSO, token)
auth.login_failureFailed login attempt
auth.logoutUser logout
auth.token_createPersonal access token created
auth.token_revokePersonal access token revoked
auth.ssh_key_addSSH key added
auth.ssh_key_removeSSH key removed

Organization Events

EventDescription
org.member_addMember added to organization
org.member_removeMember removed from organization
org.role_changeMember role changed
org.team_createTeam created
org.team_deleteTeam deleted
org.sso_configureSSO configuration changed
org.settings_changeOrganization settings modified

Security Events

EventDescription
security.branch_protection_changeBranch protection rule modified
security.secret_createPipeline secret created
security.secret_deletePipeline secret deleted
security.vulnerability_detectedSecurity vulnerability found in package

Event Format

Each audit log entry contains:

{
  "id": "evt_01H8XYZABC123",
  "timestamp": "2024-03-15T14:30:22Z",
  "actor": {
    "id": "usr_01H8ABC",
    "username": "alice",
    "ip_address": "203.0.113.42"
  },
  "action": "repo.visibility_change",
  "target": {
    "type": "repository",
    "id": "repo_01H8XYZ",
    "name": "my-org/my-repo"
  },
  "details": {
    "old_visibility": "private",
    "new_visibility": "public"
  },
  "user_agent": "drok-cli/1.4.2",
  "geo": {
    "country": "US",
    "region": "MA",
    "city": "Boston"
  }
}

Filter by Actor

drok audit-log my-org --actor @alice

Filter by Action

drok audit-log my-org --action "repo.*"
drok audit-log my-org --action "auth.login_failure"

Filter by Target

drok audit-log my-org --target repo:my-org/my-repo
drok audit-log my-org --target team:my-org/backend

Filter by Date Range

drok audit-log my-org --since 2024-03-01 --until 2024-03-31
drok audit-log my-org --search "visibility_change"

Retention

PlanRetention
Free30 days
Pro180 days
Organization1 year
EnterpriseUnlimited

Export

Export audit logs for external analysis or compliance:

# JSON export
drok audit-log my-org --since 2024-01-01 --format json > audit-2024.json
 
# CSV export
drok audit-log my-org --since 2024-01-01 --format csv > audit-2024.csv

Streaming Export

For real-time audit log streaming to external SIEM systems:

drok org edit my-org \
  --audit-stream-url "https://your-siem.com/ingest" \
  --audit-stream-token "your-token"

Drok streams audit events via HTTPS POST as they occur, with at-least-once delivery guarantees.

Immutability

Audit log entries are append-only. They cannot be modified or deleted by any user, including organization owners. This guarantees that the audit trail is a faithful record of all actions taken on the platform.