Skip to content

Commit f361d92

Browse files
Update docs/configuration.md
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
1 parent c39c74a commit f361d92

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/configuration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,19 @@ Below is an example of the log messages created.
330330

331331
### Dynamic Labels
332332

333+
[!WARNING]
334+
**Security implication:** Dynamic labels are extracted from the `runs-on` labels in incoming `workflow_job` webhook events. These labels originate from what
335+
users define in their workflow files. Any user with permission to create or modify workflows can inject arbitrary EC2 configuration values — including instance types, AMI IDs, subnet IDs, EBS volumes, placement settings, and more. **These values are not sanitized or validated** against an allowlist before being passed to the EC2 CreateFleet API. This means a malicious or careless workflow author could, for example:
336+
-
337+
338+
- Launch expensive instance types (e.g., `p5.48xlarge`) to inflate costs
339+
- Override the AMI (`ghr-ec2-image-id`) to boot a compromised image
340+
- Target specific subnets (`ghr-ec2-subnet-id`) to escape network boundaries
341+
- Set arbitrarily large EBS volumes (`ghr-ec2-ebs-volume-size:10000`)
342+
343+
**Only enable this feature in repositories where you trust all workflow contributors.** Consider combining it with [GitHub branch protection
344+
rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-a-branch-rule/about-branch-rules) and required reviews for workflow file changes.
345+
333346
This feature is in early stage and therefore disabled by default. To enable dynamic labels, set `enable_dynamic_labels = true`.
334347

335348
Dynamic labels allow workflow authors to pass arbitrary metadata and EC2 instance overrides directly from the `runs-on` labels in their GitHub Actions workflows. All labels prefixed with `ghr-` are treated as dynamic labels. A deterministic hash of all `ghr-` prefixed labels is computed and used for runner matching, ensuring that each unique combination of dynamic labels routes to the correct runner configuration.

0 commit comments

Comments
 (0)