ci(chainguard): Add dd-octo-sts policy for rshell version bump#49490
Open
ci(chainguard): Add dd-octo-sts policy for rshell version bump#49490
Conversation
5 tasks
Contributor
Files inventory check summaryFile checks results against ancestor 8ef69a70: Results for datadog-agent_7.79.0~devel.git.827.9591821.pipeline.108143236-1_amd64.deb:No change detected |
chouetz
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a
dd-octo-stspolicy allowing thebump_datadog_agentGitLab CI job inDataDog/rshellto mint a short-lived GitHub token scoped toDataDog/datadog-agentand open a PR bumping the pinned rshell version.Motivation
Today every rshell release requires a hand-crafted PR in this repo to bump the
github.com/DataDog/rshellline ingo.mod+ regeneratego.sum+ add a reno note. Companion PRDataDog/rshell#188adds a GitLab pipeline that automates this on every new rshell tag. This policy is the auth anchor that pipeline needs.Policy scope
issuerhttps://gitlab.ddbuild.iosubject_patternv*.*.*) OR pipelines onmainmainfor manual retries viaRun pipeline+BUMP_VERSIONclaim_pattern.project_pathDataDog/rshellpermissionscontents: write,pull_requests: writeMirrors the existing
self.buildimages-ci.push-to-datadog-agent.sts.yamlpattern for another external GitLab project acting on this repo.Upstream defence
Tag creation on
DataDog/rshellis already gated by two active GitHub rulesets — a DataDog org-wideGlobal Tag Protection (public repos)ruleset and a repo-specifictag-protectionruleset — both blocking creation/update/deletion of any tag for non-bypass users, with GPG/SSH signatures required. Only therelease.ymlworkflow (approval-gatedreleaseenvironment) and explicit admins can createv*tags. By the time a tag reaches GitLab via the pull-mirror, it has already been vetted upstream, which is why the policy does not additionally requireref_protected: "true"on the GitLab side.Describe how you validated your changes
project_path:DataDog/rshell:ref_type:tag:ref:v0.0.12) and for a main-branch pipeline (project_path:DataDog/rshell:ref_type:branch:ref:main) — both match.Possible Drawbacks / Trade-offs
Grants token-minting to rshell pipelines. Scope is intentionally minimal (two permissions) and restricted to the rshell project + either semver tags or
main. Feature-branch pipelines fail the subject regex.Additional Notes
Keep as draft until the companion
DataDog/rshell#188is ready to merge — these should land together.