Offline Validation of .blend, GLB, and USDZ Assets: Scripts, SPDX 3.0.1 ASTs, and Closed-Lineage Provenance

A third-party mesh ZIP can contain a perfectly usable model and an unexpected build_meshes.py. A .blend can carry Python in registered Text blocks, driver expressions, and Freestyle style modules. Its rights manifest can contain malformed SPDX strings—or a syntactically valid expression that the buyer's policy rejects. A preview render answers none of those questions.

These surprises enter through different mechanisms. Packaging can copy build tooling into a customer archive. Blender can preserve execution surfaces alongside geometry. A license checker can discard the logical structure of a declaration. A provenance manifest can stop at an intermediate export and omit its upstream sources.

Offline intake needs separate, reproducible decisions about executable content, licensing, and declared ancestry. Combining them into one unexplained “clean” badge obscures what was actually checked.

Three gates with different evidence

PL-STD-5.10 asks what executable or external content the checked files contain. Evidence includes archive members, embedded scripts, driver expressions, render-triggered modules, and resource references. Its result describes inspected bytes and supported constructs. Static inspection does not establish a malware-free sandbox guarantee.

PL-STD-5.8 asks what machine-readable licensing applies to each delivered component. The license expression needs an abstract syntax tree, or AST, and a binding to the component it describes. Grammar validity, identifier recognition, and policy acceptance are separate outcomes. Passing the parser does not establish legal compatibility; SPDX explicitly recognises that syntactically valid expressions can combine incompatible licenses. 1

PL-STD-5.16 asks whether the declared input graph satisfies the source policy. Under a zero-Objaverse, no-NC, no-SA intake policy, every relevant declared ancestor must have an acceptable origin and rights basis. NC means NonCommercial; SA means ShareAlike. Those are policy exclusions, not indications of malicious content. Source-collection membership must be recorded separately from license identifiers.

A component can pass any one gate and fail another. A script-free asset may have unacceptable rights. An approved license declaration may describe a different file. A complete manifest may openly identify an excluded source.

Bind the license graph at delivery-component granularity. Meshes, textures, embedded Text scripts, and package members need stable identities, byte bindings, license expressions, and distribution roles. Retain each component's path or embedded location, digest, and supporting rights evidence. Require coverage for every delivered component and reject missing or orphan bindings. Keep the supplier's declared license separate from the organisation's assessed policy decision. An acceptable expression attached to the wrong bytes is still a binding failure.

Inspect the format rather than its suffix

For Blender, enumerate Text blocks and record use_module, the registration flag for execution on loading. Also inspect driver expressions and Freestyle module assignments. An unregistered Text block still exists and can be run manually. Blender documents Text-editor execution and Freestyle rendering as paths that remain possible when automatic execution is disabled. 2 3

Do not report every driver as arbitrary Python execution: Blender evaluates a restricted simple-expression subset without enabling Python script execution. Record the expression and its classification instead of treating a disabled autoexecution flag as proof that all drivers are inert. 4

For GLB, parse the container and JSON. Khronos explicitly permits external resources in a binary glTF file. Check buffers[*].uri, images[*].uri, and dependency-bearing fields in supported extensions. Under a self-contained delivery policy, reject references outside the approved package root; classify embedded data URIs separately. An external URI is a dependency surface, not itself proof of executable code. 5

For USDZ, inspect authored asset paths under a pinned resolver configuration. The format permits resolver-dependent paths, and package lookup can fall back to the installed ArResolver. Inventory sublayers, references, payloads, and asset-valued properties, including declared variants. A successful load of the default stage cannot establish closure over uninspected alternatives. 6

The surrounding delivery ZIP needs its own inventory. Flag unexpected build_*.py, shell scripts, executables, and nested archives. Their presence does not mean extraction executes them; it means the customer received an additional surface that needs an explicit disposition.

Concrete intake failures

The following decisions assume a delivery policy excluding unapproved executable content, unresolved dependencies, GPL-only delivery components, and NC/SA source content.

