Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/sdk-release.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"engine_commit": "e630d1a33560d2a449747f00b4700f4770060793",
"engine_commit": "dcb5145dfeb3906830c0c6dc6b6d1f22ad1b4950",
"attempt": 1
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ logs to troubleshoot a private build.

Automation in this repository is AGPL-3.0-only. SDK components retain their own
licences and required notices; this repository's licence does not relicense them.

The portable core is published only as `portable/{Debug,Release}/WolEngine.Core.dll`
and its reference props. These DLLs use the same PE/debug-directory audit as the
backend. The allowlist grants no permission for core source, symbols, extra
assemblies or build output; the existing source and log exclusions still apply.
5 changes: 3 additions & 2 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def check_sdk(cls, archive, commit, target):
native_platform, arch, extension = cls.TARGETS[target]
required = {"WolEngine.props", "GodotApi.props", "native/spatial.gdextension",
f"native/bin/libspatial.{native_platform}.template_release.{arch}.{extension}",
"managed/Debug/WolEngine.dll", "managed/Release/WolEngine.dll"}
"managed/Debug/WolEngine.dll", "managed/Release/WolEngine.dll",
"portable/Debug/WolEngine.Core.dll", "portable/Release/WolEngine.Core.dll", "portable/WolEngine.Core.props"}
editor = {"linux-x64": "editor/Godot_v4.7.2-stable_mono_linux.x86_64",
"windows-x64": "editor/Godot_v4.7.2-stable_mono_win64.exe",
"macos-universal": "editor/Godot.app/Contents/MacOS/Godot"}[target]
Expand Down Expand Up @@ -150,7 +151,7 @@ def check_sdk(cls, archive, commit, target):
raise cls.PolicyError("Nonempty C# implementation in SDK")
if suffix in {".dll", ".exe"} and not data.startswith(b"MZ"):
raise cls.PolicyError("Invalid PE binary")
if name.startswith("managed/"):
if suffix == ".dll" and name.startswith(("managed/", "portable/")):
# Owned assemblies must not embed portable PDBs or CodeView paths.
pe = struct.unpack_from("<I", data, 0x3c)[0]
if data[pe:pe + 4] != b"PE\0\0":
Expand Down
16 changes: 16 additions & 0 deletions test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def sdk(self, target='linux-x64', extra=None, manifest_extra=None, managed=None)
files = {'WolEngine.props': b'<Project/>', 'GodotApi.props': b'<Project/>', 'native/spatial.gdextension': b'[configuration]',
f'native/bin/libspatial.{platform}.template_release.{arch}.{extension}': native,
'managed/Debug/WolEngine.dll': managed or self.pe, 'managed/Release/WolEngine.dll': managed or self.pe,
'portable/WolEngine.Core.props': b'<Project/>', 'portable/Debug/WolEngine.Core.dll': self.pe, 'portable/Release/WolEngine.Core.dll': self.pe,
editor: native, 'runtime/PublicIdentity.cs': b'\n'}
files.update(extra or {})
manifest = {'schema': 1, 'godot': '4.7.2', 'target': target, 'commit': self.commit, 'editor': editor,
Expand Down Expand Up @@ -74,6 +75,21 @@ def test_embedded_symbols_and_private_source_in_dependency_packages_are_rejected
with self.assertRaises(ValueError):
SDKRelease.check_sdk(self.sdk(extra={'editor/GodotSharp/Tools/nupkgs/Godot.NET.Sdk.4.7.2.nupkg': nested.getvalue()}), self.commit, 'linux-x64')

def test_portable_core_uses_the_same_source_and_symbol_boundary(self):
for name, payload in [('portable/Release/WolEngine.Core.cs', b'namespace Wol.Engine;'),
('portable/Release/WolEngine.Core.pdb', b'symbols'),
('portable/Release/Extra.dll', self.pe),
('portable/Release/WolEngine.Core.dll', b'source disguised as a DLL')]:
with self.subTest(name=name), self.assertRaises(ValueError):
SDKRelease.check_sdk(self.sdk(extra={name: payload}), self.commit, 'linux-x64')
pe = bytearray(self.pe) + bytearray(128)
struct.pack_into('<H', pe, 134, 1)
struct.pack_into('<II', pe, 152 + 112 + 48, 0x1000, 28)
struct.pack_into('<IIII', pe, 392 + 8, 128, 0x1000, 128, 512)
struct.pack_into('<I', pe, 512 + 12, 17)
with self.assertRaises(ValueError):
SDKRelease.check_sdk(self.sdk(extra={'portable/Debug/WolEngine.Core.dll': bytes(pe)}), self.commit, 'linux-x64')

def test_credentials_checksum_and_unexpected_manifest_fields_are_rejected(self):
credential = b'github_' + b'pat_' + b'x' * 24
with self.assertRaises(ValueError): SDKRelease.check_sdk(self.sdk(extra={'runtime/branding/README.md': credential}), self.commit, 'linux-x64')
Expand Down