Skip to content

Commit d96ec13

Browse files
chore(mdm): update docs & address minor issues
1 parent ccf3fad commit d96ec13

20 files changed

Lines changed: 291 additions & 268 deletions

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ body:
1010
- type: input
1111
id: version
1212
attributes:
13-
label: Script Version
14-
description: "Run: ./stepsecurity-dev-machine-guard.sh --version"
15-
placeholder: "1.8.1"
13+
label: Version
14+
description: "Run: ./stepsecurity-dev-machine-guard --version"
15+
placeholder: "1.9.0"
1616
validations:
1717
required: true
1818
- type: input
@@ -28,7 +28,7 @@ body:
2828
attributes:
2929
label: Command Run
3030
description: The exact command you ran
31-
placeholder: "./stepsecurity-dev-machine-guard.sh --json"
31+
placeholder: "./stepsecurity-dev-machine-guard --json"
3232
validations:
3333
required: true
3434
- type: textarea

.github/pull_request_template.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
## Testing
1212

1313
- [ ] Tested on macOS (version: ___)
14-
- [ ] Script runs without errors: `./stepsecurity-dev-machine-guard.sh --verbose`
15-
- [ ] JSON output is valid: `./stepsecurity-dev-machine-guard.sh --json | python3 -m json.tool`
14+
- [ ] Binary runs without errors: `./stepsecurity-dev-machine-guard --verbose`
15+
- [ ] JSON output is valid: `./stepsecurity-dev-machine-guard --json | python3 -m json.tool`
1616
- [ ] No secrets or credentials included
17-
- [ ] ShellCheck passes (if script was modified)
17+
- [ ] Lint passes: `make lint`
18+
- [ ] Tests pass: `make test`
1819

1920
## Related Issues
2021

.github/workflows/release.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,44 +69,45 @@ jobs:
6969
- name: Install cosign
7070
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
7171

