Skip to content

Support OCI seccomp profiles inside gVisor sandboxes #2277

Open

Description

@destijl

This issue was generated as part of an AI review of pre-GA debug and diagnostic surfaces.

Problem Description

In internal/ateinterceptors/ateinterceptors.go:63-68, the ServerUnaryInterceptor used by ateapi formats unhandled Go errors directly into the client-facing gRPC status error:

if err != nil {
    if st, ok := apierror.FromError(err); ok {
        return nil, st.Err()
    }
    return nil, status.Errorf(codes.Internal, "internal server error: %v", err)
}

Throughout cmd/ateapi/internal/controlapi and cmd/ateapi/internal/workerservice, database errors are returned as standard wrapped errors (e.g. fmt.Errorf("while getting actor from DB: %w", err) in actor.go:160, 209, 354, 562, 592; atespace.go:77; worker.go:48, 93, 152, 307).

Impact

When database errors occur (e.g. PostgreSQL syntax errors, constraint violations, connection timeouts, column mismatches from pgx), the full internal error string and SQL context are transmitted directly to external callers. Attackers can use crafted input to probe database schema, table names, constraint definitions, and internal network addresses.

Proposed Remediation

In internal/ateinterceptors/ateinterceptors.go, sanitize unexpected errors before returning them to external clients:

  1. Log the full error %v and stack trace server-side with the active trace/span ID.
  2. Return a generic, opaque error to the client:
    return nil, status.Errorf(codes.Internal, "internal server error (trace_id: %s)", traceID)

Activity

  1. juli4n commented on Oct 8, 2026

    @juli4n
    Collaborator

    We had this behavior initially, and I think people brought up that propagating the error message simplifies troubleshooting. I don't think security was considered in that discussion.

    I remember Taahir Ahmed (@ahmedtd) and Bowei Du (@bowei) had opinions on this.

  2. destijl commented on Oct 8, 2026

    @destijl
    CollaboratorAuthor

    This feels like a low severity security finding, which is why I didn't mark it for M3. In normal operations there's going to be a customer application layer between substrate and an attacker, so filtering can and should be done at that layer. Hiding information at this layer is most likely to be useful when an attacker already has a foothold inside the infrastructure, or has some SSRF that allows them to make requests to the API to do recon.

  3. maxsmythe commented on Oct 8, 2026

    @maxsmythe
    Collaborator

    I had approved it for merge, but blocked on failing test. I'll defer trying to revive the merge to give people time to object.

  4. changed the title [-]Unwrapped backend database errors leaked to external gRPC callers[/-] [+]Support OCI seccomp profiles inside gVisor sandboxes[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions