Skip to content

Switch to urfave/cli/v3 - #1060

Merged
aelsabbahy merged 3 commits into
goss-org:masterfrom
kgaughan:urfave-cli-v3
Jun 22, 2026
Merged

aelsabbahy merged 3 commits into
goss-org:masterfrom
kgaughan:urfave-cli-v3

Conversation

@kgaughan

Copy link
Copy Markdown
Collaborator
Checklist
  • make test-all (UNIX) passes. CI will also test this
  • unit and/or integration tests are included (if applicable)
  • documentation is changed or added (if applicable)

Description of change

urfave/cli v1 is currently only receiving security updates, which v3 is under active development. Further, v3 eliminates a number of dependencies, reducing the surface area for CVEs.

A side benefit of urfave/cli v3 is that it supports contexts, so we can look at cleaning up some of goss's internal use of contexts in the future. There are a bunch of places where new contexts are being created where having a single root context created when the program starts would make sense now.

Note: the test suite passes, but there are issues with the integration tests due to the parking of dnstest.io. I have a branch that mostly fixes this, though I haven't yet been able to convince Arch to start up as expected yet.

This is supported and eliminates a number of dependencies.
@aelsabbahy
aelsabbahy merged commit 72357ee into goss-org:master Jun 22, 2026
6 checks passed
@kgaughan
kgaughan deleted the urfave-cli-v3 branch June 22, 2026 22:03
uk-bolly added a commit to uk-bolly/bolly_goss that referenced this pull request Jun 24, 2026
Taken changes and issues from upstream and incorporated
Fixed other issues around some integration tests
workflow actions updated

### PRs Incorporated

- Thanks to [@kgaughan](https://github.com/kgaughan) for authoring the `urfave/cli` v3 migration
  - [#1060](goss-org/goss#1060) - CLI migrated from `urfave/cli` v1 to `urfave/cli/v3` v3.9.0; v3 is actively maintained and drops transitive dependencies (`go-md2man`, `blackfriday`)
- Thanks to [@kgaughan](https://github.com/kgaughan) for restoring clearer `ContainElements` matcher error messages
  - [#1067](goss-org/goss#1067) - pre-validates array/slice/map types before delegating to gomega, restoring the pre-iterator error text forinvalid inputs (e.g. strings)
- Thanks to [@kgaughan](https://github.com/kgaughan) for the dependency and tooling refresh
  - [#1064](goss-org/goss#1064) - golangci-lint v2.12.2 config (staticcheck settings, `noinlineerr` disabled), dependency bumps (`gomega` v1.41.0, `prometheus/common` v0.68.1), Trivy action updates, and minor lint cleanups; fork already had most workflow, Dockerfile, and code changes at equal or newer versions

### Security
- CLI announce output logs resource type and ID only; no longer marshals and prints full resource JSON (fixes CodeQL clear-text logging of password and other sensitive fields)
- Health probe debug logging records HTTP status only; no longer logs response body on non-OK status (avoids clear-text logging of password and other sensitive fields from test output)
- Health probe content negotiation errors no longer log the raw `Accept` header value from untrusted requests

### Fixed
- Integration test `add.goss.yaml` expectations updated for announce output change (resource type and ID only, not full marshaled YAML)
- `bullseye` apache2 version bumped to `2.4.67-1~deb11u3` in `vars.yaml` (Debian security update)
- Integration test fixtures: removed duplicate `service: apache2` / `service: httpd` definitions between `goss-shared.yaml` and `goss-service.yaml`; eliminates duplicate-key warnings during `validate` in CI

### Added
- Multiple `--vars` files supported; vars are merged in flag order with later files overriding overlapping keys; `--vars-inline` still applies last ([#1023](goss-org/goss#1023); thanks to [@Lirt](https://github.com/Lirt) for [PR #1024](goss-org/goss#1024))
uk-bolly added a commit to uk-bolly/bolly_goss that referenced this pull request Jun 25, 2026
Taken changes and issues from upstream and incorporated
Fixed other issues around some integration tests
workflow actions updated

### PRs Incorporated

- Thanks to [@kgaughan](https://github.com/kgaughan) for authoring the `urfave/cli` v3 migration
  - [#1060](goss-org/goss#1060) - CLI migrated from `urfave/cli` v1 to `urfave/cli/v3` v3.9.0; v3 is actively maintained and drops transitive dependencies (`go-md2man`, `blackfriday`)
- Thanks to [@kgaughan](https://github.com/kgaughan) for restoring clearer `ContainElements` matcher error messages
  - [#1067](goss-org/goss#1067) - pre-validates array/slice/map types before delegating to gomega, restoring the pre-iterator error text forinvalid inputs (e.g. strings)
- Thanks to [@kgaughan](https://github.com/kgaughan) for the dependency and tooling refresh
  - [#1064](goss-org/goss#1064) - golangci-lint v2.12.2 config (staticcheck settings, `noinlineerr` disabled), dependency bumps (`gomega` v1.41.0, `prometheus/common` v0.68.1), Trivy action updates, and minor lint cleanups; fork already had most workflow, Dockerfile, and code changes at equal or newer versions

### Security
- CLI announce output logs resource type and ID only; no longer marshals and prints full resource JSON (fixes CodeQL clear-text logging of password and other sensitive fields)
- Health probe debug logging records HTTP status only; no longer logs response body on non-OK status (avoids clear-text logging of password and other sensitive fields from test output)
- Health probe content negotiation errors no longer log the raw `Accept` header value from untrusted requests

### Fixed
- Integration test `add.goss.yaml` expectations updated for announce output change (resource type and ID only, not full marshaled YAML)
- `bullseye` apache2 version bumped to `2.4.67-1~deb11u3` in `vars.yaml` (Debian security update)
- Integration test fixtures: removed duplicate `service: apache2` / `service: httpd` definitions between `goss-shared.yaml` and `goss-service.yaml`; eliminates duplicate-key warnings during `validate` in CI

### Added
- Multiple `--vars` files supported; vars are merged in flag order with later files overriding overlapping keys; `--vars-inline` still applies last ([#1023](goss-org/goss#1023); thanks to [@Lirt](https://github.com/Lirt) for [PR #1024](goss-org/goss#1024))
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.

2 participants

⌂ 换网址