Skip to content

[BUG][Medium]- Recursive classes can exhaust validation or rendering stacks #102

Open

Description

@arthurianresolve

Summary

A .dsrs class can reference itself through a named field type. When a signature references the class, artifact validation recursively revisits its fields without a visited set. Schema rendering also recursively expands nested class definitions. Loading a lower trust program can exhaust the host stack; direct rendering of the same schema can do so as well.

Affected code

Suggested resolution

  • Detect cycles while validating class references and return a structured error or use bounded traversal.
  • Render recursive schemas with references or a defined expansion depth rather than unbounded inline expansion.

Acceptance criteria

  • A self referential or mutually recursive class cannot terminate the process during load or rendering.
  • Valid acyclic classes continue to validate and render.

Related issues

#67 asks for structured error handling broadly. This ticket identifies the recursive traversal that needs cycle detection and a controlled failure.

Validation performed

Static source review of upstream main at 72b247e2bddc7337f923461fb27b4127c7d104f3. No runtime exploit or deployed service test was performed.

Tracking

  • Finding ID: csf_99c6b98d863a4d587637a2be
  • Fingerprint: codex-security/v1:sha256:36e936fa851e4318e4e1ff0901e62ecafea8dc2c352b5712476f6a5542f6e442

AI disclosure

OpenAI Codex assisted with the static source review and organization of this issue. No code change is included.

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