-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: add documentation for custom executable inputs #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| # ... other inputs | ||
| ``` | ||
|
|
||
| **Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Enhancement: Consider expanding this warning to include security best practices:
| **Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements. | |
| **Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements. | |
| **Security Note**: Only use executables from trusted sources. For production environments, verify executable integrity using checksums and ensure proper file permissions (not world-writable). |
This provides users with essential security guidance for custom executables in CI/CD environments.
| - Using an older Claude Code version may cause problems if the action uses newer features | ||
| - Using an incompatible Bun version may cause runtime errors | ||
| - The action will skip automatic installation when custom paths are provided | ||
| - Ensure the custom executables are available in your GitHub Actions environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Enhancement: The important notes should include security considerations:
| - Ensure the custom executables are available in your GitHub Actions environment | |
| **Important notes:** | |
| - Using an older Claude Code version may cause problems if the action uses newer features | |
| - Using an incompatible Bun version may cause runtime errors | |
| - The action will skip automatic installation when custom paths are provided | |
| - Ensure the custom executables are available in your GitHub Actions environment | |
| - **Security**: Only use executables from trusted sources and verify their integrity before use | |
| - **Security**: Use absolute paths and ensure executables have appropriate permissions (not world-writable) |
Custom executables introduce security risks that users should be aware of, especially in CI/CD environments.
| # ... other inputs | ||
| ``` | ||
|
|
||
| **Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Enhancement Needed: This warning should be expanded to address critical security risks. Consider adding:
**⚠️ Security Warning**:
- Only use executables from trusted sources with verified integrity
- Use absolute paths to prevent path traversal attacks
- Be aware that the entire directory containing the custom executable will be added to PATH
- Validate that custom executables are the expected binaries, not arbitrary system commands
- Consider the security implications in your threat model before using custom executablesThe current warning focuses on compatibility but doesn't adequately address the security risks of allowing arbitrary executable paths, which effectively enables code execution with GitHub Actions runner privileges.
Review Summary✅ Documentation Quality: Well-structured and follows existing patterns. Good use of warnings and examples. ✅ Security: Appropriate security warnings included for custom executable usage. ✅ Performance: No performance implications for this documentation-only change.
The prepareRunConfig function in base-action/src/run-claude.ts (lines 35-69) specifically handles the pathToClaudeCodeExecutable logic but lacks dedicated unit test coverage. Overall: High-quality documentation PR that significantly improves user guidance for specialized environments. The test coverage gap is a medium priority improvement for future robustness. |
docs/usage.md
Outdated
| | `bot_name` | GitHub username to use for git operations (defaults to Claude's bot name) | No | `claude[bot]` | | ||
| | `allowed_bots` | Comma-separated list of allowed bot usernames, or '\*' to allow all bots. Empty string (default) allows no bots | No | "" | | ||
| | `allowed_non_write_users` | **⚠️ RISKY**: Comma-separated list of usernames to allow without write permissions, or '\*' for all users. Only works with `github_token` input. See [Security](./security.md) | No | "" | | ||
| | `path_to_claude_code_executable` | Optional path to a custom Claude Code executable. Skips automatic installation. Useful for Nix, custom containers, or specialized environments. **Security**: Use only trusted executables with proper permissions. | No | "" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Enhancement Needed: The current security note is too brief given the significant security implications. Consider expanding to:
**⚠️ Security Risk**: Custom executables run with full GitHub Actions privileges. Only use verified executables from trusted sources. Validate paths to prevent traversal attacks. Entire directories are added to PATH.Since these inputs effectively allow arbitrary code execution, the security warnings should be more prominent and comprehensive.
| **Important notes:** | ||
|
|
||
| - Using an older Claude Code version may cause problems if the action uses newer features | ||
| - Using an incompatible Bun version may cause runtime errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing Recommendation: While documenting these features, consider adding guidance on how users can validate their custom executables work correctly. The test coverage review revealed limited unit test coverage for these inputs.
Suggested addition:
**Testing your custom executables:**
- Verify version compatibility: `your-custom-claude --version`
- Test basic functionality in a simple workflow first
- Ensure proper permissions are set on the executable files| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| path_to_bun_executable: "/path/to/custom/bun" | ||
| # ... other inputs | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance Benefit Documentation: Consider highlighting the significant performance benefits of using custom executables:
**Performance benefits:**
- Reduces setup time from ~30 seconds to ~2 seconds
- Eliminates 50-100MB of downloads per workflow run
- Ideal for high-frequency CI/CD pipelines and containerized environmentsThis would help users understand when the complexity of custom executables is justified.
…o_bun_executable inputs Add documentation for the two previously undocumented inputs that allow users to provide custom executables for specialized environments: - path_to_claude_code_executable: for custom Claude Code binaries - path_to_bun_executable: for custom Bun runtime These inputs are particularly useful for environments like Nix, NixOS, custom containers, and other package management systems where the default installation may not work. Updated files: - docs/usage.md: Added to inputs table - docs/faq.md: Added FAQ entry with examples and use cases - docs/configuration.md: Added dedicated section with examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
3efa867 to
5dc5be4
Compare
| - Using an older Claude Code version may cause problems if the action uses newer features | ||
| - Using an incompatible Bun version may cause runtime errors | ||
| - The action will skip automatic installation when custom paths are provided | ||
| - Ensure the custom executables are available in your GitHub Actions environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation Clarity Issue: This statement is potentially misleading. The action only skips downloading/installing executables, but dependency installation and other setup steps may still occur. Consider clarifying:
- The action will skip automatic installation of Claude Code/Bun when custom paths are provided| path_to_bun_executable: "/path/to/custom/bun" | ||
| # ... other inputs | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Warning Needed: This warning is insufficient given the security implications. The custom executable feature allows arbitrary code execution. Consider strengthening this warning:
**⚠️ Security Warning**: Using custom executables allows arbitrary code execution in your GitHub Actions environment. Only use trusted, verified executables from reputable sources.
**Important**: Using incompatible versions may cause the action to fail. Ensure your custom executables are compatible with the action's requirements.| | `bot_name` | GitHub username to use for git operations (defaults to Claude's bot name) | No | `claude[bot]` | | ||
| | `allowed_bots` | Comma-separated list of allowed bot usernames, or '\*' to allow all bots. Empty string (default) allows no bots | No | "" | | ||
| | `allowed_non_write_users` | **⚠️ RISKY**: Comma-separated list of usernames to allow without write permissions, or '\*' for all users. Only works with `github_token` input. See [Security](./security.md) | No | "" | | ||
| | `path_to_claude_code_executable` | Optional path to a custom Claude Code executable. Skips automatic installation. Useful for Nix, custom containers, or specialized environments | No | "" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Path Requirements: The description should clarify that the custom executable must be named claude. Consider adding this detail:
| `path_to_claude_code_executable` | Optional path to a custom Claude Code executable (must be named `claude`). Skips automatic installation. Useful for Nix, custom containers, or specialized environments | No | "" || | `allowed_bots` | Comma-separated list of allowed bot usernames, or '\*' to allow all bots. Empty string (default) allows no bots | No | "" | | ||
| | `allowed_non_write_users` | **⚠️ RISKY**: Comma-separated list of usernames to allow without write permissions, or '\*' for all users. Only works with `github_token` input. See [Security](./security.md) | No | "" | | ||
| | `path_to_claude_code_executable` | Optional path to a custom Claude Code executable. Skips automatic installation. Useful for Nix, custom containers, or specialized environments | No | "" | | ||
| | `path_to_bun_executable` | Optional path to a custom Bun executable. Skips automatic Bun installation. Useful for Nix, custom containers, or specialized environments | No | "" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Path Requirements: Similarly, clarify that the custom Bun executable must be named bun:
| `path_to_bun_executable` | Optional path to a custom Bun executable (must be named `bun`). Skips automatic Bun installation. Useful for Nix, custom containers, or specialized environments | No | "" |
Comprehensive Review SummaryAfter conducting a thorough multi-agent review covering code quality, performance, security, testing, and documentation accuracy, here are the key findings: ✅ Strengths
|
Summary
Adds documentation for two previously undocumented action inputs that allow users to provide custom executables:
path_to_claude_code_executable: for custom Claude Code binariespath_to_bun_executable: for custom Bun runtimeChanges
Why These Inputs Are Useful
These inputs are particularly valuable for specialized environments where standard installations don't work:
Test Plan
🤖 Generated with Claude Code