workflow-trigger-security

Enforce secure GitHub Actions trigger patterns for pull_request and pull_request_target workflows.

3|3|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill workflow-trigger-security
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: workflow-trigger-security
Source: https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/secure/skills/workflow-trigger-security
Command: npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill workflow-trigger-security

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Secure GitHub Actions trigger patterns to prevent privilege escalation, code injection, and secret leakage arising from misconfigured triggers in pull requests, forks, and reusable workflows.

Core Features & Use Cases

  • Two-Stage Fork CI: Separate untrusted fork testing from privileged operations to reduce exposure of secrets.
  • Approval Gate for Fork Deployments: Enforce manual approval before deploying fork code and restrict permissions.
  • Fork PR Security Validation: Provide safe, auditable patterns for PR-triggered workflows, with explicit context controls and restricted secret access.

Quick Start

Implement the two-stage fork CI pattern and enable approvals for PR targets to harden your workflow security.

Frequently Asked Questions about workflow-trigger-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure GitHub Actions pull_request_target triggers against privilege escalation?▼

To secure GitHub Actions pull_request_target triggers, enforce minimal permissions and separate untrusted fork testing from privileged operations to prevent privilege escalation and secret leakage.

What is the best way to run CI pipelines safely on untrusted fork pull requests?▼

The best way to secure fork pull requests is implementing a two-stage fork CI pattern that isolates untrusted code testing from privileged deployment operations and restricts secret access.

How do I add an approval gate for fork deployments in GitHub Actions workflows?▼

You can enforce an approval gate for fork deployments by configuring manual approval requirements before deploying fork code and applying restricted environment protections and minimal permissions.

Does this workflow trigger security approach apply to reusable workflows across repositories?▼

Yes, these secure GitHub Actions trigger patterns apply to pull requests, fork scenarios, and reusable workflows across repositories to mitigate code injection and secret leakage risks.

Why do my GitHub Actions workflows leak secrets when triggered by forks?▼

Workflows leak secrets when misconfigured triggers expose privileged access to untrusted fork code; mitigating this requires explicit context controls and restricted secret access for PR-triggered workflows.

When do I need to restrict permissions for pull_request triggers in GitHub Actions?▼

You need to restrict permissions for pull_request triggers when handling untrusted contributions to prevent code injection and ensure safe, auditable patterns for PR-triggered workflows.