security

Remove exposed credentials from release logs

Restrict access to release logs and support copies containing a secret, track credential retirement and record cleanup without duplicating sensitive data.

TrustIvan · · 5 min read

A release operator learns that a credential value appeared in a job log. In this fictional incident, the credential owner begins containment while the CI administrator identifies who could read the affected run. A clean screenshot after removal is one observation. The incident still needs a version history, a controlled evidence record, and a check that the next build cannot repeat the disclosure.

Sketch the log copies before changing retention

SurfaceAuthoritative reviewer
Original CI run and attached artifactsCI administrator
Forwarded log event and retained snapshotsLogging owner
Ticket or bot notification carrying job outputIncident communications owner
Credential status and replacement consumerCredential owner

Use only incident IDs, log object identifiers and timestamps in the working record. Review available access logs for the exposure window through the authorized incident process. A forwarding or export path changes who could read affected output and where a retained copy may remain. Ask each reviewer to confirm their search scope and the steps they can authorize under the incident evidence handling and retention rules.

Inventory references and versions using metadata

Use the owner's approved secret inventory, references and provider events. Capture aliases, version identifiers and consumer identities only at the level authorized for the record. Treat evidence such as rollout records and provider events as potentially sensitive metadata. Give the people responsible for the cutover or incident access through their normal channels. A change in a secret store and a consumer's successful authentication are different observations. Record which consumer and time each source covers before deciding whether a rotation reached the intended workload.

Inventory copies using job, artifact and ticket identifiers. Avoid copying the relevant log lines into the cleanup record. Assign an owner for each system that can restrict or remove the record and preserve required incident evidence in the approved restricted store. Where a copy cannot be removed immediately, document the access controls, retention limit and follow-up date.

Begin the credential response promptly through the approved process and confirm that the intended replacement supports normal workload behavior. For log handling, coordinate access restriction and any redaction or removal with the incident owner. There may be a retention or investigation requirement for an original copy in a restricted system. Update the record when each accessible copy is controlled and mark any surface the assigned team cannot yet verify.

Choose a check that covers real consumer timing

In the review record, put log surfaces on the left and the people who can confirm a disposition on the right. Give the CI owner the run ID, the logging owner the receiving time window and the responder the incident reference. Ask each to record when access changed and what copy they assessed. The response could restrict the CI log first and leave an archive awaiting its owner's decision. Surface that chronology directly instead of giving the incident a single timestamp for all copies.

In a dedicated test job, use a harmless marker to evaluate the logging change. Exercise normal completion and a failing step, because error output may follow a different path through the build. Confirm that notifications and attached diagnostics also handle the marker according to the test plan. The fixture's successful outcome applies to those output paths, and the credential response has its own evidence and chronology.

Document the outcome in the restricted record

A replacement can be ready while some consumers still depend on the previous credential. Record which events show new use and which checks support ending the old permission. Preserve the time and authority for disablement or revocation. If log or incident evidence needs review, link to the approved system with its access controls intact. The person receiving the handoff should see any outstanding consumer and the next scheduled check without needing to inspect secret material. Retain the calendar entry for delayed consumers and the owner responsible for following through.

Separate the time of publication from the time each affected copy became restricted. Review who could obtain that copy and which telemetry supports the conclusion. Some historical access records may have limited resolution. Record the period and systems they cover rather than treating an empty result as proof that nobody accessed the log.

Verify that new runs no longer print the value and confirm that the issuer retired the old credential. Measures such as redacting the source log and clearing search caches may require separate verification. The credential exposure use case discusses ownership and reach, and the revocation evidence guide covers closure.

For closure, a second operator should find the authorized response record, confirmation of the old credential's status, and the regression test for the output change. Include the owner responsible for security review of any unverified copy. Run that harmless test again when the release logging or forwarding configuration changes.

Check the UI, downloaded archive and any link shared by the job notifier independently. The CI administrator can validate whether these paths reference the same copy or retain their own output snapshots, which determines the incident owner's remaining coordination work.