Skip to content

[Security hardening] Require explicit opt-in for shell workflow steps#2443

Open
PascalThuet wants to merge 1 commit intogithub:mainfrom
PascalThuet:codex/require-shell-opt-in
Open

[Security hardening] Require explicit opt-in for shell workflow steps#2443
PascalThuet wants to merge 1 commit intogithub:mainfrom
PascalThuet:codex/require-shell-opt-in

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

Summary

  • Require workflows with shell steps to declare requires.permissions.shell: true.
  • Detect shell steps recursively across conditional, switch, loop, and fan-out nesting.
  • Block direct execution of shell workflows without the permission and document the new opt-in.

Security context

Shell workflow steps execute local commands via the shell. This makes that capability an explicit workflow permission instead of an implicit behavior.

Closes #2440

Validation

  • git diff --check
  • uvx ruff check src/specify_cli/workflows/engine.py tests/test_workflows.py
  • uv run pytest tests/test_workflows.py -q

@PascalThuet PascalThuet marked this pull request as ready for review May 2, 2026 06:45
@PascalThuet PascalThuet requested a review from mnriem as a code owner May 2, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security hardening] Require explicit opt-in for workflow shell steps

1 participant