Skip to content

chore: migrate DD_K9_LIBRARY_GO_APP_PRIVATE_KEY to dd-octo-sts#816

Merged
eliottness merged 1 commit into
mainfrom
ramy.elkest/migrate-dd-octo-sts-workflows
Apr 7, 2026
Merged

chore: migrate DD_K9_LIBRARY_GO_APP_PRIVATE_KEY to dd-octo-sts#816
eliottness merged 1 commit into
mainfrom
ramy.elkest/migrate-dd-octo-sts-workflows

Conversation

@RamyElkest

@RamyElkest RamyElkest commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Part 2 of 2 — depends on #815 (trust policies) being merged first.

Replaces actions/create-github-app-token with DataDog/dd-octo-sts-action for OIDC-federated short-lived tokens, eliminating the dependency on the shared DD_K9_LIBRARY_GO_APP_PRIVATE_KEY secret.

Why this depends on #815

dd-octo-sts reads trust policies from the target repo's default branch. The policies from #815 must be on main before this PR's workflows can exchange OIDC tokens. Once #815 merges, the self-mutation job on this PR can exercise the new token exchange.

Workflows migrated

Workflow Job What it does Token used for
deps-update.yml create-pr Automated dependency updates ghcommit-action signed commits + gh pr create
validate.yml self-mutation Push generated files to PR branches ghcommit-action signed commits

Changes

  • Replaced actions/create-github-app-tokenDataDog/[email protected] (SHA-pinned)
  • Added id-token: write to job permissions (required for OIDC exchange)
  • Dropped pull-requests: write from deps-update job permissions (now handled by dd-octo-sts token)

Test plan

🤖 Generated with Claude Code


Jira: APPSEC-62083

RamyElkest commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot added the conventional-commit/chore Maintenance work that does not show up in the release notes label Apr 2, 2026
@RamyElkest
RamyElkest marked this pull request as ready for review April 2, 2026 23:21
@RamyElkest
RamyElkest requested a review from a team as a code owner April 2, 2026 23:21
@datadog-datadog-prod-us1

This comment has been minimized.

@eliottness

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

github-merge-queue Bot pushed a commit that referenced this pull request Apr 3, 2026
## Summary

**Part 1 of 2** — adds trust policies only. Merge this first.

Adds dd-octo-sts trust policies to prepare for migrating
`deps-update.yml` and `validate.yml` workflows from
`DD_K9_LIBRARY_GO_APP_PRIVATE_KEY` to OIDC-federated tokens.

### Why split into two PRs?

dd-octo-sts reads trust policies from the **target repo's default
branch**. If we ship the policies and workflow changes together, the
workflow changes can't be tested on the PR itself — the policies aren't
on `main` yet. By merging policies first, the second PR's CI can
exercise the new dd-octo-sts token exchange.

### Policies added

| Policy file | Workflow | Events | Permissions |
|---|---|---|---|
| `self.github.deps-update.schedule.sts.yaml` | `deps-update.yml` /
create-pr | schedule, dispatch | `contents: write`, `pull_requests:
write` |
| `self.github.validate.self-mutation.sts.yaml` | `validate.yml` /
self-mutation | pull_request | `contents: write` |

Both are self-referential policies (orchestrion writing to itself).
These are needed because:
- `deps-update` creates PRs — disallowed for `GITHUB_TOKEN` per org
policy
- `self-mutation` pushes commits that must re-trigger CI —
`GITHUB_TOKEN` pushes don't trigger workflow runs

### Next step
After this merges → #816 migrates the workflows.

## Test plan
- [ ] Trust Policy Validation CI check passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Jira: APPSEC-62083

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Base automatically changed from ramy.elkest/migrate-dd-octo-sts to main April 3, 2026 10:00
@eliottness
eliottness force-pushed the ramy.elkest/migrate-dd-octo-sts-workflows branch from 6d318bc to 8151c6b Compare April 3, 2026 10:21
@eliottness
eliottness enabled auto-merge April 3, 2026 10:25
@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.82%. Comparing base (e061d12) to head (8151c6b).
⚠️ Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
+ Coverage   65.72%   70.82%   +5.10%     
==========================================
  Files         113      116       +3     
  Lines        7926     6900    -1026     
==========================================
- Hits         5209     4887     -322     
+ Misses       2192     1442     -750     
- Partials      525      571      +46     
Components Coverage Δ
Generators 83.23% <ø> (+2.98%) ⬆️
Instruments ∅ <ø> (∅)
Go Driver 75.58% <65.38%> (-0.23%) ⬇️
Toolexec Driver 74.78% <100.00%> (+7.25%) ⬆️
Aspects 76.97% <75.78%> (+5.06%) ⬆️
Injector 77.24% <77.14%> (+4.44%) ⬆️
Job Server 71.00% <55.55%> (+5.08%) ⬆️
Other 70.82% <65.33%> (+5.10%) ⬆️
see 108 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Replace actions/create-github-app-token with dd-octo-sts-action for
OIDC-federated short-lived tokens in deps-update and validate workflows.

Depends on the trust policies from the parent PR being merged first —
dd-octo-sts reads policies from the target repo's default branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@eliottness
eliottness force-pushed the ramy.elkest/migrate-dd-octo-sts-workflows branch from 8151c6b to bafdf87 Compare April 7, 2026 09:19
@eliottness
eliottness added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 4f971ef Apr 7, 2026
75 checks passed
@eliottness
eliottness deleted the ramy.elkest/migrate-dd-octo-sts-workflows branch April 7, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conventional-commit/chore Maintenance work that does not show up in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants