Skip to content

Harden lockdown handling for pull request commit content #3105

Description

@SamMorrowDrums

Describe the bug

Lockdown mode applies trust checks to several pull request content surfaces but not to commit messages returned by pull_request_read with get_commits. Align this content path with the existing best-effort lockdown model and document intentional trusted-bot exceptions.

Affected version

Current main as of 2026-08-19.

Steps to reproduce the behavior

  1. Enable lockdown mode.
  2. Read commits from an untrusted fork pull request.
  3. Observe that commit messages are returned without the trust handling applied to other pull request content.

Expected vs actual behavior

Expected: lockdown treats comparable pull request content consistently, and documented behavior includes trusted-bot exceptions.

Actual: commit messages use a separate path without the same handling, and the exception is not clearly documented.

Logs

N/A

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