{"owner":"appleboy","repo":"ssh-action","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nThis is a GitHub Action for executing remote SSH commands. Built using a composite action pattern, it downloads and runs the [drone-ssh](https://github.com/appleboy/drone-ssh) binary (written in Go) to execute SSH commands on remote hosts.\n\n**Key characteristics:**\n\n- No local compilation required - downloads pre-built binaries from drone-ssh releases\n- Shell-based composite action using `entrypoint.sh`\n- Supports password and SSH key authentication, proxies, multiple hosts, and environment variable passing\n- All input parameters are passed via `INPUT_*` environment variables\n\n## Architecture\n\n### Execution Flow\n\n1. **action.yml** - GitHub Actions composite action definition\n   - Defines all input parameters and their descriptions\n   - Sets up environment variables with `INPUT_*` prefix\n   - Calls `entrypoint.sh`\n\n2. **entrypoint.sh** - Main entry point\n   - Detects platform (Linux/Darwin/Windows) and architecture (amd64/arm64)\n   - Downloads appropriate `drone-ssh` binary from GitHub releases\n   - Executes the binary with all environment variables\n   - Handles `capture_stdout` for output capture\n\n3. **drone-ssh binary** - The actual SSH client (separate Go project)\n   - Performs SSH connection and command execution\n   - Not part of this repository\n\n### Key Files\n\n- `action.yml` - Action metadata and input/output definitions\n- `entrypoint.sh` - Platform detection, binary download, and execution\n- `testdata/` - Test scripts and SSH keys for CI workflows\n- `.github/workflows/main.yml` - Comprehensive test suite using Docker containers (tests `./` local action)\n- `.github/workflows/stable.yml` - Tests against published `appleboy/ssh-action@v1` tag\n- `.github/workflows/trivy-scan.yml` - Automated security scanning for vulnerabilities and misconfigurations\n\n## Testing\n\n### Running Tests\n\nTests run automatically via GitHub Actions workflows. The test suite uses Docker containers running OpenSSH servers:\n\n```bash\n# Tests run automatically on push via .github/workflows/main.yml\n# Tests create Docker containers with openssh-server and test various scenarios\n```\n\n### Test Categories (from main.yml)\n\nThe test workflow covers:\n\n- **default-user-name-password**: Basic password authentication\n- **check-ssh-key**: RSA key authentication, key priority over password\n- **support-key-passphrase**: Encrypted SSH keys\n- **multiple-server**: Multiple hosts with different ports\n- **support-ed25519-key**: ED25519 key format\n- **testing-with-env**: Environment variable passing, `allenvs`, custom formats\n- **testing06**: IPv6 connectivity\n- **testing07**: Special characters in passwords\n- **testing-capturing-output**: Output capture functionality\n- **testing-script-stop**: Script error handling with `set -e`\n- **testing-script-error**: Error propagation\n\n### Testing Locally\n\nSince this action downloads binaries, local testing should:\n\n1. Create a test SSH server (Docker or VM)\n2. Test `entrypoint.sh` directly with appropriate `INPUT_*` environment variables\n\nExample:\n\n```bash\nexport INPUT_HOST=\"192.168.1.100\"\nexport INPUT_USERNAME=\"testuser\"\nexport INPUT_PASSWORD=\"testpass\"\nexport INPUT_PORT=\"22\"\nexport INPUT_SCRIPT=\"whoami\"\nexport GITHUB_ACTION_PATH=\"$(pwd)\"\n./entrypoint.sh\n```\n\n## Important Patterns\n\n### Script Execution\n\nUsers can provide scripts in two ways:\n\n- `script`: Inline commands (via `INPUT_SCRIPT`)\n- `script_path`: Path to a file in the repository (maps to `INPUT_SCRIPT_FILE` env var - note the naming difference)\n\n### Error Handling\n\nTo stop execution on first error (mimics removed `script_stop` option), users should add `set -e` to their scripts:\n\n```yaml\nscript: |\n  #!/usr/bin/env bash\n  set -e\n  command1\n  command2\n```\n\n### Environment Variables\n\nThe action passes GitHub Action inputs as environment variables with `INPUT_*` prefix. The drone-ssh binary reads these to configure SSH behavior.\n\nSpecial handling:\n\n- `envs`: Comma-separated list of environment variables to pass to remote script\n- `allenvs`: Pass all `GITHUB_*` and `INPUT_*` variables\n- `envs_format`: Custom format for environment variable export (e.g., `export TEST_{NAME}={VALUE}`)\n\n### Multiple Hosts\n\n- Comma-separated hosts: `\"host1,host2\"` (executes in parallel by default)\n- With custom ports: `\"host1:2222,host2:5678\"`\n- Synchronous execution: Set `sync: true`\n\n## Common Issues\n\n### Command Not Found\n\nNon-interactive shells may skip `.bashrc`/`.bash_profile`. See README section \"Command not found\" for details. Solutions:\n\n- Use absolute paths in commands\n- Comment out early return in `/etc/bash.bashrc`\n\n### OpenSSH Compatibility\n\nUbuntu 20.04+ may require enabling `ssh-rsa` algorithm in sshd_config:\n\n```txt\nCASignatureAlgorithms +ssh-rsa\n```\n\nOr use ED25519 keys instead (preferred).\n\n## Development Guidelines\n\n### Adding New Parameters\n\n1. Add input definition to `action.yml` with description\n2. Add corresponding `INPUT_*` environment variable mapping in `action.yml` runs.steps\n3. Update README.md parameter tables\n4. The drone-ssh binary handles the actual parameter logic (separate repo)\n\n### Documentation\n\n- Keep parameter tables in README.md synchronized with `action.yml`\n- Maintain Chinese translations (README.zh-cn.md, README.zh-tw.md)\n- Use clear examples for each feature\n\n### Version Management\n\nThe action pins to specific drone-ssh versions via:\n\n- Default: `DRONE_SSH_VERSION=\"1.8.2\"` in `entrypoint.sh`\n- Override: Users can specify `version` input parameter\n\nUpdate the default version when new drone-ssh releases are available.\n\n## Release Process\n\nThis action uses semantic versioning with major version tags:\n\n- Tags: `v1.0.0`, `v1.0.1`, etc.\n- Major version tag: `v1` (points to latest v1.x.x)\n- Users reference: `uses: appleboy/ssh-action@v1`\n\nGoReleaser config (`.goreleaser.yaml`) is present but set to `skip: true` since this action doesn't build Go code - it downloads pre-built binaries.\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nThis is a GitHub Action for executing remote SSH commands. Built using a composite action pattern, it downloads and runs the [drone-ssh](https://github.com/appleboy/drone-ssh) binary (written in Go) to execute SSH commands on remote hosts.\n\n**Key characteristics:**\n\n- No local compilation required - downloads pre-built binaries from drone-ssh releases\n- Shell-based composite action using `entrypoint.sh`\n- Supports password and SSH key authentication, proxies, multiple hosts, and environment variable passing\n- All input parameters are passed via `INPUT_*` environment variables\n\n## Architecture\n\n### Execution Flow\n\n1. **action.yml** - GitHub Actions composite action definition\n   - Defines all input parameters and their descriptions\n   - Sets up environment variables with `INPUT_*` prefix\n   - Calls `entrypoint.sh`\n\n2. **entrypoint.sh** - Main entry point\n   - Detects platform (Linux/Darwin/Windows) and architecture (amd64/arm64)\n   - Downloads appropriate `drone-ssh` binary from GitHub releases\n   - Executes the binary with all environment variables\n   - Handles `capture_stdout` for output capture\n\n3. **drone-ssh binary** - The actual SSH client (separate Go project)\n   - Performs SSH connection and command execution\n   - Not part of this repository\n\n### Key Files\n\n- `action.yml` - Action metadata and input/output definitions\n- `entrypoint.sh` - Platform detection, binary download, and execution\n- `testdata/` - Test scripts and SSH keys for CI workflows\n- `.github/workflows/main.yml` - Comprehensive test suite using Docker containers (tests `./` local action)\n- `.github/workflows/stable.yml` - Tests against published `appleboy/ssh-action@v1` tag\n- `.github/workflows/trivy-scan.yml` - Automated security scanning for vulnerabilities and misconfigurations\n\n## Testing\n\n### Running Tests\n\nTests run automatically via GitHub Actions workflows. The test suite uses Docker containers running OpenSSH servers:\n\n```bash\n# Tests run automatically on push via .github/workflows/main.yml\n# Tests create Docker containers with openssh-server and test various scenarios\n```\n\n### Test Categories (from main.yml)\n\nThe test workflow covers:\n\n- **default-user-name-password**: Basic password authentication\n- **check-ssh-key**: RSA key authentication, key priority over password\n- **support-key-passphrase**: Encrypted SSH keys\n- **multiple-server**: Multiple hosts with different ports\n- **support-ed25519-key**: ED25519 key format\n- **testing-with-env**: Environment variable passing, `allenvs`, custom formats\n- **testing06**: IPv6 connectivity\n- **testing07**: Special characters in passwords\n- **testing-capturing-output**: Output capture functionality\n- **testing-script-stop**: Script error handling with `set -e`\n- **testing-script-error**: Error propagation\n\n### Testing Locally\n\nSince this action downloads binaries, local testing should:\n\n1. Create a test SSH server (Docker or VM)\n2. Test `entrypoint.sh` directly with appropriate `INPUT_*` environment variables\n\nExample:\n\n```bash\nexport INPUT_HOST=\"192.168.1.100\"\nexport INPUT_USERNAME=\"testuser\"\nexport INPUT_PASSWORD=\"testpass\"\nexport INPUT_PORT=\"22\"\nexport INPUT_SCRIPT=\"whoami\"\nexport GITHUB_ACTION_PATH=\"$(pwd)\"\n./entrypoint.sh\n```\n\n## Important Patterns\n\n### Script Execution\n\nUsers can provide scripts in two ways:\n\n- `script`: Inline commands (via `INPUT_SCRIPT`)\n- `script_path`: Path to a file in the repository (maps to `INPUT_SCRIPT_FILE` env var - note the naming difference)\n\n### Error Handling\n\nTo stop execution on first error (mimics removed `script_stop` option), users should add `set -e` to their scripts:\n\n```yaml\nscript: |\n  #!/usr/bin/env bash\n  set -e\n  command1\n  command2\n```\n\n### Environment Variables\n\nThe action passes GitHub Action inputs as environment variables with `INPUT_*` prefix. The drone-ssh binary reads these to configure SSH behavior.\n\nSpecial handling:\n\n- `envs`: Comma-separated list of environment variables to pass to remote script\n- `allenvs`: Pass all `GITHUB_*` and `INPUT_*` variables\n- `envs_format`: Custom format for environment variable export (e.g., `export TEST_{NAME}={VALUE}`)\n\n### Multiple Hosts\n\n- Comma-separated hosts: `\"host1,host2\"` (executes in parallel by default)\n- With custom ports: `\"host1:2222,host2:5678\"`\n- Synchronous execution: Set `sync: true`\n\n## Common Issues\n\n### Command Not Found\n\nNon-interactive shells may skip `.bashrc`/`.bash_profile`. See README section \"Command not found\" for details. Solutions:\n\n- Use absolute paths in commands\n- Comment out early return in `/etc/bash.bashrc`\n\n### OpenSSH Compatibility\n\nUbuntu 20.04+ may require enabling `ssh-rsa` algorithm in sshd_config:\n\n```txt\nCASignatureAlgorithms +ssh-rsa\n```\n\nOr use ED25519 keys instead (preferred).\n\n## Development Guidelines\n\n### Adding New Parameters\n\n1. Add input definition to `action.yml` with description\n2. Add corresponding `INPUT_*` environment variable mapping in `action.yml` runs.steps\n3. Update README.md parameter tables\n4. The drone-ssh binary handles the actual parameter logic (separate repo)\n\n### Documentation\n\n- Keep parameter tables in README.md synchronized with `action.yml`\n- Maintain Chinese translations (README.zh-cn.md, README.zh-tw.md)\n- Use clear examples for each feature\n\n### Version Management\n\nThe action pins to specific drone-ssh versions via:\n\n- Default: `DRONE_SSH_VERSION=\"1.8.2\"` in `entrypoint.sh`\n- Override: Users can specify `version` input parameter\n\nUpdate the default version when new drone-ssh releases are available.\n\n## Release Process\n\nThis action uses semantic versioning with major version tags:\n\n- Tags: `v1.0.0`, `v1.0.1`, etc.\n- Major version tag: `v1` (points to latest v1.x.x)\n- Users reference: `uses: appleboy/ssh-action@v1`\n\nGoReleaser config (`.goreleaser.yaml`) is present but set to `skip: true` since this action doesn't build Go code - it downloads pre-built binaries.\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nThis is a GitHub Action for executing remote SSH commands. Built using a composite action pattern, it downloads and runs the [drone-ssh](https://github.com/appleboy/drone-ssh) binary (written in Go) to execute SSH commands on remote hosts.\n\n**Key characteristics:**\n\n- No local compilation required - downloads pre-built binaries from drone-ssh releases\n- Shell-based composite action using `entrypoint.sh`\n- Supports password and SSH key authentication, proxies, multiple hosts, and environment variable passing\n- All input parameters are passed via `INPUT_*` environment variables\n\n## Architecture\n\n### Execution Flow\n\n1. **action.yml** - GitHub Actions composite action definition\n   - Defines all input parameters and their descriptions\n   - Sets up environment variables with `INPUT_*` prefix\n   - Calls `entrypoint.sh`\n\n2. **entrypoint.sh** - Main entry point\n   - Detects platform (Linux/Darwin/Windows) and architecture (amd64/arm64)\n   - Downloads appropriate `drone-ssh` binary from GitHub releases\n   - Executes the binary with all environment variables\n   - Handles `capture_stdout` for output capture\n\n3. **drone-ssh binary** - The actual SSH client (separate Go project)\n   - Performs SSH connection and command execution\n   - Not part of this repository\n\n### Key Files\n\n- `action.yml` - Action metadata and input/output definitions\n- `entrypoint.sh` - Platform detection, binary download, and execution\n- `testdata/` - Test scripts and SSH keys for CI workflows\n- `.github/workflows/main.yml` - Comprehensive test suite using Docker containers (tests `./` local action)\n- `.github/workflows/stable.yml` - Tests against published `appleboy/ssh-action@v1` tag\n- `.github/workflows/trivy-scan.yml` - Automated security scanning for vulnerabilities and misconfigurations\n\n## Testing\n\n### Running Tests\n\nTests run automatically via GitHub Actions workflows. The test suite uses Docker containers running OpenSSH servers:\n\n```bash\n# Tests run automatically on push via .github/workflows/main.yml\n# Tests create Docker containers with openssh-server and test various scenarios\n```\n\n### Test Categories (from main.yml)\n\nThe test workflow covers:\n\n- **default-user-name-password**: Basic password authentication\n- **check-ssh-key**: RSA key authentication, key priority over password\n- **support-key-passphrase**: Encrypted SSH keys\n- **multiple-server**: Multiple hosts with different ports\n- **support-ed25519-key**: ED25519 key format\n- **testing-with-env**: Environment variable passing, `allenvs`, custom formats\n- **testing06**: IPv6 connectivity\n- **testing07**: Special characters in passwords\n- **testing-capturing-output**: Output capture functionality\n- **testing-script-stop**: Script error handling with `set -e`\n- **testing-script-error**: Error propagation\n\n### Testing Locally\n\nSince this action downloads binaries, local testing should:\n\n1. Create a test SSH server (Docker or VM)\n2. Test `entrypoint.sh` directly with appropriate `INPUT_*` environment variables\n\nExample:\n\n```bash\nexport INPUT_HOST=\"192.168.1.100\"\nexport INPUT_USERNAME=\"testuser\"\nexport INPUT_PASSWORD=\"testpass\"\nexport INPUT_PORT=\"22\"\nexport INPUT_SCRIPT=\"whoami\"\nexport GITHUB_ACTION_PATH=\"$(pwd)\"\n./entrypoint.sh\n```\n\n## Important Patterns\n\n### Script Execution\n\nUsers can provide scripts in two ways:\n\n- `script`: Inline commands (via `INPUT_SCRIPT`)\n- `script_path`: Path to a file in the repository (maps to `INPUT_SCRIPT_FILE` env var - note the naming difference)\n\n### Error Handling\n\nTo stop execution on first error (mimics removed `script_stop` option), users should add `set -e` to their scripts:\n\n```yaml\nscript: |\n  #!/usr/bin/env bash\n  set -e\n  command1\n  command2\n```\n\n### Environment Variables\n\nThe action passes GitHub Action inputs as environment variables with `INPUT_*` prefix. The drone-ssh binary reads these to configure SSH behavior.\n\nSpecial handling:\n\n- `envs`: Comma-separated list of environment variables to pass to remote script\n- `allenvs`: Pass all `GITHUB_*` and `INPUT_*` variables\n- `envs_format`: Custom format for environment variable export (e.g., `export TEST_{NAME}={VALUE}`)\n\n### Multiple Hosts\n\n- Comma-separated hosts: `\"host1,host2\"` (executes in parallel by default)\n- With custom ports: `\"host1:2222,host2:5678\"`\n- Synchronous execution: Set `sync: true`\n\n## Common Issues\n\n### Command Not Found\n\nNon-interactive shells may skip `.bashrc`/`.bash_profile`. See README section \"Command not found\" for details. Solutions:\n\n- Use absolute paths in commands\n- Comment out early return in `/etc/bash.bashrc`\n\n### OpenSSH Compatibility\n\nUbuntu 20.04+ may require enabling `ssh-rsa` algorithm in sshd_config:\n\n```txt\nCASignatureAlgorithms +ssh-rsa\n```\n\nOr use ED25519 keys instead (preferred).\n\n## Development Guidelines\n\n### Adding New Parameters\n\n1. Add input definition to `action.yml` with description\n2. Add corresponding `INPUT_*` environment variable mapping in `action.yml` runs.steps\n3. Update README.md parameter tables\n4. The drone-ssh binary handles the actual parameter logic (separate repo)\n\n### Documentation\n\n- Keep parameter tables in README.md synchronized with `action.yml`\n- Maintain Chinese translations (README.zh-cn.md, README.zh-tw.md)\n- Use clear examples for each feature\n\n### Version Management\n\nThe action pins to specific drone-ssh versions via:\n\n- Default: `DRONE_SSH_VERSION=\"1.8.2\"` in `entrypoint.sh`\n- Override: Users can specify `version` input parameter\n\nUpdate the default version when new drone-ssh releases are available.\n\n## Release Process\n\nThis action uses semantic versioning with major version tags:\n\n- Tags: `v1.0.0`, `v1.0.1`, etc.\n- Major version tag: `v1` (points to latest v1.x.x)\n- Users reference: `uses: appleboy/ssh-action@v1`\n\nGoReleaser config (`.goreleaser.yaml`) is present but set to `skip: true` since this action doesn't build Go code - it downloads pre-built binaries.\n","category":"root","tokens":1500}]}