72-
- name: Locate built binaries
73-
id: binaries
72+
- name: Prepare release artifacts for signing
7473
run: |
75-
# GoReleaser keeps binaries in build subdirs (e.g. _amd64_v1, _arm64_v8.0)
76-
AMD64=$(find dist -type f -name 'stepsecurity-dev-machine-guard' -path '*darwin_amd64*' | head -1)
77-
ARM64=$(find dist -type f -name 'stepsecurity-dev-machine-guard' -path '*darwin_arm64*' | head -1)
78-
79-
for label in "amd64:${AMD64}" "arm64:${ARM64}"; do
74+
# Copy binaries to match the exact names users download from the release.
75+
# GoReleaser uploads as name_template (e.g. stepsecurity-dev-machine-guard_darwin_amd64)
76+
# but keeps them in build subdirs locally. We copy to dist/ with release names
77+
# so cosign signs the same bytes users verify against.
78+
AMD64_SRC=$(find dist -type f -name 'stepsecurity-dev-machine-guard' -path '*darwin_amd64*' | head -1)
79+
ARM64_SRC=$(find dist -type f -name 'stepsecurity-dev-machine-guard' -path '*darwin_arm64*' | head -1)
80+
81+
for label in "amd64:${AMD64_SRC}" "arm64:${ARM64_SRC}"; do
8082
name="${label%%:*}"
8183
path="${label#*:}"
8284
if [ -z "$path" ] || [ ! -f "$path" ]; then
8385
echo "::error::Binary not found for ${name}"
84-
echo "dist/ contents:"
8586
find dist -type f
8687
exit 1
8788
fi
8889
done
8990
90-
echo "amd64=${AMD64}" >> "$GITHUB_OUTPUT"
91-
echo "arm64=${ARM64}" >> "$GITHUB_OUTPUT"
92-
echo "Found amd64: ${AMD64}"
93-
echo "Found arm64: ${ARM64}"
91+
cp "$AMD64_SRC" dist/stepsecurity-dev-machine-guard_darwin_amd64
92+
cp "$ARM64_SRC" dist/stepsecurity-dev-machine-guard_darwin_arm64
93+
echo "Prepared release artifacts for signing"
9494
9595
- name: Sign artifacts with Sigstore (keyless)
9696
run: |
97-
cosign sign-blob "${{ steps.binaries.outputs.amd64 }}" \
97+
cosign sign-blob dist/stepsecurity-dev-machine-guard_darwin_amd64 \
9898
--bundle dist/stepsecurity-dev-machine-guard_darwin_amd64.bundle --yes
99-
cosign sign-blob "${{ steps.binaries.outputs.arm64 }}" \
99+
cosign sign-blob dist/stepsecurity-dev-machine-guard_darwin_arm64 \
100100
--bundle dist/stepsecurity-dev-machine-guard_darwin_arm64.bundle --yes
101101
cosign sign-blob stepsecurity-dev-machine-guard.sh \
102102
--bundle dist/stepsecurity-dev-machine-guard.sh.bundle --yes
103103
104104
- name: Generate checksums
105105
run: |
106-
SUMS="dist/stepsecurity-dev-machine-guard_${{ steps.version.outputs.version }}_SHA256SUMS"
107-
sha256sum "${{ steps.binaries.outputs.amd64 }}" >> "$SUMS"
108-
sha256sum "${{ steps.binaries.outputs.arm64 }}" >> "$SUMS"
109-
sha256sum stepsecurity-dev-machine-guard.sh >> "$SUMS"
106+
# Separate checksum file for cosign-signed artifacts (script + bundles).
107+
# GoReleaser already generates checksums for the Go binaries in its own SHA256SUMS file.
108+
sha256sum dist/stepsecurity-dev-machine-guard_darwin_amd64 > dist/cosign-checksums.txt
109+
sha256sum dist/stepsecurity-dev-machine-guard_darwin_arm64 >> dist/cosign-checksums.txt
110+
sha256sum stepsecurity-dev-machine-guard.sh >> dist/cosign-checksums.txt
110111
111112
- name: Upload signature bundles and checksums to release
112113
env:
@@ -116,7 +117,7 @@ jobs:
116117
dist/stepsecurity-dev-machine-guard_darwin_amd64.bundle \
117118
dist/stepsecurity-dev-machine-guard_darwin_arm64.bundle \
118119
dist/stepsecurity-dev-machine-guard.sh.bundle \
119-
dist/stepsecurity-dev-machine-guard_${{ steps.version.outputs.version }}_SHA256SUMS \
120+
dist/cosign-checksums.txt \
120121
--clobber
121122
122123
- name: Mark release as immutable (not a draft, not a prerelease)
@@ -132,6 +133,6 @@ jobs:
132133
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
133134
with:
134135
subject-path: |
135-
${{ steps.binaries.outputs.amd64 }}
136-
${{ steps.binaries.outputs.arm64 }}
136+
dist/stepsecurity-dev-machine-guard_darwin_amd64
137+
dist/stepsecurity-dev-machine-guard_darwin_arm64
137138
stepsecurity-dev-machine-guard.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Go
1+
name: Tests
22

33
on:
44
push:

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
See [VERSIONING.md](VERSIONING.md) for why the version starts at 1.8.1.
99

10+
## [1.9.0] - 2026-04-03
11+
12+
Migrated from shell script to a compiled Go binary. All existing scanning features, detection logic, CLI flags, output formats, and enterprise telemetry are preserved — this release changes the implementation, not the functionality.
13+
14+
### Added
15+
- **Go binary**: Single compiled binary (`stepsecurity-dev-machine-guard`) replaces the shell script. Zero external dependencies, no runtime required.
16+
- **`configure` / `configure show` commands**: Interactive setup and display of enterprise credentials, search directories, and preferences. Saved to `~/.stepsecurity/config.json`.
17+
1018
## [1.8.2] - 2026-03-17
1119

1220
### Added
@@ -44,5 +52,6 @@ First open-source release. The scanning engine was previously an internal enterp
4452
- Execution log capture and base64 encoding
4553
- Instance locking to prevent concurrent runs
4654

55+
[1.9.0]: https://github.com/step-security/dev-machine-guard/compare/v1.8.2...v1.9.0
4756
[1.8.2]: https://github.com/step-security/dev-machine-guard/compare/v1.8.1...v1.8.2
4857
[1.8.1]: https://github.com/step-security/dev-machine-guard/releases/tag/v1.8.1

CONTRIBUTING.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,15 @@ Thank you for your interest in contributing! Dev Machine Guard is an open-source
99
To add detection for a new AI tool, IDE, or framework:
1010

