v0.0.25: security and robustness fixes from the project review #42

Merged
Sebi merged 1 commits from fix/project-review-findings into main 2026-11-16 20:16:12 +00:00
Owner

Changes

  • Security: netssh.yaml is read from the user config directory only, no longer from the working directory.
  • Security: addresses from NetBox or the cache that are neither an IP address nor a hostname are refused (ssh read -oProxyCommand=… as an option).
  • The resolver chain stops at an API failure; only "no address" (including the HTTP 400 of a missing interface) falls through to the next strategy.
  • netssh --help and -h show netssh's help.
  • At most one background cache refresh every 5 minutes.
  • The legacy netbox.url is validated.
  • All pages of a host's IP addresses are read (at most 100 before).
  • CI: new workflow test.yml (format check, go vet, go test -race) for pull requests and pushes to main.
  • Changelog for v0.0.25.

Behaviour change

A token without permission to read IP addresses (HTTP 403) now gives an error with management_subnet/interface_name instead of silently falling back to primary_ip.

Tests

go vet ./... and go test -race ./... pass locally; every fix has a test. The Docker tests under testenv/ were not run.

🤖 Generated with Claude Code

## Changes - **Security:** `netssh.yaml` is read from the user config directory only, no longer from the working directory. - **Security:** addresses from NetBox or the cache that are neither an IP address nor a hostname are refused (ssh read `-oProxyCommand=…` as an option). - The resolver chain stops at an API failure; only "no address" (including the HTTP 400 of a missing interface) falls through to the next strategy. - `netssh --help` and `-h` show netssh's help. - At most one background cache refresh every 5 minutes. - The legacy `netbox.url` is validated. - All pages of a host's IP addresses are read (at most 100 before). - CI: new workflow `test.yml` (format check, `go vet`, `go test -race`) for pull requests and pushes to `main`. - Changelog for v0.0.25. ## Behaviour change A token without permission to read IP addresses (HTTP 403) now gives an error with `management_subnet`/`interface_name` instead of silently falling back to `primary_ip`. ## Tests `go vet ./...` and `go test -race ./...` pass locally; every fix has a test. The Docker tests under `testenv/` were not run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sebi changed title from v0.0.25: Sicherheits- und Robustheitsfixes aus dem Projekt-Review to v0.0.25: security and robustness fixes from the project review 2026-11-16 18:28:26 +00:00
Sebi added 1 commit 2026-11-16 18:29:02 +00:00
fix: harden config loading and ssh addresses, stop resolver on API errors
Test / test (pull_request) Successful in 6m7s
Release / release (push) Successful in 5m14s
3e0a8ff67a
- read netssh.yaml from the user config directory only, not from the
  working directory
- refuse addresses from NetBox or the cache that are neither an IP
  address nor a hostname (ssh read "-oProxyCommand=…" as an option)
- resolver chain stops at an API failure; only "no address" falls
  through to the next strategy
- netssh --help and -h show netssh's help
- start at most one background cache refresh per 5 minutes
- validate the legacy netbox.url
- page through all IP addresses of a host
- CI: run format check, vet, and tests on pull requests and main
- changelog for v0.0.25

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sebi force-pushed fix/project-review-findings from 4287b7b650 to 3e0a8ff67a 2026-11-16 18:29:02 +00:00 Compare
Sebi merged commit 1f46d9d9e5 into main 2026-11-16 20:16:12 +00:00
Sebi deleted branch fix/project-review-findings 2026-11-16 20:16:14 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sebi/ssh-netbox-wrapper#42