fix(paths): enforce selected path contracts at admission (#9465)

This commit is contained in:
morluto authored and GitHub committed 2026-11-09 03:14:48 +08:00
1 parent b4b881116f
commit 25d3c7237f
18 files changed
+57 -93

No files matched your search

+3 -3
View File
@@ -8,7 +8,7 @@ import {
PYTHON_PYC_HEADER_BYTES,
PYTHON_PYC_INT_PREVIEW_BITS,
pythonPycMarshalProfile,
type InspectPythonPycInput,
type PythonPycLimits,
type PythonPyc,
type PythonPycCodeLayout,
type PythonPycCodeObject,
@@ -202,7 +202,7 @@ const sha256 = (bytes: Buffer): string => {
export const parsePythonPyc = (
bytes: Buffer,
artifact: { path: string; sha256: string; bytes: number },
input: InspectPythonPycInput,
input: PythonPycLimits,
): PythonPyc => {
if (bytes.length !== artifact.bytes)
malformed("Selected artifact length disagrees with the retained bytes.");
@@ -351,7 +351,7 @@ class MarshalReader {
readonly bytes: Buffer,
readonly layout: PythonPycCodeLayout,
readonly magic: number,
readonly input: InspectPythonPycInput,
readonly input: PythonPycLimits,
readonly rejectNegativeCodeFields: boolean,
) {}