From 27a109c1243e70a2c824ee5281842b7217be1208 Mon Sep 17 00:00:00 2001 From: "hf-security-analysis[bot]" <265538906+hf-security-analysis[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 14:17:12 +0000 Subject: [PATCH] Pass workflow expressions through the environment A `${{ }}` expression inside `run:` is substituted into the script before the shell reads it, so whoever controls its value controls part of the command. Binding it in `env:` makes it data. --- .github/workflows/build_documentation.yml | 2 +- .github/workflows/build_pr_documentation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 96e9c8c..076d898 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -62,7 +62,7 @@ jobs: doc-builder build optimum.executorch docs/source/ \ --repo_name optimum-executorch \ --build_dir executorch-doc-build/ \ - --version ${{ env.VERSION }} \ + --version ${VERSION} \ --version_tag_suffix "" \ --html \ --clean \ diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index f94e139..004b86d 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -58,7 +58,7 @@ jobs: sudo chmod -R ugo+rwx executorch-doc-build cd executorch-doc-build sudo mv optimum.executorch optimum-executorch - echo ${{ env.COMMIT_SHA }} > ./commit_sha + echo ${COMMIT_SHA} > ./commit_sha echo ${{ github.event.number }} > ./pr_number - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1