Skip to content

Commit 4185e37

Browse files
authored
fix: safety ci using static check zizmor (#1123)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> this patch make ci more safety using static check zizmor: to avoid code injection more: - apache/airflow#45408 - astral-sh/ruff#14844 and github actions safety is more and more important: link: https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised Signed-off-by: yihong0618 <[email protected]>
1 parent 2a1423f commit 4185e37

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/actions/overwrite-package-version/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ runs:
3535

3636
- name: Get and update version
3737
shell: bash
38+
env:
39+
TIMESTAMP: ${{ inputs.timestamp }}
3840
run: |
3941
CURRENT_VERSION=$(python -c "import toml; print(toml.load('bindings/python/pyproject.toml')['project']['version'])")
40-
NEW_VERSION="${CURRENT_VERSION}.dev${{ inputs.timestamp }}"
42+
NEW_VERSION="${CURRENT_VERSION}.dev${TIMESTAMP}"
4143
NEW_VERSION=$NEW_VERSION python -c "
4244
import toml
4345
import os

.github/actions/setup-builder/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ runs:
2828
- name: Setup specified Rust toolchain
2929
shell: bash
3030
if: ${{ inputs.rust-version != '' }}
31+
env:
32+
RUST_VERSION: ${{ inputs.rust-version }}
3133
run: |
32-
echo "Installing ${{ inputs.rust-version }}"
33-
rustup toolchain install ${{ inputs.rust-version }}
34-
rustup override set ${{ inputs.rust-version }}
34+
echo "Installing ${RUST_VERSION}"
35+
rustup toolchain install ${RUST_VERSION}
36+
rustup override set ${RUST_VERSION}
3537
rustup component add rustfmt clippy
3638
- name: Setup Rust toolchain according to rust-toolchain.toml
3739
shell: bash

0 commit comments

Comments
 (0)