github-actions-auth-security
БесплатноБез исполняемых скриптовНе проверенGitHub Actions auth and security for Claude Code — OIDC, AWS Bedrock, Vertex AI, secrets, permission scoping. Use when setting up workflow authentication or…
от laurigates★ 61 звезда на GitHubОб этом скилле
GitHub Actions Authentication and Security
When to Use This Skill
| Use this skill when... | Use claude-code-github-workflows instead when... |
|---|---|
| Choosing between Anthropic API, AWS Bedrock, or Vertex AI authentication | Authoring the workflow trigger, prompt, or job orchestration |
Scoping permissions: blocks to least-privilege per task |
Adding a new automation pattern (PR review, issue triage, CI auto-fix) |
| Hardening against prompt injection or external-contributor attack surface | Configuring --mcp-config and tool allowlists — see github-actions-mcp-config |
Rotating ANTHROPIC_API_KEY / AWS_ROLE_ARN / GCP_CREDENTIALS secrets |
Inspecting failing workflow runs — see github-actions-inspection |
Expert knowledge for securing GitHub Actions workflows with Claude Code, including authentication methods, secrets management, and security best practices.
Core Expertise
Authentication Methods
- Anthropic Direct API with API keys
- AWS Bedrock with OIDC
- Google Vertex AI with service accounts
- Secrets management and rotation
Security Best Practices
- Permission scoping and least-privilege access
- Prompt injection prevention
- Commit signing and audit trails
- Access control and validation
Authentication Methods
Anthropic Direct API
- uses: anthropics/[email protected]
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Setup:
- Generate API key from Anthropic Console
- Add to repository: Settings → Secrets → New repository secret
- Name:
ANTHROPIC_API_KEY - Value:
sk-ant-api03-...
AWS Bedrock
- uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- uses: anthropics/[email protected]
with:
claude_args: --bedrock-region us-east-1
Setup:
- Create IAM role with Bedrock permissions
- Configure OIDC provider in AWS
- Add
AWS_ROLE_ARNto repository secrets - Grant role access to Bedrock Claude models
Required IAM Permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": "arn:aws:bedrock:*::foundation-model/anthropic.claude-*"
}
]
}
Google Vertex AI
- uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- uses: anthropics/[email protected]
with:
claude_args: |
--vertex-project-id ${{ secrets.GCP_PROJECT_ID }}
--vertex-region us-central1
Setup:
- Create service account in GCP
- Grant Vertex AI User role
- Generate and download JSON key
- Add
GCP_CREDENTIALSandGCP_PROJECT_IDto secrets
Required GCP Permissions:
roles/aiplatform.user
Security Best Practices
Critical Security Rules
Security Requirements:
- Use
${{ secrets.SECRET_NAME }}for all credentials (keep credentials out of code) - Implement minimal required permissions (scope to actual needs)
- Validate and sanitize all external inputs
- Enable commit signing (automatic with
contents: write) - Isolate secrets to their intended repositories
Additional Best Practices:
- Review generated code before merging
- Use OIDC for cloud provider authentication when possible
- Rotate secrets periodically
Secrets Management
Secure Configuration:
# WRONG - Never hardcode!
- uses: anthropics/[email protected]
with:
anthropic_api_key: "sk-ant-api03-..." # gitleaks:allow
# CORRECT - Always use secrets
- uses: anthropics/[email protected]
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Secret Rotation:
# Rotate API key
# 1. Generate new key in Anthropic Console
# 2. Update repository secret
gh secret set ANTHROPIC_API_KEY
# 3. Test workflow with new key
# 4. Revoke old key
Secret Scope:
- Use repository secrets for single-repo access
- Use environment secrets for deployment-specific keys
- Use organization secrets for shared resources
- Mask secrets in logs:
echo "::add-mask::$SECRET"
Permission Scoping
Always include an explicit permissions: block. Without one, the
GITHUB_TOKEN inherits the repository's default scope. With one, anything
unlisted is none. Set a read-only default at the top level and escalate only
in the jobs that need write:
permissions:
contents: read # Top-level read-only default
jobs:
fix:
permissions:
contents: write # Escalate only where the job needs it
pull-requests: write
Also set the repository default GITHUB_TOKEN permission to read-only
(Settings → Actions → General → Workflow permissions) so a workflow that forgets
its block still starts from least privilege.
Minimal Permissions Example:
permissions:
contents: write # Required f
Установить github-actions-auth-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(actionlint *)Bash(yq *)Bash(git secrets --scan *)Bash(git verify-commit *)Bash(git log *)Bash(aws sts get-caller-identity *)Bash(aws bedrock list-foundation-models *)Bash(gcloud auth list *)Bash(gcloud projects get-iam-policy *)Bash(gcloud ai models list *)ReadWriteEditGrepGlobWebFetchВложенные файлы
FAQ
Что делает скилл github-actions-auth-security?
GitHub Actions auth and security for Claude Code — OIDC, AWS Bedrock, Vertex AI, secrets, permission scoping. Use when setting up workflow authentication or security.
Как установить скилл github-actions-auth-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл github-actions-auth-security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic