Skip to content

Conversation

@pelikhan
Copy link
Contributor

  • Introduced a new flag --instructions to the compile command to control the generation of GitHub Copilot instructions.
  • Updated CompileWorkflows function to accept a new parameter for writing instructions.
  • Modified ensureCopilotInstructions to conditionally write instructions based on the new flag.
  • Enhanced tests to cover the new functionality and ensure correct behavior with the instructions flag.

- Introduced a new flag `--instructions` to the compile command to control the generation of GitHub Copilot instructions.
- Updated `CompileWorkflows` function to accept a new parameter for writing instructions.
- Modified `ensureCopilotInstructions` to conditionally write instructions based on the new flag.
- Enhanced tests to cover the new functionality and ensure correct behavior with the instructions flag.
@dsyme
Copy link
Contributor

dsyme commented Aug 12, 2025

branch update may be needed

@dsyme
Copy link
Contributor

dsyme commented Aug 12, 2025

Introduced a new flag --instructions to the compile command to control the generation of GitHub Copilot instructions.

Feels like it should be a new command gh aw add-copilot-instructions?

@pelikhan pelikhan merged commit 6d02b87 into main Aug 12, 2025
6 checks passed
@pelikhan pelikhan deleted the pelikhan/optional-instructions branch August 12, 2025 23:40
pelikhan added a commit that referenced this pull request Aug 22, 2025
* Add `max-count` option and rename Label field to Labels for agentic labels output type (#6)

* Initial plan

* Implement label output type for agentic workflows

- Add LabelConfig struct with mandatory allowed field
- Create add_labels.cjs JavaScript implementation
- Update compiler parsing and job building logic
- Add comprehensive tests for new functionality
- Update schema to include labels output type
- Add documentation for label addition feature

The new label output type supports:
- Mandatory allow-list enforcement
- Strict addition-only operations (no removal)
- Line-by-line parsing with safety checks
- Subset validation of requested vs allowed labels
- Clear error messages for validation failures

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add max-count option to labels output and move label code to separate file

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Rename Label field to Labels to match YAML configuration

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add label management functionality to GitHub Actions workflow

- Introduced `add_labels` job to add labels to issues and pull requests based on agent output.
- Updated permissions and environment variables for label handling.
- Enhanced error handling for context detection and label validation.
- Updated documentation to specify allowed labels.

* Add unit tests for add_labels script to validate environment variables and GitHub API integration

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Oct 11, 2025
This fix addresses CodeQL alert #6 (CWE-190: Integer Overflow) in the
EnsureLocalhostDomains function by eliminating pre-allocation overflow risk.

The vulnerable pattern was:
  result := make([]string, 0, len(domains)+4)

If the domains slice was extremely large (close to max int), adding 4 could
cause integer overflow (negative result) leading to a runtime panic.

The fix removes pre-allocation entirely and relies on Go's append function
to handle capacity growth automatically, which is safe and efficient for
domain arrays that are typically small in practice.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
pelikhan pushed a commit that referenced this pull request Oct 11, 2025
github-actions bot added a commit that referenced this pull request Oct 15, 2025
…lection (Alert #20)

Fix CWE-190 allocation size overflow vulnerability in pkg/workflow/mcp-config.go
at line 314. The code was computing slice capacity by adding two map lengths
(len(mcpConfig.Env)+len(headerSecrets)), which could overflow with extremely
large maps.

Changed from pre-allocated slice to letting Go's append handle capacity
automatically, following the same pattern used in previous fixes (alerts #6, #7).
This eliminates the overflow risk while maintaining efficiency for typical
use cases where environment variable maps are small.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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