feat: Initial run of Semgrep scan#1084
Open
adimoft wants to merge 14 commits into
Open
Conversation
--- Subject: Added initial Semgrep scan
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1084 +/- ##
=======================================
Coverage 43.44% 43.44%
=======================================
Files 143 143
Lines 13621 13621
=======================================
Hits 5917 5917
Misses 7143 7143
Partials 561 561 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Updated the Semgrep action SHA
Updated the Semgrep action SHA
Summary: This workflow will run SAST needed scans
There was a problem hiding this comment.
Pull request overview
Adds an initial Semgrep scanning workflow to the repository and includes a few workflow and Windows tray-related tweaks.
Changes:
- Added a new GitHub Actions workflow to run Semgrep on pushes/PRs.
- Updated the Windows tray single-instance logic to use
golang.org/x/sys/windowsAPIs. - Adjusted CI/release workflows (added
workflow_dispatch; tweaked semantic-release invocation/output handling).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
cmd/app/tray_windows.go |
Switches Win32 interop from syscall to x/sys/windows; refactors mutex and browser-launch code. |
.github/workflows/semgrep.yml |
Introduces a Semgrep scan workflow using a pinned container image and reusable action. |
.github/workflows/release.yml |
Updates the dry-run semantic-release step environment variable usage and output redirection quoting. |
.github/workflows/ci.yml |
Adds YAML document marker and enables manual dispatch. |
Contributor
|
@adimoft : can you please resolve the copilot review comments |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request introduces several improvements to Windows-specific code and GitHub workflow automation. The most significant changes include refactoring Windows system calls to use the
golang.org/x/sys/windowspackage for better reliability and maintainability, adding a Semgrep security scan workflow, and making minor adjustments to CI and release workflows.Windows system code modernization and reliability:
cmd/app/tray_windows.goto use thegolang.org/x/sys/windowspackage instead of the standardsyscallpackage, improving compatibility and future-proofing the code. This includes changes to mutex handling, DLL loading, and process attributes. [1] [2] [3]ensureSingleInstance,acquireInstanceMutex, andprobeInstanceMutex.Security and CI/CD workflow enhancements:
.github/workflows/semgrep.ymlworkflow to automatically run Semgrep security scans on pushes and pull requests tomain, enhancing code security checks.workflow_dispatchtriggers for both the CI and Semgrep workflows, allowing manual workflow runs from the GitHub UI. [1] [2]GITHUB_REF_NAME) and improved how branches are passed to semantic-release, ensuring correct versioning behavior.