Skip to content

bug(provider/archive): archive provider bypasses Root, calls os.Open/os.OpenFile directly #225

Closed

Description

@David-Noble-at-work

Summary

pkg/op/provider/archive/provider.go calls os.Open and os.OpenFile directly instead of going through the Root interface. This bypasses OS-enforced confinement in confined mode.

Sites

  • Line 98: os.Open(source) — reading the archive source
  • Line 138: os.OpenFile(target, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, ...) — tar extraction
  • Line 186: os.OpenFile(target, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, ...) — zip extraction

Expected

All file I/O in pkg/op/provider/** should go through the Root interface to respect confinement boundaries.

Found during

GoLand inspection cleanup — cross-referencing unhandled Close errors with Root API usage.

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