Skip to content

v0.2.0

Latest

Choose a tag to compare

@Moonwalker1307 Moonwalker1307 released this 13 Nov 13:16
· 347 commits to main since this release

ConfigFerret v0.2.0

ConfigFerret can now trace a container from outside the app, find configuration that is possibly unused, and follow values back to GitHub Actions and Octopus Deploy variables. The last two come in two new packages, ConfigFerret.GitHub and ConfigFerret.Octopus.

Highlights

  • Trace a container from outside the app. ConfigTracer.ForContainer(manifests, workload, container) is for tools that see the cluster but not the app's configuration, such as a cluster browser. It traces every environment variable and every file mounted from a ConfigMap or Secret back to the pod spec, the ConfigMap or Secret behind it, and the Helm values or Kustomize generators behind those. It reads nothing from the caller's own process environment. Values that Kubernetes sets at run time show (set at run time), and values whose source wasn't loaded show (unknown).
  • Find possibly unused configuration. FindUnused() lists values that never win because a later layer always overrides or removes them, at every level from appsettings down to Helm values and Kustomize literals. It also flags overrides that set the same value as the winner. With RecordReads(), it lists the configured keys the app never read, too. Everything it finds is labeled possibly unused, never safe to delete.
  • New package ConfigFerret.GitHub. It links layers to GitHub Actions organization, repository and environment variables, and to secrets by name, through a workflow env: line, an explicit link or a matching name.
  • New package ConfigFerret.Octopus. It links layers to Octopus Deploy project and library variable set variables, filtered by the deployment's scope and ordered by how specific the scope is.
  • appsettings and DI setup for both packages. AddConfigFerretGitHub and AddConfigFerretOctopus bind their options from configuration and check them when the host starts. Startup fails if a token or API key is found in any appsettings*.json file, or if the credential would be sent in clear text.

Security

  • Tokens and API keys are sent only in request headers, only over HTTPS, and without following redirects. They never appear in reports or exceptions. Neither API returns secret values, so secrets show up by name and are redacted.
  • The core package stays offline and holds no credentials. Neither new package adds a third-party dependency.

Testing

  • The golden snapshot tests now cover a container trace, unused-config reports, and Helm, Kustomize and local-dev setups.
  • There is a new nightly fuzz target, container. It parses manifests, traces every container, and checks that Secret values never come out unredacted.

Notes

  • All three packages share one version, and ConfigFerret.GitHub and ConfigFerret.Octopus depend on the ConfigFerret package with the same version.
  • LayerKind has two new members, GitHubActions and OctopusDeploy. A switch over it without a default case needs updating.
  • This is still a 0.x release, so the API may change.

Full changelog: v0.1.0...v0.2.0