1111
1. Open an issue using the [Feature Request](.github/ISSUE_TEMPLATE/feature_request.yml) template, or
12-
2. Submit a PR modifying `stepsecurity-dev-machine-guard.sh`
12+
2. Submit a PR modifying the appropriate detector in `internal/detector/`
1313

1414
**How to add a new IDE/desktop app:**
1515

16-
Find the `detect_ide_installations()` function and add an entry to the `apps` array:
17-
```bash
18-
"App Name|type_id|Vendor|/Applications/App.app|Contents/MacOS/binary|--version"
19-
```
16+
Find the IDE detector in `internal/detector/ide.go` and add an entry to the apps list. See [Adding Detections](docs/adding-detections.md) for the full guide.
2017

2118
**How to add a new AI CLI tool:**
2219

23-
Find the `detect_ai_cli_tools()` function and add an entry to the `tools` array:
24-
```bash
25-
"tool-name|Vendor|binary1,binary2|~/.config-dir1,~/.config-dir2"
26-
```
20+
Find the AI CLI detector in `internal/detector/ai_cli.go` and add an entry to the tools list. See [Adding Detections](docs/adding-detections.md) for the full guide.
2721

2822
### Improve Documentation
2923

@@ -37,37 +31,37 @@ Documentation lives in the `docs/` folder. Improvements, corrections, and new gu
3731
cd dev-machine-guard
3832
```
3933

40-
2. Make the script executable:
34+
2. Build the binary:
4135
```bash
42-
chmod +x stepsecurity-dev-machine-guard.sh
36+
make build
4337
```
4438

4539
3. Run locally:
4640
```bash
4741
# Pretty output with progress messages
48-
./stepsecurity-dev-machine-guard.sh --verbose
42+
./stepsecurity-dev-machine-guard --verbose
4943

5044
# JSON output
51-
./stepsecurity-dev-machine-guard.sh --json
45+
./stepsecurity-dev-machine-guard --json
5246

5347
# HTML report
54-
./stepsecurity-dev-machine-guard.sh --html report.html
48+
./stepsecurity-dev-machine-guard --html report.html
5549
```
5650

5751
## Code Style
5852

59-
- The script must pass [ShellCheck](https://www.shellcheck.net/) (our CI runs it on every PR)
60-
- Follow the existing code patterns (section headers, function naming, JSON construction)
61-
- Use `print_progress` for status messages (they respect the `--verbose` flag)
62-
- Use `print_error` for error messages (always shown)
53+
- Go source code in `internal/` must pass `golangci-lint` (our CI runs it on every PR)
54+
- Follow the existing code patterns (package structure, naming conventions, JSON struct tags)
55+
- Use the `progress` package for status messages (they respect the `--verbose` flag)
56+
- Use standard Go error handling patterns
6357

6458
## Pull Request Process
6559

6660
1. Fork the repository
6761
2. Create a feature branch (`git checkout -b add-new-tool-detection`)
68-
3. Make your changes
69-
4. Test locally: `./stepsecurity-dev-machine-guard.sh --verbose`
70-
5. Ensure ShellCheck passes: `shellcheck stepsecurity-dev-machine-guard.sh`
62+
3. Edit Go source in `internal/` (not the legacy shell script)
63+
4. Test locally: `./stepsecurity-dev-machine-guard --verbose`
64+
5. Ensure lint and tests pass: `make lint && make test && make smoke`
7165
6. Submit a PR using our [PR template](.github/pull_request_template.md)
7266

7367
## Reporting Issues

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ make build
7272
./stepsecurity-dev-machine-guard
7373
```
7474

75-
Requires Go 1.22+. The binary has zero external dependencies.
75+
Requires Go 1.24+. The binary has zero external dependencies.
7676

7777
## Usage
7878

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We will acknowledge your report within 48 hours and provide a detailed response
1919
## Scope
2020

2121
This policy covers:
22-
- The `stepsecurity-dev-machine-guard.sh` script
22+
- The `stepsecurity-dev-machine-guard` binary and Go source code in `internal/`
2323
- The StepSecurity backend API (for enterprise mode)
2424

2525
## Supported Versions

0 commit comments

Comments
 (0)