Skip to content

feat: wire live Configuration into analytics instrumentation - #7142

Merged
nick-y-snyk merged 1 commit into
mainfrom
feat/analytics-configuration-redaction
Aug 18, 2026
Merged

feat: wire live Configuration into analytics instrumentation#7142
nick-y-snyk merged 1 commit into
mainfrom
feat/analytics-configuration-redaction

Conversation

@nick-y-snyk

Copy link
Copy Markdown
Contributor

Summary

  • Passes the engine's live Configuration through to analytics.WithConfiguration at the report-analytics chokepoint (GAF#704), so logging.REDACTION_TERMS-based scrubbing covers the CLI's own analytics extension data, not just debug logs.
  • populateRedactionTerms excludes the client machine id and any detected AI agent name from its unknown-value sweep — both echo a raw env var value verbatim into an extension (studio::client_machine_id, persona.agent), so without the exclusion the scrub chokepoint stripped them right back out as if they were unrecognized secrets.

Squashed recreation of #7133 into a single commit (that PR had accumulated several unsquashed merge commits flagged by Danger). Same diff, same review comments should still apply — #7133 left open, not closed automatically.

Test plan

  • go build ./... (cliv2)
  • go vet ./...
  • golangci-lint run ./pkg/core/...
  • go test ./pkg/core/... — full suite green, including new Test_populateRedactionTerms_excludesClientMachineId, Test_populateRedactionTerms_excludesDetectedAgent, and extended Test_sendInstrumentation_passesEngineConfigurationToInstrumentationObject
  • Verified fresh GOMODCACHE resolves go-application-framework v0.15.0 from scratch (addresses stale "unresolvable dependency" review comment on feat: wire live Configuration into analytics instrumentation #7133)

@nick-y-snyk
nick-y-snyk requested a review from a team as a code owner August 17, 2026 16:43
@snyk-pr-review-bot

This comment has been minimized.

@snyk-io

snyk-io Bot commented Aug 17, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

Comment thread cliv2/go.mod
Comment thread cliv2-private/go.mod Outdated
Comment thread cliv2/pkg/core/main_test.go
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

Populate REDACTION_TERMS from the live Configuration instead of a
static snapshot, resolving ORGANIZATION_SLUG for redaction sweeps at
teardown so it reflects the org actually used by the invoked command.
@nick-y-snyk
nick-y-snyk force-pushed the feat/analytics-configuration-redaction branch from 8ed63d3 to ef3bfd9 Compare August 18, 2026 13:59
@nick-y-snyk
nick-y-snyk enabled auto-merge August 18, 2026 14:00
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 14 relevant code sections from 10 files (average relevance: 1.00)

🤖 Repository instructions applied (from AGENTS.md)

@nick-y-snyk
nick-y-snyk merged commit 2e23fd4 into main Aug 18, 2026
10 checks passed
@nick-y-snyk
nick-y-snyk deleted the feat/analytics-configuration-redaction branch August 18, 2026 15:05
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