Evidence Result Required disposition
build_meshes.py beside customer meshes 5.10 delivery-content failure Preserve the original; rebuild delivery from an allowlist.
Text registration disabled, but Freestyle references Python 5.10 execution surface remains Inspect the render assignment; do not approve from use_module alone.
GLB image URI leaves the delivery root Offline dependency closure fails Supply an approved local dependency or reject.
USDZ path requires a studio-specific resolver Closure is unproven in the intake context Resolve only within the pinned, permitted context.
MIT AND (GPL-3.0-only OR CC-BY-NC-4.0) Valid grammar; policy failure Both alternatives in the required right-hand branch are disallowed.
MIT AND Grammar failure Reject the incomplete expression before policy evaluation.
Blender recorded as build_tool_only Tool role can be valid Confirm the actual delivery and retain its own rights bindings.
Shipped GPL add-on labelled build_tool_only Role contradicts delivery Evaluate the shipped code and its license obligations.
Texture ancestor missing from the manifest 5.16 closure failure Obtain the missing declaration and evidence.

Preserve SPDX structure through evaluation

The expression grammar is Annex B in SPDX 3.0.1; Annex D is the familiar reference from SPDX 2.3. The version distinction matters. In 3.0.1, license and exception identifiers match case-insensitively, while each operator must use its defined uppercase or lowercase spelling: AND and and are accepted; And is not. Reference prefixes such as LicenseRef- retain their prescribed case. 7 8

Parentheses control grouping. Otherwise the order is +, then WITH, then AND, then OR. WITH attaches an exception or addition to a simple license expression, not to an arbitrary parenthesised Boolean expression. 7

Consider the failure-table expression. A token-flattening checker that finds MIT and an OR can incorrectly accept the entire declaration. The tree instead requires MIT and a choice between the GPL and NC alternatives. Under the stated policy, its value is True AND (False OR False), which is false. The declaration is well formed; the acceptance decision is negative.

An OR represents an offered license choice. Record the selected acceptable branch and its obligations rather than merely emitting a Boolean. For WITH, evaluate the complete license-plus-addition combination: approving an exception identifier independently would discard what it modifies. 9 10

The following 35-line Python core builds an AST and evaluates it without eval. Its input is a bounded stream of (kind, value) tokens produced by a strict lexer. Kinds are LICENSE, ADDITION, WITH, AND, OR, (, and ); callers must not supply EOF. The lexer validates identifiers, reference syntax, operator spelling, whitespace, and adjacent +, retaining + in the license value. It canonicalises only after validation. 7

def spdx_ast(tokens):
    tokens = iter([*tokens, ("EOF", "")])
    head = next(tokens)
    def take(kind):
        nonlocal head
        if head[0] != kind: raise ValueError(f"expected {kind}")
        value, head = head[1], next(tokens, ("EOF", ""))
        return value
    def expr(level=0):
        if level < 2:
            node = expr(level + 1)
            op = ("OR", "AND")[level]
            while head[0] == op:
                take(op)
                node = (op, node, expr(level + 1))
            return node
        if head[0] == "(":
            take("(")
            node = expr()
            take(")")
            return node
        name = take("LICENSE")
        if head[0] == "WITH":
            take("WITH")
            return ("WITH", name, take("ADDITION"))
        return ("LICENSE", name)
    tree = expr()
    take("EOF")
    return tree

def allowed(tree, policy):
    op, *args = tree
    if op in ("LICENSE", "WITH"): return policy(*args)
    left, right = (allowed(child, policy) for child in args)
    return left and right if op == "AND" else left or right

policy(license) and policy(license, addition) must return strict Booleans for the intended use. Unknown or unresolved terms cannot become implicit approvals. Both child evaluations run, preserving opportunities to collect diagnostics. Production code additionally needs token/depth limits, pinned license-list data, reference resolution, and branch-selection evidence. This core does not validate an entire SPDX document or supply legal advice.

Proofloom's reported PL-STD-5.8 audit achieved 36/36 truth-table parity. That result applies to its audited fixtures; it is not exhaustive proof over arbitrary inputs. Grammar rejection tests remain separate: missing operands, trailing tokens, unmatched parentheses, invalid case, and illegal WITH placement exercise different failure modes.

Keep tool roles separate from shipped rights

