GitHub
08/12/2026, 6:13 AMfake_news_go with fake security posture data generation, slow enrollment to avoid rate limiting, and improved output formatting.
Changes
--posture-level flag (tools/fake_news_go/internal/workload/posture.go, internal/config/config.go, fake_news.go)
Sends fake security posture data to the TLS /write endpoint on startup and every 24 hours. The level controls what kind of data is generated:
| Level | Description |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| none | No posture data sent (default) |
| good | Healthy node: few packages, few users, encrypted disk, only safe ports, all standard SUID binaries, many patches — scores green/low risk |
| moderate | Some issues: more packages, more users, possibly unencrypted disk, more listening ports, some non-standard SUID binaries — scores yellow/medium risk |
| poor | At-risk node: many packages, many users, unencrypted disk, risky ports (telnet, FTP, RDP), many non-standard SUID binaries, few patches — scores red/high risk |
Six posture categories are generated, matching the scoring engine's expected category names: packages_deb, users, disk_encryption, listening_ports, suid_binaries, patches. The good level produces data where every scoring control passes — total score 0, risk level "low" (green).
--enroll-delay flag (internal/config/config.go, fake_news.go)
Adds a configurable delay (in milliseconds) between each node enrollment. This avoids triggering rate limits on the TLS enroll endpoint when enrolling large numbers of nodes. For example, --enroll-delay 200 spaces enrollments 200ms apart, so 100 nodes enroll over ~20 seconds instead of all at once.
Improved output formatting (fake_news.go)
Rewrote printSummary and printDashboard with:
• Consistent right-aligned column widths (%10d, %9.1f%%) so columns line up regardless of value size
• Proper table headers matching the data below them
• URL truncation (55 chars with ... prefix) so long URLs don't break the table layout
• Two-space indent on data rows for visual hierarchy
• Clean section headers and separator lines
Updated README (tools/fake_news_go/README.md)
• Documented all flags including --posture-level, --enroll-delay, --nodes, --status, --result, --config, --query, --verbose, --insecure, --summary-interval, --osquery-binary
• Added --posture-level section with level/description table
• Added --enroll-delay section explaining rate-limit avoidance
• Added examples for slow enrollment with good posture and poor posture
• Preserved all existing examples (steady, sweep, discovery, dashboard)
Usage
# Enroll 100 nodes slowly (200ms apart) with good posture data (green)
go run ./tools/fake_news_go \
--tls-url http://localhost:9000 \
--env YOUR_ENV_UUID \
--secret YOUR_SECRET \
--nodes 100 \
--enroll-delay 200 \
--posture-level good \
--display-mode dashboard
# Enroll 50 nodes with poor posture (red — unencrypted disk, risky ports)
go run ./tools/fake_news_go \
--tls-url http://localhost:9000 \
--env YOUR_ENV_UUID \
--secret YOUR_SECRET \
--nodes 50 \
--posture-level poor \
--display-mode dashboard
Validation
- go build ./tools/fake_news_go/... — clean
- go test ./tools/fake_news_go/... — all packages pass
jmpsec/osctrlGitHub
08/12/2026, 6:18 AM