Pre-publication review: licensing, runtime hardening, CI, docs - #233
Merged
Merged
Conversation
SSABResource::is_valid() rejects an animation whose parts_animation_data is longer than the shared parts table: the runtime indexes parts() positionally over it and, parsing unchecked under panic=abort, aborts the whole process at resource-create time on an out-of-range index (only '>' is rejected, so no loadable file is refused). SSQBResource::load_from_file() now runs the FlatBuffers Verifier and rejects a structurally-invalid buffer before any accessor follows its offsets. Also drops the unregistered ssab_file_changed/ssqb_file_changed emits (never ADD_SIGNAL'd, no consumer; reload uses the built-in 'changed' signal).
…folding _emit_partcolor_mesh reuses a member scratch Array (and empty blend-shape/LOD args) instead of allocating a fresh Array per call, clearing the element slots afterwards so they never pin the caller's copy-on-write buffers - removing a per-part/per-frame heap allocation from the draw hot path. The GDExtension SNAME macro now caches the interned StringName per call-site. get_world_matrix tightens its bound to p_idx*16 + 16 <= len to match the sibling accessors. Removes the TestStub embedded shader, teststub.fs, and the never-set _test_shader_id_hash_override debug field/branch.
…tions release.yml stages the runtime third-party license files into the artifact and bundles them plus THIRD_PARTY_NOTICES.md and licenses/Apache-2.0.txt into the release zip under addons/spritestudio/licenses/, so the statically linked FlatBuffers/godot-cpp/Rust-crate licenses travel with the binaries. Declares least-privilege permissions on release/pr/weekly and pins third-party actions to full commit SHAs. THIRD_PARTY_NOTICES.md adds godot-cpp (MIT) and references the bundled Apache-2.0 text.
English-izes non-English comments in shipped scripts/code and rewords development-narrative comments. CONTRIBUTING adds Rust/zsh/godot-cpp prerequisites and a build.md pointer and fixes the Japanese ToC anchors. CHANGELOG uses 'Unreleased' instead of a placeholder date. docs index sample links are made absolute so they resolve on the docs site. The SpriteStudioPlayer2D doc class documents that pause() toggles and is_playing() stays true while paused. Repo self-links kept on cri-middleware.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-publication review sweep before this repository is made public: licensing/redistribution compliance, untrusted-input hardening, CI least-privilege/pinning, and documentation/comment cleanups. Split into four focused commits.
Changes
fix(runtime): validate untrusted
.ssab/.ssqbbefore useSSABResource::is_valid()rejects an animation whoseparts_animation_datais longer than the sharedpartstable. The Rust runtime indexesparts()positionally over it and, parsing unchecked underpanic = abort, aborts the whole editor/game process at resource-create time on an out-of-range index. Only>is rejected, so no loadable file is refused.SSQBResource::load_from_file()runs the FlatBuffersVerifierand rejects a structurally-invalid buffer before any accessor follows its offsets.ssab_file_changed/ssqb_file_changedemits (neverADD_SIGNAL'd, no consumer; reload is driven by the built-inchangedsignal).perf(render): reuse surface Array, cache SNAME; drop TestStub scaffolding
_emit_partcolor_meshreuses a member scratchArray(and empty blend-shape/LOD args) instead of allocating a freshArrayper call, clearing the slots afterwards so they never pin the caller's copy-on-write buffers — removing a per-part/per-frame heap allocation from the draw hot path.SNAMEcaches the internedStringNameper call-site (the per-frameframe_updatedemit no longer re-interns the literal).get_world_matrixtightens its bound top_idx*16 + 16 <= lento match the sibling accessors.TestStubembedded shader,teststub.fs, and the never-set_test_shader_id_hash_overridedebug field/branch.build(ci): bundle third-party licenses, least-privilege perms, pin actions
release.ymlstages the runtime third-party license files into the artifact and bundles them plusTHIRD_PARTY_NOTICES.mdandlicenses/Apache-2.0.txtinto the release zip underaddons/spritestudio/licenses/, so the statically-linked FlatBuffers / godot-cpp / Rust-crate licenses travel with the binaries.permissions:on release/pr/weekly and pins third-party actions to full commit SHAs.THIRD_PARTY_NOTICES.mdadds godot-cpp (MIT) and references the bundled Apache-2.0 text.docs: English-ize shipped comments, fix links/prereqs, document pause
CONTRIBUTINGadds Rust/zsh/godot-cpp prerequisites and a build.md pointer, and fixes the Japanese table-of-contents anchors.CHANGELOGusesUnreleasedinstead of a placeholder date; docs index sample links are made absolute so they resolve on the docs site.SpriteStudioPlayer2Ddoc class documents thatpause()toggles andis_playing()stays true while paused (useis_pausing()).Verification
ssab.h) confirmsis_valid()accepts all real.ssabsamples, rejects a mutated structurally-valid-but-semantically-inconsistent buffer (the crash case), and rejects corrupt/truncated buffers.Not included / deferred
SpriteStudio-SDKsubmodule): fork-PR CI andbuild-runtime/download-sdkdepend on the SDK repo & its Releases becoming public; and the complete.ssabcrash-safety backstop needs an SDK-side fix (catch_unwinddoes not work underpanic = abort— the runtime must switch to unwind or add Rust-side bounds checks). Tracked separately.cri-middleware; the org/URL choice is a separate (non-code) decision and can be dropped from this PR if preferred.