Fix darwin cmdline fetching with ps-based implementation and add CI workflows - #4
Merged
Merged
Conversation
Co-authored-by: evict <7238650+evict@users.noreply.github.com>
Co-authored-by: evict <7238650+evict@users.noreply.github.com>
Co-authored-by: evict <7238650+evict@users.noreply.github.com>
Co-authored-by: evict <7238650+evict@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add macOS and Linux workflow files for running tests
Fix darwin cmdline fetching with ps-based implementation and add CI workflows
Jan 31, 2026
evict
reviewed
Jan 31, 2026
| brew install --cask macfuse | ||
|
|
||
| - name: Run tests | ||
| run: go test -v ./... |
Owner
There was a problem hiding this comment.
@copilot let's only run the tests that do not require using the FUSE setup. Only the cmdline retrieval for now.
Contributor
Author
There was a problem hiding this comment.
Updated both workflows to only run cmdline tests without FUSE setup. Removed macFUSE and fuse3 installation steps since they're not needed for these tests. (de73c25)
Co-authored-by: evict <7238650+evict@users.noreply.github.com>
evict
approved these changes
Jan 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Darwin cmdline fetching via
sysctl kern.procargs2was broken. Replaced withpscommand parsing for both darwin and existing linux implementations to ensure reliable process allowlist validation.Changes
sysctlbinary parsing tops -p <pid> -o args=for command line andps -p <pid> -o comm=for executable pathcmdline_darwin_test.goandcmdline_linux_test.goto validate cmdline construction and process validation on both platforms.github/workflows/test-{linux,macos}.ymlthat run only cmdline retrieval tests without requiring FUSE setupImplementation
The ps-based approach matches the allowlist pattern matching behavior (whitespace-split arguments) and eliminates platform-specific binary parsing complexity.
CI Configuration
The workflows run targeted cmdline tests using
-run "Cmdline|ExePath|ValidateCmdline|ProcCmdline"to test only the process command line retrieval functionality without requiring FUSE installation, making CI faster and simpler.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.