Skip to content

feature and fixes sync from development branch#519

Merged
grafuls merged 25 commits intomasterfrom
development
Feb 13, 2026
Merged

feature and fixes sync from development branch#519
grafuls merged 25 commits intomasterfrom
development

Conversation

@sadsfae
Copy link
Member

@sadsfae sadsfae commented Feb 13, 2026

  • Add ability to use env variables for username and password
  • Fix logging for traceback obscuring proper error handling when credentials are invalid

fixes: #496
fixes: #517

sadsfae and others added 25 commits February 11, 2026 11:08
* Add these new vars for safer badfishing
  - BADFISH_PASSWORD
  - BADFISH_USERNAME
  - BADFISH_NEW_PASSWORD
  - BADFISH_OLD_PASSWORD

* Update venv example for PYTHONPATH

fixes: #496
* incorpoate some suggestions from @stephane-chazelas
* This is clumsy and very unlikely these values will be an env variable.
* Nothing keeps people from securing it with a temporary export but it
  is not in scope for using stored env vars which tend to be static or
change rarely and thus makes more sense to concentrate on for this
feature.
feat: support auth via env vars
* find_session_uri masks a proper error message when someone passes
  incorrect credentials (either by vars or user/pass).
* response body seems to be a JSON object and not a redfish root object
  and we are not generating a useful error, instead the user gets a
traceback that masks the real cause.

before (see #517)

after

-=>>PYTHONPATH="./src" python3 src/badfish/main.py -H mgmt-d23-h31-000-r650.example.com -u root -p awrongpassword --power-state
- WARNING  - Passing secrets via command line arguments can be unsafe. Consider using environment variables (BADFISH_USERNAME, BADFISH_PASSWORD).
- ERROR    - Failed to authenticate. Verify your credentials for mgmt-d23-h31-000-r650.example.com

* Also remove asyncio import from tests/test_main_coverage.py as it
  wasn't being utilized.

fixes: #517
fix: Incorrect credentials are masked by traceback
chore: fix debug logger typo
@grafuls grafuls merged commit ae3e12b into master Feb 13, 2026
9 checks passed
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.

[BUG] Incorrect credentials are masked by traceback badfish accepts secrets as command line arguments

2 participants