Add --zizmor flag to compile command for security scanning#2639
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add --zizmor flag to compile for running zizmor tool
Add --zizmor flag to compile command for security scanning
Oct 27, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a --zizmor flag to the compile command that runs the zizmor security scanner on generated .lock.yml files after successful compilation.
Key Changes:
- Added
--zizmorflag to compile command that executes zizmor via Docker container - Exit codes 10-14 from zizmor are treated as warnings rather than failures
- Integration test validates the flag's functionality with git repository setup
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/gh-aw/main.go | Registered --zizmor flag in compile command and passed it to CompileConfig |
| pkg/cli/compile_command.go | Implemented runZizmor() function and integrated it into compilation workflow |
| pkg/cli/compile_integration_test.go | Added integration test for zizmor flag functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <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.
Adds a
--zizmorflag to thecompilecommand that runs the zizmor security scanner on generated.lock.ymlfiles.Changes
Flag Implementation
Zizmor boolfield toCompileConfigstruct--zizmorflag in compile command with CobrarunZizmor()function that executes Docker container:docker run --rm -v "$(pwd)":/workdir -w /workdir ghcr.io/zizmorcore/zizmor:latest .Exit Code Handling
Integration Points
--no-emitis usedExample Usage
Testing
Added integration test
TestCompileWithZizmorthat initializes git repository (required by zizmor) and verifies scanner execution and output display.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.