build_tool_only is a provenance role, not a license exception. Blender's licensing guidance distinguishes the artwork it produces from distributed Python add-ons using its API. Using Blender to author a mesh does not, by itself, make the mesh GPL. Conversely, putting a GPL add-on inside the delivery creates a shipped component whose obligations need assessment. 11

The role must be supported by the package inventory and build record. Renaming shipped code, embedding it in a Text block, or describing it as tooling cannot remove its delivered bytes. Likewise, a tool-only classification does not resolve rights in third-party textures, geometry, templates, or code copied into the output.

For closed lineage, begin at each delivered artifact and traverse declared source edges to terminal inputs. Bind nodes to stable identifiers, cryptographic hashes where bytes exist, acquisition evidence, and rights records. Include baked textures, kitbash components, reference inputs, and intermediate conversions where they contribute to the artifact. Track build tools through separate, typed edges so their role remains visible without misclassifying them as incorporated content.

Reject missing nodes, unresolved references, and contradictory roles; reject cycles when the derivation policy requires an acyclic graph. Check excluded collection membership independently from NC/SA license decisions. A neutral filename or newly exported GLB cannot erase an upstream declaration.

The defensible conclusion is bounded: no excluded source was found in the declared input graph under the recorded policy. Hashes bind evidence to bytes; they cannot prove that a supplier disclosed every source. A zero-Objaverse claim must retain that boundary.

A practical isolated offline workflow

1. Preserve and inventory. Hash the received archive and retain an immutable original. Before extraction, inspect member names, types, sizes, duplicates, links, and nesting. Enforce path and resource limits. Unsupported or unreadable members produce an incomplete result, never an automatic pass.

2. Stage read-only inputs. Use a disposable, unprivileged worker with OS-enforced network denial, no credentials, a minimal filesystem view, and pinned tools and plugins. Keep inputs read-only and allocate separate writable report and temporary directories. Read-only staging protects evidence; it does not prevent a parser vulnerability from affecting the worker.

3. Inspect Blender deliberately. Launch the pinned Blender build with controls preceding the incoming file:

blender --factory-startup --background --disable-autoexec \
  /intake/asset.blend --python-exit-code 1 \
  --python /trusted/inspect_blend.py

Use disposable user configuration. Blender processes arguments in order, and --python intentionally runs the named inspector despite disabled autoexecution. That inspector must be trusted intake code outside the received pack. It should enumerate data without rendering, executing Text blocks, or enabling incoming add-ons. The launch flags do not provide process isolation. 12

4. Check dependencies and declarations. Inspect GLB and USDZ with format-aware readers in the same isolated environment. Apply resource-boundary checks before access. Unsupported extensions, resolver behaviour, or variants must remain visible coverage gaps. Bind each license AST and provenance node to the exact staged file it describes.

Keep a local, versioned evidence bundle containing identifier lists, applicable license texts, supplier declarations, and the intake policy. Missing network access must not turn failed lookups into accepted defaults.

5. Produce a separate delivery copy. If remediation is authorised, copy only approved content into a fresh output tree. Preserve required notices and rights evidence. Regenerate manifests after modifications, then rehash and rescan the final packaged bytes. Scanning a build directory cannot establish what a later ZIP actually contains.

6. Emit an auditable decision. Record input and output hashes, tool versions, resolver configuration, policy version, findings, unresolved items, and scan coverage. Keep content-security, license-policy, and lineage results distinct. Consumers should be able to reproduce both the decision and its limits without network access.

Each finding should identify a reproducible location: archive member, Blender datablock and property, GLB JSON pointer, or USD layer and property path. Include the rule identifier, observed value, and disposition. A TD can then fix an external texture reference or Freestyle assignment while a rights reviewer follows the corresponding component binding. Crashes, timeouts, and partial reads must produce incomplete scans requiring resolution; they cannot count as evidence that a check found nothing.

Use Proofloom Labs' free Reference Calibration Kit, including the RC05 rights-binding canary, to exercise the connection between delivered bytes and declared rights. For production intake, evaluate Proofloom Labs' enterprise-clean catalog against these same three gates.