Skip to content

Feature: Require or recommend the timeout-minutes property for all jobs #1023

@johnbillion

Description

@johnbillion

Pre-submission checks

  • I am not reporting a bug (crash, false positive/negative, etc). These must be filed via the bug report template.
  • I have looked through the open issues for a duplicate request.

What's the problem this feature will solve?

The timeout-minutes property can be used to prevent run-away jobs from consuming all your allowed GitHub Actions runner minutes. The default value is 360 minutes (6 hours).

Examples include scripts that accidentally hang or go into a loop, package managers which slow to a crawl when the registry is responding slowly, compilers that get stuck, or really anything else that can unexpectedly slow but not be constrained by its own timeout.

I use this property on all jobs in all my workflows.

Describe the solution you'd like

I would like Zizmor to enforce or recommend the use of a timeout-minutes property on all jobs. This property is not strictly related to security, but I think it's such a useful configuration that it could be part of the "pedantic" or "auditor" persona.

At a stretch, you could suggest that a vulnerability in a workflow could allow an attacker to consume all your GitHub Actions minutes, and this would protect against that, but honestly it's more likely that npm install hangs and eats all your allowance.

Additional context

Jobs which call a reusable workflow (with uses) do not support timeout-minutes. The property needs to be defined in the jobs within the reusable workflow that it calls.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions