Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip-ci] Make leak-detection readable by humans #21459

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

cevich
Copy link
Member

@cevich cevich commented Jan 31, 2024

Previously when a leak was detected under any circumstance, the workflow would splat out a giant wall of gray, unreadable git-log text. This often enormous text might contain, somewhere, possibly, maybe, a little tiny snippet of code that leaks a secret.

Improve the situation greatly by providing easy-to-use URLs that covers the relevant changes based on the triggering context (new pr, force-push, or merge). Store the former (often) giant git-log output into a file and stuff it into the artifacts in case it's ever useful.

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jan 31, 2024
@cevich
Copy link
Member Author

cevich commented Jan 31, 2024

The intended output urls should look something like what I've linked below for "shows url" against this reference PR. I've also linked the exact "workflow" for each event.

Example URLs shown in workflow log:

Note: I made this list by manually copy-pasting based on what the code changes should echo. I can't easily test the actual workflow changes before they're merged. If it doesn't work, I'll open up followup PRs to correct.

Edit: If it helps, in each "workflow" link, there's a Show important context details log item with a The trigger event JSON drop-down. That shows where the SHA's are being queried from.

Previously when a leak was detected under any circumstance, the workflow
would splat out a giant wall of gray, unreadable git-log text.  This often
enormous text might contain, somewhere, possibly, maybe, a little tiny
snippet of code that leaks a secret.

Improve the situation greatly by providing easy-to-use URLs that covers
the relevant changes based on the triggering context (new pr, force-push,
or merge).  Store the former (often) giant git-log output into a file
and stuff it into the artifacts in case it's ever useful.

Signed-off-by: Chris Evich <cevich@redhat.com>
@cevich cevich marked this pull request as ready for review January 31, 2024 19:00
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 31, 2024
@cevich
Copy link
Member Author

cevich commented Jan 31, 2024

@edsantiago @lsm5 not super-critical, but when you get a chance PTAL. I'm hoping this should ease the pain of checking for leaks based on a flood of podman-monitor e-mails.

This doesn't make the leak-review task completely effortless, but at least it colorizes the diff in green and red, and offers a 'hide' button for each file in the commit 😄

@mheon
Copy link
Member

mheon commented Jan 31, 2024

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jan 31, 2024

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2024
Copy link
Contributor

openshift-ci bot commented Jan 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2024
@TomSweeneyRedHat
Copy link
Member

LGTM

@openshift-merge-bot openshift-merge-bot bot merged commit 4fde98f into containers:main Jan 31, 2024
92 checks passed
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label May 1, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants