forked from bytecodealliance/wasm-micro-runtime
-
Notifications
You must be signed in to change notification settings - Fork 2
[StepSecurity] Apply security best practices #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
step-security-bot
wants to merge
107
commits into
lum1n0us:main
Choose a base branch
from
step-security-bot:chore/GHA-170304-stepsecurity-remediation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[StepSecurity] Apply security best practices #23
step-security-bot
wants to merge
107
commits into
lum1n0us:main
from
step-security-bot:chore/GHA-170304-stepsecurity-remediation
Conversation
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
…tch (bytecodealliance#4518) the intention of the original text was to recommend to use the exactly same version (eg. 2.4.1) regardless of AOT_CURRENT_VERSION.
…ealliance#4519) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.3 to 3.29.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.29.3...v3.29.4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lliance#4514) Installing pip packages system-wide is no longer recommended, therefore we create virtual environment for setting up the build environment for LLVM.
The entire CI test run takes approximately 3 minutes. The test run fails if there is at least one failed case (failed > 0).
…bytecodealliance#4491) also, ensure NUL terminations here to simplify backend implementations. (note that, although names with '\0' in the middle are usually valid in wasm, wamr doesn't support them in general. we might revisit this later.) also, add a missing address validation in load_by_name_with_config. cf. bytecodealliance#4487
…liance#4418) Also refer to: fluent/fluent-bit#10513 Signed-off-by: Jaco Kroon <[email protected]>
…odealliance#4517) for wasi_ephemeral_nn, * implement u8 input * stop dealing with quantization. * wasi-nn doesn't have a concept of quantization or pre/post-processing. i can't think of any ways to make the backend perform zero-point/scale processing without risking to break other applications. * there seems to be applications which just use u8 inputs/outputs for a quantized model. (see [1] for an example.) for certain kinds of inputs/outputs, it usually just works. this commit keeps the legacy wasi_nn logic intact for now. tested with [1] with [2] applied. WAMR with this patch: ``` Read graph weights, size in bytes: 3561598 [wasi_nn.c:297 WARNING] load_by_name_with_config() not found [wasi_nn_tensorflowlite.cpp:272 WARNING] Default encoding is CPU. Loaded graph into wasi-nn with ID: Graph#0 Read input tensor, size in bytes: 150528 1.) [166](198)Aix galericulata 2.) [34](1)Gallus gallus domesticus 3.) [158](1)Coccothraustes coccothraustes 4.) [778](1)Sitta europaea 5.) [819](1)Anas platyrhynchos ``` wasmedge: ``` Read graph weights, size in bytes: 3561598 Loaded graph into wasi-nn with ID: Graph#0 Read input tensor, size in bytes: 150528 1.) [166](198)Aix galericulata 2.) [34](1)Gallus gallus domesticus 3.) [158](1)Coccothraustes coccothraustes 4.) [778](1)Sitta europaea 5.) [819](1)Anas platyrhynchos ``` and "Aix galericulata" seems like a reasonable classification of the image to my eyes. [1] https://github.com/second-state/WasmEdge-WASINN-examples/tree/67f174bab59d98c1b52f7367ec0928701dc998f9/tflite-birds_v1-image [2] second-state/WasmEdge-WASINN-examples#204 Related: bytecodealliance#3555 bytecodealliance#2611
Reduce the time consumption for `docker build`.
…nce#4541) note that dot is in posix and more portable than source.
llvm is one of the most important component of wamrc. otoh, i often forget which version of llvm i linked to my wamrc binary. this option would help people with a dim memory like me. ```shell spacetanuki% ./wamrc --llvm-version LLVM 19.1.2 spacetanuki% ```
…ealliance#4538) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.4 to 3.29.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.29.4...v3.29.5) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: zhenweijin <[email protected]>
…nce#4650) The overload accepting the string version of a triple will be removed soon, so switch over to the one that accepts a triple object. llvm/llvm-project#161053
…#4661) * Add release notes for WAMR-2.4.2 (bytecodealliance#4624) * bump version to 2.4.2 (bytecodealliance#4626)
* Fixed a bug in its script * Applied the wasi-sdk-pthread toolchain file Related issue: bytecodealliance#4649
…ealliance#4666) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.6 to 4.30.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.30.6...v4.30.8) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.30.8 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ealliance#4663) There is a scenario where `aot_compile_op_block()` does not prepare a block for `if`. As a result, the return value of `LLVMBuildPhi()` in `push_aot_block_to_stack_and_pass_params()` will be dangling, leading to a memory leak as it cannot be released.
* loader: fix block/loop ref params type checking
* add check_dynamic_offset_pop
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ealliance#4673) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.8 to 4.30.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.30.8...v4.30.9) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.30.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* cherry-pick gc spec test case * Fix false OOB in array.fill
…codealliance#4597) This is a preparation for bytecodealliance#4364
…ecodealliance#4594) This is a preparation for bytecodealliance#4364 No functional changes are intended.
* Import Gitbook v1.0 (bytecodealliance#1732) Modify existing documents, add markdown files for Gitbook to generate the webpage
…ealliance#4680) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.9 to 4.31.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.30.9...v4.31.0) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ce#4679) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lliance#4681) docs: clarify that * and $ in signatures does address conversion It was non-obvious that `*` means the runtime does the app to native conversion automatically. With the current docstring, one might assume that the runtime only does boundary checks and not address conversion. Under this assumption, passing the already-native address to `wasm_runtime_addr_app_to_native` will lead to unexpected behavior
…ce#4605) - only unit/CMakeLists.txt fetches googletest - only unit/unit_common.cmake find LLVM dependencies - use `WAMR_RUNTIME_LIB_SOURCE` to replace a long list - enable LLVM support across various CMake configurations - remove redundant LLVM dependency installation and add i386 support for libraries - CMake configurations for better build output and module support - Find llvm on demand - Add test suite guidelines
…ealliance#4691) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.0 to 4.31.2. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.0...v4.31.2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
As per [this blogpost](https://bytecodealliance.github.io/wamr.dev/blog/understand-the-wamr-stacks/) WAMR does not require a WASM stack in AoT/JIT mode, but `wasm_runtime_exec_env_check` still always expects the size to be > 0
- Specifying directories to scan - Refactor build script for WAMR project - add functions for wamrc and iwasm builds - streamline options handling - include LLVM installation steps. - Filter out source code related to dependencies, testing, and wasm applications - Exclude unimportant issues and coding style problems
Signed-off-by: StepSecurity Bot <[email protected]>
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.
Summary
This pull request is created by StepSecurity at the request of @lum1n0us. Please merge the Pull Request to incorporate the requested changes. Please tag @lum1n0us on your message if you have any questions related to the PR.
Security Fixes
Least Privileged GitHub Actions Token Permissions
The GITHUB_TOKEN is an automatically generated secret to make authenticated calls to the GitHub API. GitHub recommends setting minimum token permissions for the GITHUB_TOKEN.
Pinned Dependencies
GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.
Harden Runner
Harden-Runner is an open-source security agent for the GitHub-hosted runner to prevent software supply chain attacks. It prevents exfiltration of credentials, detects tampering of source code during build, and enables running jobs without
sudoaccess. See how popular open-source projects use Harden-Runner here.Harden runner usage
You can find link to view insights and policy recommendation in the build log
Please refer to documentation to find more details.
Keeping your actions up to date with Dependabot
With Dependabot version updates, when Dependabot identifies an outdated dependency, it raises a pull request to update the manifest to the latest version of the dependency. This is recommended by GitHub as well as The Open Source Security Foundation (OpenSSF).
Secure Dockerfiles
Pin image tags to digests in Dockerfiles. With the Docker v2 API release, it became possible to use digests in place of tags when pulling images or to use them in FROM lines in Dockerfiles.
Add Dependency Review Workflow
The Dependency Review Workflow enforces dependency reviews on your pull requests. The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests, and warns you about the associated security vulnerabilities. This gives you better visibility of what's changing in a pull request, and helps prevent vulnerabilities being added to your repository.
Maintain Code Quality with Pre-Commit
Pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. Hooks can be any scripts, code, or binaries that run at any stage of the git workflow. Pre-commit hooks are useful for enforcing code quality, code formatting, and detecting security vulnerabilities.
Feedback
For bug reports, feature requests, and general feedback; please email [email protected]. To create such PRs, please visit https://app.stepsecurity.io/securerepo.
Signed-off-by: StepSecurity Bot [email protected]