feat(offboard): print GitHub cleanup commands - #6
Open
DerekRoberts wants to merge 8 commits into
Open
DerekRoberts wants to merge 8 commits into
DerekRoberts wants to merge 8 commits into
Conversation
The audit still does not mutate GitHub. Org and team deletes are labeled as needing an owner; direct collaborator and environment reviewer commands are for repository admins.
Use remove-role-from-user so a shared RoleBinding is not deleted. The audit still does not run oc writes.
Drop the repo admin prefix so the helper path is the whole line. Notes that are not commands start with a hash.
GitHub has no per-reviewer delete, so the report now prints a GET-then-PUT pipeline instead of a helper script.
The GET-then-PUT jq pipeline is not pasteable; the helper is the convenient command.
Indented commands never land in bash history. Notes stay under findings; gh/oc/helper lines are a paste block after each person.
The matching line named other owners. One entry per file; search skips files already listed.
--org already selects which organizations to scan. Membership and teams still list; the DELETE lines need an org owner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Print cleanup commands so leftover access can be removed without a delete mode in the audit.
Summary
#notes stay under the finding.gh,oc, the environment helper) are printed again at column 0 after each person, so a paste hits bash history.OWNER/REPO: pathonly. Matching lines (other owners) are not printed. Code search does not repeat a file already listed.--org-owneris set.--orgstill means which organizations to scan.binding -> role(no subject parenthetical; the subject is in theocline).remove-role-from-user, not deleting the RoleBinding.Test plan
bats offboard/tests(30) and shellcheck--severity=warningin PodmanDELETE orgs/unless--org-owner;oc/ghrepo lines at column 0