Skip to content

Safe-output integrity checks block indefinitely when a captured artifact becomes a FIFO #68786

Closed

Description

@pelikhan

Summary

Review of #68732 at commit 40c71f95ad05d3f2da56bc19e38e3f041495f7e9 found a P2 behavior issue: replacing an already-captured regular transport file with a FIFO can hang the safe-output handler instead of producing an integrity error.

Location

actions/setup/js/transport_integrity.cjs:33–39,52–59

Reproduction

  1. Create a regular patch file and capture it with createTransportIntegrity().captureOptional(path).
  2. Unlink the file and create a FIFO at the same path, with no writer attached.
  3. Call assertUnchanged().

The synchronous openSync(O_RDONLY | O_NOFOLLOW) blocks before fstatSync() can reject the nonregular file. A bounded child-process reproduction timed out and required termination.

Expected behavior

Reject the replaced artifact promptly with a transport-integrity failure, without blocking the Node.js event loop until the job timeout.

Suggested fix and coverage

Use a nonblocking descriptor open followed by descriptor-based regular-file validation, preserving no-follow and identity checks. Add bounded child-process tests for FIFO inputs both at capture and after capture. Ensure cleanup still runs after rejection.

Found during behavioral review of #68732; no fix was applied.

Activity

  1. added 2 commits that reference this issue on Oct 14, 2026
    016dc41
    0389684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions