Harden credential cleanup and unblock Python CI - #2
Merged
Merged
Conversation
Stop atexit leftover cleanup from deleting cwd aws/ or installer archives TempFox did not create. Omit empty AWS_SESSION_TOKEN on AKIA paths, honor profile write results, classify expired tokens during CloudFox all-checks, and collect access key IDs via getpass. Add isolated AWS profile/CLI/CloudFox tests, a LICENSE file matching the README MIT terms, and make Codecov upload best-effort so the 3.11 job no longer fails without CODECOV_TOKEN. Co-authored-by: David Diaz <alfdav@users.noreply.github.com>
alfdav
marked this pull request as ready for review
August 15, 2026 23:22
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.


Summary
Verified recon findings against
main@354364fand landed the smallest correctness/safety/CI/test fixes. No roadmap features.Verified and fixed
cleanup_temp_files/cleanup_on_exitno longerrmtree("aws")or unlink installer zip/pkg names in cwd unless TempFox registered those paths as its own leftovers.AWS_SESSION_TOKENis omitted (and inherited values are popped) fortest_aws_connectionandrun_cloudfox_aws_all_checks.delete_aws_profilenow returns the AND of the credentials/config write results, so--cleanup-profilescan report a failed write.EXPIRED_TOKEN_INDICATORSuse the same warning as the connection test. No recursivemain().AWS_ACCESS_KEY_IDusesgetpasslike secret/token. No documented reason to echo it.codecov-action@v3+fail_ci_if_error: trueon 3.11 is the hypothesized cause of the redtest (3.11)job (upload exit 255, noCODECOV_TOKEN). Upgraded to@v5,fail_ci_if_error: false,continue-on-error: true. Does not invent a token. Do not treat CI as green until this workflow change has run on the PR.tests/test_aws_profiles.py— real generate/list/create/delete/write/chmod tests against an isolated tmp~/.aws.--list-profiles,--cleanup-profiles, and--no-profilethroughmain.MAX_OUTPUT_FILES), and the current “write files before returncode check” behavior.LICENSEpath 404 confirmed.Verified and skipped
defaultprofile orphans —get_tempfox_profilesstill only matchestempfox-*. That is why custom/defaultnames are not removed by--cleanup-profiles. No new cleanup UX was added; delete return values are now honest, and tests document the prefix filter.Test plan
make hygiene-fastbaseline on354364f(32 passed)make hygieneafter changes: ruff, format, mypy, pytest--cov-fail-under=35, repo-scanResidual risks
install_aws_clistill downloads/extracts into cwd. A first-time AWS CLI install can overwrite a pre-existing cwdaws/viaunzip -o. Cleanup will not delete a tree it did not create..txt/.jsonbefore checking returncode (unchanged; now tested).CODECOV_TOKENexists. This PR does not claim CI is green.Out of scope (unchanged)
Credential rotation, audit logging, multi-account orchestration, extensible checks, and the unmerged
claude/remove-dead-code-leiPMbranch.