stable
Clone or download
The variables MAX_EXEC_TIME_IN_MS and MAX_MEMORY_SIZE_IN_BYTES that used to reside in wasmtime-wrapper-lib are now passed to the library from the PHP side, allowing for more flexibility on limiting WASM modules. To build and test libwasmtimewrapper.so: - cd tuleap/src/additional-packages/wasmtime-wrapper-lib/ - nix-shell - cargo zigbuild --target x86_64-unknown-linux-gnu.2.17 --release - cargo test --release To test the command: - tuleap config-set feature_flag_enable_pre_receive_analyze_command 1 (set the feature flag) - Put a valid WASM module under /var/lib/tuleap/untrusted-code/git/pre-receive-hook/<repo-id>.wasm - tuleap git:pre-receive-analyze <repository_id> <old_value new_value ref_name>... (launch the command with valid parameters) Part of story #28845 have an hidden command executing custom command to determine if the reference should have been rejected Change-Id: I0c422b299f6a7321dbcd6ddbfa6599ba5050508d
Modified Files
Name | ||||
---|---|---|---|---|
M | src/additional-packages/wasmtime-wrapper-lib/src/lib.rs | +36 | −25 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/src/wire.rs | +1 | −1 | Go to diff View file |
M | src/common/WebAssembly/FFIWASMCaller.php | +4 | −2 | Go to diff View file |
M | src/common/WebAssembly/FFIWASMCallerStub.php | +5 | −1 | Go to diff View file |