Skip to content

fix: use placeholder for artifact/cache server address in man page#6051

Open
xingzihai wants to merge 1 commit intonektos:masterfrom
xingzihai:fix-ip-address-in-man-page
Open

fix: use placeholder for artifact/cache server address in man page#6051
xingzihai wants to merge 1 commit intonektos:masterfrom
xingzihai:fix-ip-address-in-man-page

Conversation

@xingzihai
Copy link
Copy Markdown

Problem

The default values for --artifact-server-addr and --cache-server-addr were calling GetOutboundIP() during flag definition, which embedded the actual outbound IP address in the generated man page.

This causes:

  • Reproducibility issue: Building on different machines produces different man pages (different IP addresses recorded)
  • Privacy concern: Users IP address is recorded in the man page

From the issue:

│ ├── usr/share/man/man1/act.1.gz
│ │ │ ├── act.1
│ │ │ │ @@ -26,15 +26,15 @@
│ │ │ │ -B--artifact-server-addrP="162.55.28.166"
│ │ │ │ +B--artifact-server-addrP="147.75.84.133"

Solution

Changed the flag defaults to empty string and added runtime auto-detection logic in newRunCommand to compute the outbound IP when the values are empty.

This ensures:

  • Man pages are reproducible (show empty string as default)
  • Privacy is preserved (no IP in documentation)
  • Runtime behavior is preserved (IP is auto-detected when needed)

Changes

  1. Changed --artifact-server-addr flag default from common.GetOutboundIP().String() to empty string
  2. Changed --cache-server-addr flag default from common.GetOutboundIP().String() to empty string
  3. Added auto-detection logic in newRunCommand to compute the IP if either address is empty
  4. Updated flag descriptions to explain auto-detection

Fixes: #5894

The default values for --artifact-server-addr and --cache-server-addr
were calling GetOutboundIP() during flag definition, which embedded the
actual outbound IP address in the generated man page. This made the
package non-reproducible and had privacy concerns.

Changed the flag defaults to empty string and added runtime auto-detection
logic in newRunCommand to compute the outbound IP when the values are empty.
This ensures:
- Man pages are reproducible (show empty string as default)
- Privacy is preserved (no IP in documentation)
- Runtime behavior is preserved (IP is auto-detected when needed)

Fixes: nektos#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