Skip to content

Connect GitHub Actions to SafeDep Cloud with no API key - #138

Merged
vignesh2731 merged 7 commits into
mainfrom
claude/pensive-sagan-3x8any-workload-identity
Nov 29, 2026
Merged

vignesh2731 merged 7 commits into
mainfrom
claude/pensive-sagan-3x8any-workload-identity

Conversation

@abhisek

@abhisek abhisek commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Closes #132. Part of safedep/control-tower#1691.

What changes

  • New how-to, governance/cloud/github-actions-without-api-key.mdx (Visibility & Governance > SafeDep Cloud). It covers:
    • who does what: an owner of the GitHub organization links the app, and a SafeDep Cloud Owner or Admin creates the rule;
    • the prerequisites, including the tenant domain for tenant-id;
    • three steps: link the app, check the provider, create the org-wide rule;
    • the workflow change for PMG and for vet v2, in OIDC mode;
    • moving from an API key, with the endpoint id warning first;
    • how to narrow a rule, and how to allow events outside the defaults;
    • a troubleshooting table that quotes the real messages of the action, the CLI and the server.
  • New concept page, concepts/workload-identity.mdx (Core Concepts). A short overview:
    • what a workload identity is, and the three records: provider, trust rule, exchange;
    • what SafeDep supports. A provider has a kind, and GitHub Actions is the only kind today;
    • links to the how-to and to the details.
  • New "Workload identity" section in governance/cloud/authentication.mdx, with the details:
    • how a job gets a credential;
    • what a credential can do;
    • which events a rule covers, and why;
    • what a compromised step can do;
    • other cloud accounts, fork pull requests and self-hosted runners;
    • when to keep an API key.
  • Changed pages:
    • package-security/pmg/github-actions.mdx:
      • a new OIDC mode subsection;
      • tenant-id alone now selects OIDC mode, which replaces the old "set both or neither" rule;
      • the post step revokes the credential;
      • the "Apply the cloud policy" section is corrected. Since pmg v0.36.0, the action fetches the policy before its step ends in every mode. The page said the proxy fetched it 15 seconds after it started.
    • governance/cloud/endpoint-hub/ci-package-blocks.mdx points to OIDC mode. The endpoint id is gh:<owner>/<repo> in both modes.
    • docs.json, docs-ia.md (R4 list and section 7), the R4 line in CLAUDE.md, and the docs skill now list the new pages.

Minimum releases

Each safedep workload command and flag on the pages, and each quoted PMG message, exists at those tags. vet v2 has no version number. The page links to the vet v2 action docs.

Facts checked against source, which differ from the issue

  • The endpoint id is gh:<owner>/<repo> (fix(action): default the endpoint id to gh:<owner>/<repo> pmg#626), not gha/<repository>.
  • Without the "Members: read" permission, the link stays unverified with no error from the link step. The signs are an empty safedep workload provider list and the exchange message about a missing provider. The troubleshooting table covers both.
  • safedep workload rule create has no flag for environment, workflow_ref, job_workflow_ref or runner_environment. The server accepts them, and the pages say so.
  • When several rules match, the rule with the most conditions sets the lifetime and the project binding. A narrower rule does not limit the org-wide rule.
  • After a GitHub App reinstall, the new link gets a new provider. The old provider stays as unlinked, so the rules must be created again. Projects reattach by safedep/control-tower#1728.
  • A credential that a workflow step exchanges for itself outlives the job, up to the rule's maximum lifetime. Only the action's own credential is revoked in the post step.

Checks

  • bunx -b mintlify broken-links shows only the three known essentials/ failures.
  • No em-dash in the changed lines.
  • A readability review read the pages as a platform engineer and as a security reviewer, and its findings are applied in 7b19b18.

Not verified against source: the console's Tenant ID wording (taken from the existing docs), the GitHub screen where an owner accepts the new permission, and how an owner reruns the link flow for an existing installation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz

PMG and vet v2 in GitHub Actions can now trade the GitHub OIDC ID token
of a job for a short-lived SafeDep Cloud credential. The docs only told
users to store an API key in GitHub secrets.

- Add the how-to governance/cloud/github-actions-without-api-key: link
  the GitHub App as an organization owner, check the provider, create the
  org-wide rule, change the workflow, narrow the rule, move from an API
  key, and fix each refusal.
- Add the concept concepts/workload-identity: how a job gets a
  credential, what the credential can do, the default events, and the
  security considerations of id-token: write.
- PMG in GitHub Actions: add OIDC mode to Connect to SafeDep Cloud, fix
  the rule that both inputs are required, and say that a host proxy keeps
  an API key.
- Authentication and Review CI Blocks: point to the OIDC mode.
- docs.json, docs-ia.md, CLAUDE.md and the docs skill list the new pages
  and the new concept.

The minimum CLI and PMG versions are the placeholders {{CLI_VERSION}}
and {{PMG_VERSION}}, to replace with the release tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
The GitHub Action page said that in server mode the proxy fetches the
cloud policy 15 seconds after it starts, and that shim mode needs a
pmg cloud sync step before the first install. Since pmg v0.36.0, the
action runs pmg cloud sync --require-policy in every mode before its
step ends, so the first install applies the policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
A readability review found that the pages left out who does each step,
used terms before they defined them, and put one fact in several places.

- The how-to names both people: an owner of the GitHub organization
  links the app, and a SafeDep Cloud Owner or Admin creates the rule. It
  adds the tenant domain as a prerequisite and a check step with the
  issued outcome. The migration comes right after the workflow change,
  one instruction per step. The troubleshooting table has a cause column
  and follows the order that a job meets each message.
- The concept page adds "What a compromised step can do": the grant,
  the reach, and the life of a credential that a step gets for itself,
  which the post step does not revoke. Its labels are now headings.
- Each fact has one home: the default events in the how-to, the event
  risk, forks and self-hosted runners in the concept, and the api-key
  precedence and post step on the PMG page.
- The PMG page and Review CI Blocks name OIDC mode and the endpoint
  rule of each mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
@safedep

safedep Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

View complete scan results →

This report is generated by SafeDep GitHub App

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T08:38:15.153333Z 160d538 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 7b19b18b1a

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

safedep/pmg#636 made the PMG action fail the step when SafeDep Cloud
refuses the workload identity exchange. The troubleshooting section said
that the job continued with the local config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
Comment thread concepts/workload-identity.mdx Resolved
Comment thread concepts/workload-identity.mdx Resolved
Comment thread governance/cloud/authentication.mdx Resolved
…to Authentication

The concept page now says what a workload identity is, what SafeDep
supports and where to set it up. A provider has a kind, and GitHub
Actions is the only kind today. How a job gets a credential, what the
credential can do, the events a rule covers, the security limits and
when to keep an API key move to a Workload identity section of the
Authentication page. Links to those sections follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
@vignesh2731
vignesh2731 merged commit 5ace8da into main Nov 29, 2026
4 checks passed
@vignesh2731
vignesh2731 deleted the claude/pensive-sagan-3x8any-workload-identity branch November 29, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Workload Identity] How-to, migration from API keys, and security notes

3 participants