agentleFS
LeostrukaLeostruka/devin-bundle/skills/github-actions/SKILL.md

github-actions

Skill0 starsChanged 3 months agoMITView on GitHub

Use when writing or reviewing .github/workflows YAML files or debugging CI. GitHub Actions security and best practices - SHA-pinned actions, least-privilege permissions, script injection via PR context, pull_request_target dangers, secrets and OIDC, cache poisoning, matrix and artifacts.

  • Reads credentials
  • Deletes or force-pushes

48 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use react-native-brownfield-migration, gitlab-ci and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • maikotrindadeSkill

    react-native-brownfield-migration

    Provides an incremental adoption strategy to migrate native iOS or Android apps to React Native or Expo using @callstack/react-native-brownfield for initial setup. Use when planning migration steps, packaging XCFramework/AAR artifacts, and integrating them into host apps.

    Also in 4 projects that use this

  • jcsaaddupuySkill

    gitlab-ci

    GitLab CI/CD configuration guide

    Also in 3 projects that use this

  • maikotrindadeSkill

    upgrading-react-native

    Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    nodejs

    Node.js development environment. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `nodejs` work when listed in TEAM.yaml or explicitly requested.

    Also in 4 projects that use this

  • Sorcha-PlatformSkill

    grpc

    Build or review gRPC services and clients in .NET. USE FOR: ASP.NET Core gRPC, protobuf contracts, unary or streaming RPC, gRPC client factory, interceptors, deadlines, cancellation, channel reuse, backend service integration. DO NOT USE FOR: broad browser-facing APIs without gRPC-Web tradeoff review, SignalR realtime hubs, plain REST APIs. INVOKES: dotnet build/test and focused service or client smoke checks when code changes.

    Also in 3 projects that use this

  • ihiteshguptaSkill

    terraform

    Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 37 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    NEVER interpolate PR context into run:: run: echo "${{ github.event.pull_request.title }}" - the title is attacker-controlled, $(rm -rf ~) …

    line 28

“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Actions

CI/CD is the most common place to leak secrets and take supply-chain attacks: the YAML is code that runs with credentials. Editing .github/workflows/ requires extra review.

Triggers and scope

  • on: push/pull_request/workflow_dispatch/schedule/workflow_call - the trigger defines who can run it and with what context.
  • pull_request from a fork runs WITHOUT secrets (safe-ish); pull_request_target runs with secrets + write token ON FORK CODE = the most dangerous trigger in Actions. Only with restricted types: + checkout of the base (never the head) + minimal permissions, or an environment: with manual review.
  • workflow_run/workflow_dispatch with inputs: validate them (type: choice when possible).
  • paths:/branches: filters so a README change does not run the whole CI.
  • concurrency: to cancel redundant runs (cancel-in-progress: true on PRs).

Permissions (the default is dangerous)

  • The default GITHUB_TOKEN has broad permissions. ALWAYS declare permissions: at top level or per job - contents: read is the floor; add only what is needed (pull-requests: write, packages: write).
  • Job needing no token: permissions: {}.
  • secrets: inherit in a reusable workflow leaks everything - pass secrets explicitly.

Script injection (the classic bug)

  • NEVER interpolate PR context into run:: run: echo "${{ github.event.pull_request.title }}" - the title is attacker-controlled, $(rm -rf ~) executes. Correct: env var (env: TITLE: ${{ ... }} + echo "$TITLE") or github-script with the value as an argument.
  • Dangerous contexts: github.event.issue.title, .body, pull_request.title, .head.ref, commits.*.message, github.head_ref. Anything an external user controls does NOT go inline into run:.
  • Same rule for env:/with: interpolated directly into script: of actions/github-script.

Third-party actions (supply chain)

  • Pin by commit SHA, not by tag: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2. Tags are mutable - the owner can re-point them to malicious code (has happened to popular actions).
  • Trust only official orgs (actions/*, github/*) or audited vendors; an obscure 3-star action running with your token is risk.
  • allowed-actions at repo/org level restricts what runs.
  • Dependabot for actions updates SHAs (.github/dependabot.yml with package-ecosystem: github-actions).

Secrets and OIDC

  • Secrets via ${{ secrets.X }} - never echo (goes to the log); the runner masks, but formatting breaks masking.
  • OIDC (id-token: write + aws/azure/gcp role) replaces long-lived cloud keys - preferable to static secrets.
  • environment: with required reviewers for deploy/prod jobs.
  • Secrets into a run: step indirectly via env (env: KEY: ${{ secrets.KEY }}), never inline in the command (the log shows the command, not the env).
  • ACTIONS_STEP_DEBUG logs more - do not enable on public repos with secrets.

Cache and artifacts

  • actions/cache keyed by lockfile (hashFiles('**/package-lock.json')) + restore-keys fallback.
  • Cache poisoning: can a fork pull_request write to the shared cache? No - PR cache is isolated from the base branch (but pull_request_target is not). Know the difference.
  • Downloading artifacts from another workflow run (dawidd6/action-download-artifact) is a surface - untrusted PR artifacts must not go straight into a release.
  • Shorter retention-days for artifacts holding sensitive data.

Jobs and matrix

  • strategy.matrix for multi-version/os; fail-fast: false when you want all results.
  • timeout-minutes on every job (default 6h = runaway runner bill).
  • if: with explicit success()/failure()/always() - default is "only if previous passed".
  • outputs between jobs via needs - never pass secrets through outputs (goes to metadata log).
  • services: (postgres/redis) for real integration tests instead of mocks.
  • runs-on: ubuntu-latest ok; self-hosted runner on a public repo = anyone who opens a PR runs code on your machine - NEVER.

Reusable workflows and composite actions

  • workflow_call with declared inputs/secrets; caller passes explicitly (not secrets: inherit).
  • Composite action (action.yml) for repeated steps; same injection care in run:.

Common review findings

  • pull_request_target without restriction/protected environment.
  • ${{ github.event.* }} inside run: (injection).
  • Missing permissions: (full-access token).
  • Floating-tag action (@v4, @main) instead of SHA.
  • secrets: inherit in reusable workflows.
  • Secret echoed/printed or passed inline in a command.
  • Self-hosted runner on a public repo.
  • continue-on-error hiding real failure in a required check.
  • Checkout of github.event.pull_request.head.sha under pull_request_target (runs fork code with secrets).
  • CI edited without the task requiring it (change in workflow needs justification in the report).

Cascade

  • Secrets in repo/CI: security skill.
  • Pinned versions of actions/deps: repository pinning rules (versions >7 days published).
  • CI files are a protected zone: justify edits in the change report.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.