Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)48k · #4743

github-actions-advanced

Was er macht

Dieses Tool hilft dir, automatisierte Workflows auf GitHub (sogenannte GitHub Actions) zu erstellen und zu verbessern. Es sorgt dafür, dass deine Prozesse zum Bauen, Testen und Veröffentlichen von Code sicher und effizient sind.

Wann du ihn nutzt

  • ✓Wenn du wiederkehrende Aufgaben auf GitHub automatisieren möchtest.
  • ✓Wenn dein Code nicht richtig gebaut, getestet oder deployt wird.
  • ✓Um deine Entwicklungsprozesse sicherer und zuverlässiger zu machen.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/github-actions-advanced/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/github-actions-advanced/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie richte ich GitHub Actions so ein, dass mein Code jedes Mal automatisch getestet wird, wenn ich ein Update pushe?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool analysiert deine GitHub-Actions-Konfigurationen und schlägt Verbesserungen vor, die sich auf Sicherheit und Effizienz konzentrieren. Es prüft Berechtigungen, die Verwendung von Actions von Drittanbietern und wie Skripte ausgeführt werden, um Probleme zu vermeiden.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

GitHub Actions Advanced Skill

Expert guidance for designing, writing, debugging, and securing production-grade GitHub Actions workflows.


Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

  • User mentions GitHub Actions, .github/workflows, CI/CD pipelines, runners, jobs, steps, or actions
  • User wants to automate builds, tests, deployments, or releases via GitHub
  • User asks about matrix builds, reusable workflows, composite actions, or self-hosted runners
  • User needs help with OIDC authentication, caching strategies, or secrets management
  • User says "my GitHub pipeline is failing" or "set up CI for my repo"
  • User asks about workflow security, hardening, or environment protection rules

When NOT to Use This Skill

  • The user is working with GitLab CI/CD → recommend gitlab-ci-patterns
  • The user is working with CircleCI, Jenkins, or other CI platforms
  • The task is purely about Docker image building without GitHub context → recommend docker-expert
  • The task is about Kubernetes deployment configuration → recommend kubernetes-architect

Security Hardening

1. Always Declare Permissions (Least Privilege)

# Workflow-level default — restrict everything
permissions:
  contents: read

jobs:
  publish:
    # Job-level override — only expand what's needed
    permissions:
      contents: write        # Only for release/publish jobs
      packages: write        # Only for container push jobs
      pull-requests: write   # Only for PR comment jobs
      id-token: write        # Only for OIDC auth jobs

2. Pin Third-Party Actions to Full Commit SHA

# ❌ UNSAFE — tag can be mutated or hijacked
- uses: actions/checkout@v4

# ✅ SAFE — commit SHA is immutable
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2

# Tool to automate SHA pinning:
# npx pin-github-action .github/workflows/*.yml
# or: pip install ratchet && ratchet pin .github/workflows/

3. Prevent Script Injection

# ❌ UNSAFE — attacker controls PR title, which gets expanded in shell
- run: echo "${{ github.event.pull_request.title }}"

# ✅ SAFE — pass through environment variable (shell doesn't evaluate it)
- env:
    PR_TITLE: ${{ github.event.pull_request.title }}
  run: echo "$PR_TITLE"

# ✅ SAFE — expressions in if: conditions are evaluated by Actions, not shell
- if: github.event.pull_request.draft == false
  run: echo "Not a draft"

Never place ${{ ... }} directly inside run: when the value can come from PR metadata, workflow inputs, repository files, matrix JSON, or earlier job outputs. Put it in env: first, validate allowlisted values where possible, and reference the shell variable with quotes.

4. Restrict pull_request_target Usage

# Only run when a maintainer adds a specific label — prevents untrusted execution
on:
  pull_request_target:
    types: [labeled]

jobs:
  validate:
    # Double-guard: check label name AND author_association
    if: |
      github.event.label.name == 'safe-to-test' &&
      (github.event.pull_request.author_association == 'COLLABORATOR' ||
       github.event.pull_request.author_association == 'MEMBER' ||
       github.event.pull_request.author_association == 'OWNER')

5. Harden with StepSecurity

# Add to every workflow — hardens runner, monitors outbound traffic
- uses: step-security/harden-runner@4d991eb9995541a0b71d1b66f1f98a5f1bef422c  # v2.11.0
  with:
    egress-policy: audit          # Start with 'audit', move to 'block' after confirming allowlist
    allowed-endpoints: >
      api.github.com:443
      registry.npmjs.org:443
      objects.githubusercontent.com:443

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Always test reusable workflows in a feature branch before merging to main.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Häufige Fragen

Was sind GitHub Actions?

Das sind Tools, die Aufgaben innerhalb von GitHub automatisieren, zum Beispiel das Kompilieren von Code, das Ausführen von Tests und das Veröffentlichen neuer Versionen deines Projekts.

Was bedeutet „Sicherheit“ in diesem Zusammenhang?

Es bedeutet, dass Actions nur die nötigen Berechtigungen bekommen, dass die verwendeten externen Tools vertrauenswürdig sind und dass Code nicht auf schädliche Weise ausgeführt werden kann.

Was sind „wiederverwendbare Workflows“?

Das sind Workflows, die du einmal erstellst und in mehreren Projekten oder Teilen deines Projekts verwenden kannst. So vermeidest du Wiederholungen.

Details

Originalbeschreibung des Autors

Design, debug, and harden GitHub Actions CI/CD workflows, including reusable workflows, matrix builds, self-hosted runners, OIDC authentication, caching, environments, secrets, and release automation.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#4743
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills