Skip to content

Conversation

@AbhinavSivanandhan
Copy link

Problem:
act --man-page embeds the local outbound IP in defaults for address flags (e.g., --artifact-server-addr, --cache-server-addr). That breaks reproducible builds and leaks a private detail.

Approach:
Only for documentation generation, replace printed defaults that:

  • are for address-like flags (*-addr, *-address), and
  • look like an IPv4 (optionally with :port)
    with a deterministic placeholder: [auto-detected IP].

Runtime behavior is unchanged. When act actually runs, it still uses the dynamic outbound IP.

Implementation:

  • Added a small sanitizer called from generateManPage() that walks the root command (and subcommands) and rewrites DefValue for matching flags.
  • Unit test TestSanitizeFlagDefaultsForDocs validates behavior across persistent/local flags and subcommands.

Testing

  • go test ./cmd -run Sanitize -v passes
  • Manual: ./act --man-page shows [auto-detected IP] in place of a real IP for address flags.

Fixes #5894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Machine's ip address recorded in generated man page

1 participant