Skip to content

bug(audit): a permissions replacement is audited with no targets — permissions_set details.targets is always null #3549

Closed

Description

@obasilakis

Summary

Replacing an agent's collaboration permissions writes a permissions_set audit row whose details.targets is always null. The row records that the set changed and for which agent, and drops which agents were granted.

Build + row

v1.0.0-rc2 (96f88f982), release-test row B10.

Steps

  1. As an admin, PUT /api/agents/{name}/permissions with {"permitted_agents": ["<other-agent>"]}. Response: 200 {"status":"updated","permitted_count":1}.
  2. Read the audit log and find the authorization / permissions_set row for {name}.

Expected

details.targets lists the agents in the new set (an empty list when the set was cleared).

Actual

details: {"targets": null} on every replacement, including the save made from the Permissions tab.

Where

src/backend/routers/agent_files.py::set_agent_permissions builds the audit details with body.get("permissions") or body.get("targets"). The request key the handler's own logic reads (services/agent_service/permissions.py::set_agent_permissions_logic) and the frontend sends is permitted_agents.

Acceptance criteria

  • The permissions_set audit row carries the list of target agents that was saved
  • A cleared set is recorded as an empty list, distinguishable from a missing value
  • A test asserts the audit details for a PUT with permitted_agents

Activity

  1. added
    priority-p3
    type-bug
    complexity-low
    on Oct 11, 2026
  2. added
    status-ready
    theme-security
    on Oct 12, 2026
  3. added
    status-in-dev
    on Nov 2, 2026
  4. removed
    status-ready
    on Nov 2, 2026
  5. removed
    status-in-dev
    on Nov 18, 2026
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

    complexity-lowpriority-p3theme-securitytype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions