Skip to content

fix: validate spec.Process != nil in New/Get - #913

Closed
Utkarsh-sharma47 wants to merge 1 commit into
urunc-dev:mainfrom
Utkarsh-sharma47:fix-oci-missing-process-validation
Closed

fix: validate spec.Process != nil in New/Get#913
Utkarsh-sharma47 wants to merge 1 commit into
urunc-dev:mainfrom
Utkarsh-sharma47:fix-oci-missing-process-validation

Conversation

@Utkarsh-sharma47

@Utkarsh-sharma47 Utkarsh-sharma47 commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Add validation to ensure an OCI spec contains a process section before returning from New() and Get().

This prevents malformed OCI bundles from progressing to later stages where Spec.Process is dereferenced during container creation or execution.

Fixes #912.

Testing

  • Added regression tests covering OCI specs with a missing process section for both New() and Get().
  • Ran the package unit tests to verify the new validation and ensure existing behavior remains unchanged.

Mirror the linux-required check so Spec.Process.Terminal and other
Process fields cannot nil-panic during create/Exec. Fixes urunc-dev#912.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit bc1d00e
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a753708c18ebb0008083dbd

@cmainas cmainas added the invalid This doesn't seem right label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New() can panic on OCI specs with a missing process section

2 participants