Skip to content

fix(mdm): show telemetry-upload lines in downloaded logs; stop double-capturing Claude Desktop#168

Merged
ashishkurmi merged 2 commits into
step-security:mainfrom
shubham-stepsecurity:sm/dmg-download-logs
Jul 17, 2026
Merged

fix(mdm): show telemetry-upload lines in downloaded logs; stop double-capturing Claude Desktop#168
ashishkurmi merged 2 commits into
step-security:mainfrom
shubham-stepsecurity:sm/dmg-download-logs

Conversation

@shubham-stepsecurity

Copy link
Copy Markdown
Member

What does this PR do?

Type of change

  • Bug fix
  • Enhancement
  • Documentation

Testing

  • Tested on macOS (version: ___)
  • Binary runs without errors: ./stepsecurity-dev-machine-guard --verbose
  • JSON output is valid: ./stepsecurity-dev-machine-guard --json | python3 -m json.tool
  • No secrets or credentials included
  • Lint passes: make lint
  • Tests pass: make test

Related Issues

@ashishkurmi

Copy link
Copy Markdown
Member

@shubham-stepsecurity please compare the changes with #166

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates enterprise telemetry so the downloadable execution_logs embedded in the uploaded payload include the final “telemetry upload” intent lines, and removes Claude Desktop from IDE detection to avoid reporting it twice (as both an IDE and an AI agent).

Changes:

  • Rebuilds the telemetry payload right before the S3 PUT to re-snapshot captured stderr output after logging upload-related progress lines.
  • Adds LogCapture.Sync() with an in-band marker so a snapshot can reliably include the most recently written stderr output without stopping capture.
  • Removes Claude Desktop from the IDE catalog and updates IDE detector tests accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/telemetry/telemetry.go Passes LogCapture into uploadToS3 and re-snapshots execution logs just before upload.
internal/telemetry/telemetry_test.go Updates uploadToS3 call sites for the new capture parameter.
internal/telemetry/logcapture.go Implements Sync() using a stripped in-band marker to flush the async tee into the ring buffer.
internal/telemetry/logcapture_test.go Adds tests validating Sync() flush behavior and marker non-leakage.
internal/detector/ide.go Removes Claude Desktop from IDE detection definitions.
internal/detector/ide_test.go Updates tests to stop asserting Claude-as-IDE and adds a “not an IDE” regression test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/telemetry/telemetry.go
@ashishkurmi
ashishkurmi merged commit 4779d7c into step-security:main Jul 17, 2026
12 checks passed
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.

3 participants