Skip to content

[cl] Redact credentials in task logs and uploaded artifacts - #247

Merged
anfimovdm merged 1 commit into
clfrom
al-alts-cl-redact-credentials-in-logs
Nov 8, 2026
Merged

anfimovdm merged 1 commit into
clfrom
al-alts-cl-redact-credentials-in-logs

Conversation

@anfimovdm

Copy link
Copy Markdown
Contributor

Backport of #229 (498dcf1) from master to cl.

Build repository URLs carry the build system token and terraform TRACE logs can contain the OpenNebula password; both ended up in logs uploaded to Pulp. This masks URL credentials and known config secrets in command outputs, artifact files and task loggers, and hides repository URLs in the ansible repository tasks.

Differences from the master commit

  • alts/shared/utils/log_utils.py: merged with the cl-only helpers (get_temp_log_files, read_and_cleanup_temp_log_files, check_for_error_string).
  • resources/roles/preparation/tasks/rhel.yml: no_log/loop_control applied to cl's "Add required repositories" task (the one with the Amazon priority), which sits earlier in the file than on master.
  • resources/roles/preparation/tasks/alpine.yml (cl-only): the APK repository task gets the same no_log/loop_control treatment.

Testing

  • tests/shared/test_log_utils.py: 11 passed.
  • Syntax check of alts/worker/runners/base.py and alts/shared/models.py.

🤖 Generated with Claude Code

Build repository URLs carry the build system token and terraform TRACE
logs can contain the OpenNebula password; both ended up in logs uploaded
to Pulp. Mask URL credentials and known config secrets in command
outputs, artifact files and task loggers, and hide repository URLs in
the ansible repository tasks, including the Alpine one.

(cherry picked from commit 498dcf1)
@anfimovdm
anfimovdm merged commit cbde5ff into cl Nov 8, 2026
1 of 3 checks passed
@anfimovdm
anfimovdm deleted the al-alts-cl-redact-credentials-in-logs branch November 8, 2026 22:34
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.

1 participant