Skip to content

feat(mdm): migrate script to go module#10

Merged
ashishkurmi merged 3 commits intostep-security:mainfrom
shubham-stepsecurity:sm/feat/migrate
Apr 3, 2026
Merged

feat(mdm): migrate script to go module#10
ashishkurmi merged 3 commits intostep-security:mainfrom
shubham-stepsecurity:sm/feat/migrate

Conversation

@shubham-stepsecurity
Copy link
Copy Markdown
Member

What does this PR do?

Update machine guard to use Go binaries for MDM analysis

Type of change

  • Bug fix
  • Enhancement
  • Documentation

Testing

  • Tested on macOS (version: ___)
  • Script runs without errors: ./stepsecurity-dev-machine-guard.sh --verbose
  • JSON output is valid: ./stepsecurity-dev-machine-guard.sh --json | python3 -m json.tool
  • No secrets or credentials included
  • ShellCheck passes (if script was modified)

Related Issues

@shubham-stepsecurity shubham-stepsecurity force-pushed the sm/feat/migrate branch 5 times, most recently from 58c58e5 to 79f1277 Compare April 2, 2026 22:31
Copy link
Copy Markdown

Copilot AI left a comment

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 migrates Dev Machine Guard from a shell script-based implementation toward a Go module + compiled binary, adding a Go build/test/lint/smoke workflow and updating release automation and documentation to reflect the new distribution model.

Changes:

  • Introduces a Go CLI binary (stepsecurity-dev-machine-guard) with community scan output (pretty/JSON/HTML) and enterprise telemetry mode.
  • Adds Go CI (lint/test/smoke), a Makefile build/test entrypoints, and GoReleaser-based release artifacts/signing.
  • Updates README and examples to reflect binary installation and expanded CLI/configuration behavior.

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tests/test_smoke_go.sh Adds smoke tests targeting the Go binary CLI behaviors and outputs
README.md Updates installation, usage, configuration, and docs for the Go binary
Makefile Adds build/test/lint/smoke targets for the Go module
internal/telemetry/telemetry.go Implements enterprise telemetry collection + upload workflow
internal/telemetry/logcapture.go Adds stderr capture for execution logs included in telemetry payload
internal/scan/scanner.go Implements community-mode scan orchestration and output dispatch
internal/progress/progress.go Adds progress logger and spinner behavior (quiet/verbose modes)
internal/output/pretty.go Implements pretty terminal output formatter
internal/output/pretty_test.go Adds unit tests for pretty output formatter
internal/output/json.go Implements JSON output formatter
internal/output/json_test.go Adds unit tests for JSON output formatter
internal/output/html.go Implements self-contained HTML report generation
internal/output/html_test.go Adds unit tests for HTML report generation
internal/model/model.go Defines shared data model for scan results and telemetry structs
internal/lock/lock.go Adds instance locking mechanism for scans/telemetry
internal/launchd/launchd.go Adds launchd install/uninstall for scheduled enterprise scans
internal/executor/mock.go Adds mock executor for unit tests
internal/executor/executor.go Adds executor abstraction for OS interactions
internal/device/device.go Adds device info collection (hostname/serial/os/user identity)
internal/device/device_test.go Adds unit tests for device info collection
internal/detector/nodescan.go Adds enterprise Node.js scanning with raw output capture/limits
internal/detector/nodeproject.go Adds Node project discovery/counting + PM detection
internal/detector/nodepm.go Adds Node package manager detection
internal/detector/nodepm_test.go Adds tests for Node PM detection and PM inference
internal/detector/mcp.go Adds MCP config detection and enterprise filtering/base64 encoding
internal/detector/mcp_test.go Adds tests for MCP detection and filtering helpers
internal/detector/ide.go Adds IDE/desktop app installation detection
internal/detector/ide_test.go Adds tests for IDE detection
internal/detector/framework.go Adds AI framework/runtime detection (incl. running-state checks)
internal/detector/framework_test.go Adds tests for framework detection
internal/detector/extension.go Adds IDE extension inventory collection
internal/detector/extension_test.go Adds tests for extension dir parsing
internal/detector/aicli.go Adds AI CLI tool detection
internal/detector/aicli_test.go Adds tests for AI CLI tool detection
internal/detector/agent.go Adds general-purpose AI agent detection (incl. Claude Cowork)
internal/detector/agent_test.go Adds tests for agent detection and version gating
internal/config/config.go Adds persisted config file support and interactive configuration
internal/config/config_test.go Adds tests for config helpers/serialization and enterprise detection
internal/cli/cli.go Adds CLI parsing for commands, output modes, and flags
internal/cli/cli_test.go Adds CLI parsing tests
internal/buildinfo/version.go Adds build/version metadata and build-time ldflags variables
go.mod Introduces Go module definition and Go toolchain version
examples/sample-output.json Updates sample output version field
cmd/stepsecurity-dev-machine-guard/main.go Adds the binary entrypoint wiring CLI/config/scan/telemetry
.goreleaser.yml Adds GoReleaser configuration for binary release artifacts
.gitignore Ignores Go build artifacts and dist output
.github/workflows/release.yml Updates release process to GoReleaser + signing + provenance
.github/workflows/go.yml Adds Go CI workflow (lint/test/smoke)

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

@ashishkurmi ashishkurmi merged commit 82365b1 into step-security:main Apr 3, 2026
10 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