Skip to content

Panic: Not yet implemented: unhandled not schema Object #954

@TheToddLuci0

Description

@TheToddLuci0

Running typify on the BloodHound OpenGraph schemas for edge and node panics.

> cargo typify edge.json                          
The application panicked (crashed).
Message:  not yet implemented: unhandled not schema Object(
    SchemaObject {
        metadata: None,
        instance_type: Some(
            Single(
                Object,
            ),
        ),
        format: None,
        enum_values: None,
        const_value: None,
        subschemas: None,
        number: None,
        string: None,
        array: None,
        object: None,
        reference: None,
        extensions: {},
    },
)
Location: /home/notroot/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/typify-impl-0.5.0/src/convert.rs:1751

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

The line where it crashes:

_ => todo!("unhandled not schema {:#?}", subschema),

Which is the catch-all match arm in convert_not

pub(crate) fn convert_not<'a>(
&mut self,
type_name: Name,
original_schema: &'a Schema,
metadata: &'a Option<Box<schemars::schema::Metadata>>,
subschema: &'a Schema,
) -> Result<(TypeEntry, &'a Option<Box<Metadata>>)> {
match subschema {

Info

JSON Schema

Details
{
    "title": "Generic Ingest Edge",
    "description": "Defines an edge between two nodes in a generic graph ingestion system. Each edge specifies a start and end node using either a unique identifier (id) or a name-based lookup. A kind is required to indicate the relationship type. Optional properties may include custom attributes. You may optionally constrain the start or end node to a specific kind using the kind field inside each reference.",
    "type": "object",
    "properties": {
        "start": {
            "type": "object",
            "properties": {
                "match_by": {
                    "type": "string",
                    "enum": ["id", "name"],
                    "default": "id",
                    "description": "Whether to match the start node by its unique object ID or by its name property."
                },
                "value": {
                    "type": "string",
                    "description": "The value used for matching — either an object ID or a name, depending on match_by."
                },
                "kind": {
                    "type": "string",
                    "description": "Optional kind filter; the referenced node must have this kind."
                }
            },
            "required": ["value"]
        },
        "end": {
            "type": "object",
            "properties": {
                "match_by": {
                    "type": "string",
                    "enum": ["id", "name"],
                    "default": "id",
                    "description": "Whether to match the start node by its unique object ID or by its name property."
                },
                "value": {
                    "type": "string",
                    "description": "The value used for matching — either an object ID or a name, depending on match_by."
                },
                "kind": {
                    "type": "string",
                    "description": "Optional kind filter; the referenced node must have this kind."
                }
            },
            "required": ["value"]
        },
        "kind": {
            "type": "string",
            "description": "Edge kind name must contain only alphanumeric characters and underscores.",
            "pattern": "^[A-Za-z0-9_]+$"
        },
        "properties": {
            "type": ["object", "null"],
            "description": "A key-value map of edge attributes. Values must not be objects. If a value is an array, it must contain only primitive types (e.g., strings, numbers, booleans) and must be homogeneous (all items must be of the same type).",
            "additionalProperties": {
                "type": ["string", "number", "boolean", "array"],
                "items": {
                    "not": {
                        "type": "object"
                    }
                }
            }
        }
    },
    "required": ["start", "end", "kind"],
    "examples": [
        {
            "start": {
                "match_by": "id",
                "value": "user-1234"
            },
            "end": {
                "match_by": "id",
                "value": "server-5678"
            },
            "kind": "has_session",
            "properties": {
                "timestamp": "2025-04-16T12:00:00Z",
                "duration_minutes": 45
            }
        },
        {
            "start": {
                "match_by": "name",
                "value": "alice",
                "kind": "User"
            },
            "end": {
                "match_by": "name",
                "value": "file-server-1",
                "kind": "Server"
            },
            "kind": "accessed_resource",
            "properties": {
                "via": "SMB",
                "sensitive": true
            }
        },
        {
            "start": {
                "value": "admin-1"
            },
            "end": {
                "value": "domain-controller-9"
            },
            "kind": "admin_to",
            "properties": {
                "reason": "elevated_permissions",
                "confirmed": false
            }
        },
        {
            "start": {
                "match_by": "name",
                "value": "Printer-007"
            },
            "end": {
                "match_by": "id",
                "value": "network-42"
            },
            "kind": "connected_to",
            "properties": null
        }
    ]
}

Backtrace

Details
The application panicked (crashed).
Message:  not yet implemented: unhandled not schema Object(
    SchemaObject {
        metadata: None,
        instance_type: Some(
            Single(
                Object,
            ),
        ),
        format: None,
        enum_values: None,
        const_value: None,
        subschemas: None,
        number: None,
        string: None,
        array: None,
        object: None,
        reference: None,
        extensions: {},
    },
)
Location: /home/notroot/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/typify-impl-0.5.0/src/convert.rs:1751

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 7 frames hidden ⋮                               
   8: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_not::hfb39fec643f2fb80
      at <unknown source file>:<unknown line>
   9: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  10: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  11: typify_impl::TypeSpace::id_for_schema::hfa9c03d635fb62b6
      at <unknown source file>:<unknown line>
  12: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_array::h9927dda009e79775
      at <unknown source file>:<unknown line>
  13: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  14: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  15: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_all_of::h8245ea0cae58de93
      at <unknown source file>:<unknown line>
  16: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  17: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  18: typify_impl::enums::<impl typify_impl::TypeSpace>::external_variant::h24d374d0dd109ecc
      at <unknown source file>:<unknown line>
  19: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::hec3f5c2a901a1635
      at <unknown source file>:<unknown line>
  20: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hd7d5a5eac2dfe3af
      at <unknown source file>:<unknown line>
  21: core::iter::adapters::try_process::h0204a60ca93bfa33
      at <unknown source file>:<unknown line>
  22: typify_impl::enums::<impl typify_impl::TypeSpace>::untagged_enum::he7bf6a1260abd32b
      at <unknown source file>:<unknown line>
  23: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  24: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  25: typify_impl::TypeSpace::id_for_schema::hfa9c03d635fb62b6
      at <unknown source file>:<unknown line>
  26: typify_impl::structs::<impl typify_impl::TypeSpace>::make_map::hfe9b49a911eb8b56
      at <unknown source file>:<unknown line>
  27: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_object::he5d077a1280ed520
      at <unknown source file>:<unknown line>
  28: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  29: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  30: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  31: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  32: typify_impl::TypeSpace::id_for_schema::hfa9c03d635fb62b6
      at <unknown source file>:<unknown line>
  33: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_property::ha48c3d71d45991cc
      at <unknown source file>:<unknown line>
  34: core::iter::adapters::filter_map::filter_map_try_fold::{{closure}}::h3171f138758aeaf1
      at <unknown source file>:<unknown line>
  35: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::try_fold::hca3d638324f03021
      at <unknown source file>:<unknown line>
  36: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h343d55ca913780d2
      at <unknown source file>:<unknown line>
  37: core::iter::adapters::try_process::h50d064b291b38b37
      at <unknown source file>:<unknown line>
  38: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_members::h112dce235bd36993
      at <unknown source file>:<unknown line>
  39: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_object::he5d077a1280ed520
      at <unknown source file>:<unknown line>
  40: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object::hd6be2b1b902499a7
      at <unknown source file>:<unknown line>
  41: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema::h02cdab117a63e14e
      at <unknown source file>:<unknown line>
  42: typify_impl::TypeSpace::convert_ref_type::h76939c0f40790204
      at <unknown source file>:<unknown line>
  43: typify_impl::TypeSpace::add_root_schema::h1d074e78b5fa7f01
      at <unknown source file>:<unknown line>
  44: cargo_typify::convert::hdbbf4f622a5d9466
      at <unknown source file>:<unknown line>
  45: cargo_typify::main::h0fa2a6bf12cf53cb
      at <unknown source file>:<unknown line>
  46: std::sys::backtrace::__rust_begin_short_backtrace::hb1410cc4bb68c11f
      at <unknown source file>:<unknown line>
  47: std::rt::lang_start::{{closure}}::h065001449cded4f6
      at <unknown source file>:<unknown line>
  48: std::rt::lang_start_internal::h1536f6da427acac8
      at <unknown source file>:<unknown line>
  49: main<unknown>
      at <unknown source file>:<unknown line>
  50: __libc_start_call_main<unknown>
      at <unknown source file>:<unknown line>
  51: __libc_start_main_alias_1<unknown>
      at <unknown source file>:<unknown line>
  52: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions