Skip to content

fix(inventory): resolve NetBox credentials from command variables - #31

Merged
ntwrknrd merged 1 commit into
mainfrom
fix/netbox-command-credentials
Oct 19, 2026
Merged

ntwrknrd merged 1 commit into
mainfrom
fix/netbox-command-credentials

Conversation

@ntwrknrd

Copy link
Copy Markdown
Owner

NetBox inventory refresh fails when credentials are supplied by NETBOX_URL_CMD and NETBOX_TOKEN_CMD rather than exported values or ~/.env. Resolve the configured variable directly first, then its _CMD command, then the existing dotenv fallback.

Commands run through /bin/sh with a 10-second timeout and parent cancellation. Failed or empty commands stop the lookup without exposing command text, stdout, or stderr in errors. No credentials are persisted.

Validation: make container-test passed (dependency/format checks, vet, all tests, builds, lint, and four-platform cross-compilation). Added tests cover precedence, whitespace, dotenv fallback, empty output, sanitized failures, and cancellation. Updated the embedded configuration comments. CLI help and SSH credential delivery are unchanged.

@ntwrknrd
ntwrknrd merged commit bfee8db into main Oct 19, 2026
3 checks passed
@ntwrknrd
ntwrknrd deleted the fix/netbox-command-credentials branch October 19, 2026 10:08
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