Skip to content

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

Open
RamyElkest wants to merge 1 commit intomainfrom
ramy.elkest/migrate-dd-octo-sts-workflows
Open

chore: migrate DD_K9_LIBRARY_GO_APP_PRIVATE_KEY to dd-octo-sts#816
RamyElkest wants to merge 1 commit intomainfrom
ramy.elkest/migrate-dd-octo-sts-workflows

Conversation

@RamyElkest
Copy link
Copy Markdown
Contributor

@RamyElkest RamyElkest commented Apr 2, 2026

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/dd-octo-sts-action@v1.0.4 (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

Copy link
Copy Markdown
Contributor Author

RamyElkest commented Apr 2, 2026

@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
Copy link
Copy Markdown

datadog-datadog-prod-us1 bot commented Apr 2, 2026

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 69.06%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8151c6b | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@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) <noreply@anthropic.com>
Base automatically changed from ramy.elkest/migrate-dd-octo-sts to main April 3, 2026 10:00
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) <noreply@anthropic.com>
@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
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

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.

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