Skip to content

ci(chainguard): Add dd-octo-sts policy for slapr workflow#47838

Open
chouetz wants to merge 1 commit intomainfrom
nicolas.schweitzer/slapr-chainguard
Open

ci(chainguard): Add dd-octo-sts policy for slapr workflow#47838
chouetz wants to merge 1 commit intomainfrom
nicolas.schweitzer/slapr-chainguard

Conversation

@chouetz
Copy link
Member

@chouetz chouetz commented Mar 14, 2026

What does this PR do?

Adds a new dd-octo-sts trust policy at .github/chainguard/self.slapr.read-members.sts.yaml to grant the slapr.yml workflow short-lived GitHub tokens with contents:read, pull_requests:read, and members:read permissions.

Motivation

The slapr workflow needs to read organization members to function properly. This policy allows it to obtain scoped tokens via dd-octo-sts instead of relying on broader credentials.

Describe how you validated your changes

Policy file follows the established dd-octo-sts pattern used by other policies in .github/chainguard/. The claim patterns match pull_request and pull_request_review events on PR merge refs and main.

Additional Notes

The policy scopes to:

  • Subject: repo:DataDog/datadog-agent:pull_request
  • Events: pull_request and pull_request_review
  • Refs: PR merge refs and main
  • Workflow: slapr.yml only

@dd-octo-sts dd-octo-sts bot added internal Identify a non-fork PR team/agent-devx labels Mar 14, 2026
@github-actions github-actions bot added the short review PR is simple enough to be reviewed quickly label Mar 14, 2026
@chouetz chouetz added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Mar 14, 2026
@chouetz chouetz marked this pull request as ready for review March 14, 2026 07:55
@chouetz chouetz requested a review from a team as a code owner March 14, 2026 07:55
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 042d1b9e63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

claim_pattern:
event_name: (pull_request|pull_request_review)
ref: refs/(pull/\d+/merge|heads/main)
job_workflow_ref: DataDog/datadog-agent/\.github/workflows/slapr\.yml@refs/(pull/\d+/merge|heads/main)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point policy to an existing workflow file

The job_workflow_ref claim is pinned to .github/workflows/slapr.yml, but this repository tree at ea79d7c4701cd4aa266eef005459d348358f120e does not contain that workflow file under .github/workflows/. Because dd-octo-sts only mints tokens when all claim patterns match, this policy is currently unreachable and will not grant the intended members:read token to any existing workflow run; either reference the actual workflow filename or include the workflow in the same change.

Useful? React with 👍 / 👎.

@agent-platform-auto-pr
Copy link
Contributor

Files inventory check summary

File checks results against ancestor 2c465803:

Results for datadog-agent_7.78.0~devel.git.590.042d1b9.pipeline.102518638-1_amd64.deb:

No change detected

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

Labels

changelog/no-changelog No changelog entry needed internal Identify a non-fork PR qa/no-code-change No code change in Agent code requiring validation short review PR is simple enough to be reviewed quickly team/agent-devx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant