security

Find CI jobs that still reference a retiring token

Use secret references and job evidence to find CI consumers that rely on a retiring token, including scheduled pipelines and less active branches.

TrustIvan · · 5 min read

A nightly CI job has used the replacement credential all week. The previous token is still referenced by a monthly reconciliation job that runs in a shared workflow. The first green pipeline is good evidence for the nightly consumer only. Map references and execution before scheduling retirement.

Read three consumers against the same retirement plan

ConsumerReference in current job configurationNext observation
Nightly exportReplacement aliasConfirm recent scheduled execution
Monthly reconciliationShared workflow defaultConfirm next sanctioned fixture run
Recovery jobRetained prior environment configurationReview approved recovery rehearsal

Use fictitious aliases and never expose credential values in the inventory. The table deliberately mixes direct, inherited and retained references. Follow each job to the effective configuration at the revision it executes. A search of latest repository defaults can miss a scheduled job attached to a maintained release branch or a reusable workflow that provides the default in a separate repository.

Trace the principal to the workload that uses it

Record the stable principal identity, authorized purpose, account scope and owning team. Store execution identity, observed activity, credentials and effective grants as distinct evidence where they come from different systems. A job definition can describe a reference while a runtime event shows the principal it actually used. Prefer the authority that can confirm each claim. Include inherited grants and scheduled consumers in the review scope. An identity can appear idle during a short observation interval because the next job has yet to run.

Use approved configuration inventories and job logs that omit secret values. Record repository, pipeline, branch or schedule, and the secret reference. Confirm inherited organization, environment or repository settings with pipeline owners. If multiple locations have the same name, ask each owner to identify the issuer or credential version attached to the job.

Start from the authorized credential registry and list the projects and principals permitted to use the retiring credential. Compare that list with declared pipeline references. Use execution metadata available in approved tooling to establish which references were exercised recently. Mark a declared consumer with no execution during the review window as pending. The monthly job in this fixture falls into that category until its workflow and resulting observation have been checked.

Choose an observation that tests the intended access

Start the monthly job exercise with a read of its scheduled configuration, then compare that with the inputs reported by the last authorized run. If the run predates the replacement, it confirms the old default was in use at the time and does not tell you the next execution's reference. Use the approved staging workflow to obtain a new observation for the monthly case. For recovery, trace which retained workflow revision an operator can select and give that revision its own fixture. A nightly run cannot resolve either gap.

Expand the calendar to include a failed run and its retry. In the fixture an engineer manually retries a previous revision while the current first-party pipeline points to the replacement. Ask the CI owner whether retries load historical job configuration. Then use an approved staging or dry-run workflow to demonstrate the new reference in the supported retry path. Document an owner for each path the CI owner cannot verify.

Preserve responsibility through the next change

The handoff should give the incoming reviewer the principal and workload references, current effective permissions, last observed activity and the next decision date. Attach the approving role and independent evidence for scope changes. Retain the history when an identity is split into multiple records or an old reference is retired. Capture exceptions individually when a dormant consumer or delayed schedule leaves open work. Assign one accountable owner for getting that evidence, even if several teams can provide a piece of it.

Promote the ready nightly job and wait for evidence on the other two. Give the retirement decision an exact cutoff and list the observations required before revocation. One entry should state which approved system shows the version or alias used. A job's success can confirm functionality yet leave the credential version uncertain unless the event or workload record provides that evidence.

Retire the older token only after critical consumers pass an approved verification run or a controlled maintenance plan accounts for them. Record unresolved jobs and escalation paths. When comparing identity tools, ask whether their workflow shows configured consumers, observed events or both. The non-human identity comparison is a starting point for interpreting inventory coverage.

After retirement, keep an agreed monitoring period aligned with the slowest authorized consumer. If a job fails, link its run and effective configuration to the decision record and route it to the workflow owner. Carry the recovery plan separately so the operator has an approved next action even when the previously referenced credential is gone.

Include project transfer in the rehearsal. When the job moves to another project, confirm that its effective reference and allowed consumer identity still match the authorized replacement. An inherited reference that resolves in one project can be absent when the receiving team takes over.