Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. Generate API key from Anthropic Console
  2. Add to repository: Settings → Secrets → New repository secret
  3. Name: ANTHROPIC_API_KEY
  4. 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:

  1. Create IAM role with Bedrock permissions
  2. Configure OIDC provider in AWS
  3. Add AWS_ROLE_ARN to repository secrets
  4. 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:

  1. Create service account in GCP
  2. Grant Vertex AI User role
  3. Generate and download JSON key
  4. Add GCP_CREDENTIALS and GCP_PROJECT_ID to 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
Полный SKILL.md на GitHub

Установить 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 *)
Read
Write
Edit
Grep
Glob
WebFetch

Вложенные файлы

REFERENCE.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить github-actions-auth-security с