Interview Prep/GitHub Actions/Secrets, OIDC & Environments

An org secret must be available only to three repos. How? And how do you audit who used it?

BeginnerScenarioSecrets, OIDC & Environments
Answer

Situation read → Scoped org secret.

What I'd do →

  1. gh secret set NEXUS_TOKEN --org devopsshack --visibility selected --repos svc-a,svc-b,svc-c.
  2. Audit: org audit log events for secret changes; for usage, the credential's own server logs (Nexus access log) since GitHub does not log secret reads per run.

Why → Least distribution; usage auditing must happen at the target system.

Interview tip → Admit the limitation: GitHub records secret management, not per-run usage.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, OIDC & Environments