You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "derrickaw (via GitHub)" <gi...@apache.org> on 2026/06/25 01:25:52 UTC

[PR] Initial zizmor [beam]

derrickaw opened a new pull request, #39097:
URL: https://github.com/apache/beam/pull/39097

   1. `zizmor --fix=all --gh-token=$(gh auth token) .github/workflows/`
   2. Others will need to be investigated more.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial workflows static analysis fixes [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4997267214

   > Note that there should be a PreCommit GHA triggered, but currently failing with
   > 
   > PreCommit GHA currently failing due to The action [zizmorcore/zizmor-action@6599ee8](https://github.com/zizmorcore/zizmor-action/commit/6599ee8) is not allowed in apache/beam
   
   Fixed the PreCommit GHA workflow and its running again for this PR. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial zizmor [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4795386583

   > [!NOTE]
   > Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial zizmor [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4795479239

   Assigning reviewers:
   
   R: @Abacn for label build.
   
   
   Note: If you would like to opt out of this review, comment `assign to next reviewer`.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial zizmor [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw commented on code in PR #39097:
URL: https://github.com/apache/beam/pull/39097#discussion_r3471305997


##########
.github/workflows/deploy_release_candidate_pypi.yaml:
##########
@@ -22,65 +22,69 @@
~
~jobs:
~  deploy_release_candidate_pypi:
~    runs-on: [self-hosted, ubuntu-24.04, main]
~    steps:
~    - name: Mask PyPi id/password
~      run: |
~        # Workaround for Actions bug - https://github.com/actions/runner/issues/643
~        PYPI_API_TOKEN=$(jq -r '.inputs.PYPI_API_TOKEN' $GITHUB_EVENT_PATH)
         echo "::add-mask::$PYPI_API_TOKEN"
     - name: Checkout
       uses: actions/checkout@v7
+      with:
+        persist-credentials: false
     - name: Setup environment
       uses: ./.github/actions/setup-environment-action
       with:
~        python-version: 3.11
~        disable-cache: true
~    - name: Install dependencies
~      run: |
~        pip install python-dateutil
~        pip install requests
~        pip install twine
~    - name: Deploy to Pypi
~      env:
~        RC_TAG: "v${{ github.event.inputs.RELEASE }}-RC${{ github.event.inputs.RC }}"
~        GIT_REPO_BASE_URL: https://github.com/apache/beam
~        RELEASE_DIR: "beam/${{ github.event.inputs.RELEASE }}"
~        RELEASE: "${{ github.event.inputs.RELEASE }}"
         SCRIPT_DIR: release/src/main/scripts
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         SVN_ARTIFACTS_DIR: "beam/${{ github.event.inputs.RELEASE }}/python"
+        GITHUB_EVENT_INPUTS_RC: ${{ github.event.inputs.RC }}
+        GITHUB_EVENT_INPUTS_PYPI_API_TOKEN: ${{ github.event.inputs.PYPI_API_TOKEN }}
       run: |
         git fetch --all --tags --prune
         RELEASE_COMMIT=$(git rev-list -n 1 $RC_TAG)
~
~        PYTHON_ARTIFACTS_DIR="./python"
~        python "release/src/main/scripts/download_github_actions_artifacts.py" \
~          --github-token-var GITHUB_TOKEN \
~          --repo-url "apache/beam" \
           --rc-tag "${RC_TAG}" \
           --release-commit "${RELEASE_COMMIT}" \
           --artifacts_dir "${PYTHON_ARTIFACTS_DIR}" \
-          --rc_number "${{ github.event.inputs.RC }}" \
+          --rc_number "${GITHUB_EVENT_INPUTS_RC}" \
           --yes True
 
         cd "${PYTHON_ARTIFACTS_DIR}"
         ls
 
-        echo "------Checking Hash Value for apache_beam-${RELEASE}rc${{ github.event.inputs.RC }}.tar.gz-----"
-        sha512sum -c "apache_beam-${RELEASE}rc${{ github.event.inputs.RC }}.tar.gz.sha512"
+        echo "------Checking Hash Value for apache_beam-${RELEASE}rc${GITHUB_EVENT_INPUTS_RC}.tar.gz-----"
+        sha512sum -c "apache_beam-${RELEASE}rc${GITHUB_EVENT_INPUTS_RC}.tar.gz.sha512"
         
         for artifact in *.whl; do
           echo "----------Checking Hash Value for ${artifact} wheel-----------"
~          sha512sum -c "${artifact}.sha512"
~        done
~        
~        echo "===================Removing sha512 files======================="
~        rm $(ls | grep -i ".*.sha512$")
~
~        echo "====================Upload rc to pypi========================"
~        mkdir dist && mv $(ls | grep apache) dist && cd dist
         echo "Will upload the following files to PyPI:"
         ls
 
-        twine upload --verbose * -u __token__ -p "${{ github.event.inputs.PYPI_API_TOKEN }}"
+        twine upload --verbose * -u __token__ -p "${GITHUB_EVENT_INPUTS_PYPI_API_TOKEN}"

Review Comment:
   ignore



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial workflows static analysis fixes [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4994999374

   Hi @Abacn, does this look ok? I think this should be a no-op. Further findings through zizmor will have to take a more careful approach. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial zizmor [beam]

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #39097:
URL: https://github.com/apache/beam/pull/39097#discussion_r3471298939


##########
.github/workflows/deploy_release_candidate_pypi.yaml:
##########
@@ -22,65 +22,69 @@
~
~jobs:
~  deploy_release_candidate_pypi:
~    runs-on: [self-hosted, ubuntu-24.04, main]
~    steps:
~    - name: Mask PyPi id/password
~      run: |
~        # Workaround for Actions bug - https://github.com/actions/runner/issues/643
~        PYPI_API_TOKEN=$(jq -r '.inputs.PYPI_API_TOKEN' $GITHUB_EVENT_PATH)
         echo "::add-mask::$PYPI_API_TOKEN"
     - name: Checkout
       uses: actions/checkout@v7
+      with:
+        persist-credentials: false
     - name: Setup environment
       uses: ./.github/actions/setup-environment-action
       with:
~        python-version: 3.11
~        disable-cache: true
~    - name: Install dependencies
~      run: |
~        pip install python-dateutil
~        pip install requests
~        pip install twine
~    - name: Deploy to Pypi
~      env:
~        RC_TAG: "v${{ github.event.inputs.RELEASE }}-RC${{ github.event.inputs.RC }}"
~        GIT_REPO_BASE_URL: https://github.com/apache/beam
~        RELEASE_DIR: "beam/${{ github.event.inputs.RELEASE }}"
~        RELEASE: "${{ github.event.inputs.RELEASE }}"
         SCRIPT_DIR: release/src/main/scripts
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         SVN_ARTIFACTS_DIR: "beam/${{ github.event.inputs.RELEASE }}/python"
+        GITHUB_EVENT_INPUTS_RC: ${{ github.event.inputs.RC }}
+        GITHUB_EVENT_INPUTS_PYPI_API_TOKEN: ${{ github.event.inputs.PYPI_API_TOKEN }}
       run: |
         git fetch --all --tags --prune
         RELEASE_COMMIT=$(git rev-list -n 1 $RC_TAG)
~
~        PYTHON_ARTIFACTS_DIR="./python"
~        python "release/src/main/scripts/download_github_actions_artifacts.py" \
~          --github-token-var GITHUB_TOKEN \
~          --repo-url "apache/beam" \
           --rc-tag "${RC_TAG}" \
           --release-commit "${RELEASE_COMMIT}" \
           --artifacts_dir "${PYTHON_ARTIFACTS_DIR}" \
-          --rc_number "${{ github.event.inputs.RC }}" \
+          --rc_number "${GITHUB_EVENT_INPUTS_RC}" \
           --yes True
 
         cd "${PYTHON_ARTIFACTS_DIR}"
         ls
 
-        echo "------Checking Hash Value for apache_beam-${RELEASE}rc${{ github.event.inputs.RC }}.tar.gz-----"
-        sha512sum -c "apache_beam-${RELEASE}rc${{ github.event.inputs.RC }}.tar.gz.sha512"
+        echo "------Checking Hash Value for apache_beam-${RELEASE}rc${GITHUB_EVENT_INPUTS_RC}.tar.gz-----"
+        sha512sum -c "apache_beam-${RELEASE}rc${GITHUB_EVENT_INPUTS_RC}.tar.gz.sha512"
         
         for artifact in *.whl; do
           echo "----------Checking Hash Value for ${artifact} wheel-----------"
~          sha512sum -c "${artifact}.sha512"
~        done
~        
~        echo "===================Removing sha512 files======================="
~        rm $(ls | grep -i ".*.sha512$")
~
~        echo "====================Upload rc to pypi========================"
~        mkdir dist && mv $(ls | grep apache) dist && cd dist
         echo "Will upload the following files to PyPI:"
         ls
 
-        twine upload --verbose * -u __token__ -p "${{ github.event.inputs.PYPI_API_TOKEN }}"
+        twine upload --verbose * -u __token__ -p "${GITHUB_EVENT_INPUTS_PYPI_API_TOKEN}"

Review Comment:
   ## CodeQL / Workflow does not contain permissions
   
   Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
   
   [Show more details](https://github.com/apache/beam/security/code-scanning/94)



##########
.github/workflows/git_tag_released_version.yml:
##########
@@ -32,23 +32,31 @@
~
~jobs:
~  generate_tags:
~    runs-on: ubuntu-latest
~    env:
~      VERSION_PATH: ${{ github.event.inputs.VERSION_TAG }}
     steps:
       - name: Check out code
         uses: actions/checkout@v7
+        with:
+          persist-credentials: false
       - name: Set git config
         run: |
           git config user.name $GITHUB_ACTOR
           git config user.email actions@"$RUNNER_NAME".local
       - name: Tag for Go SDK
         run: |
-          git tag -a sdks/${{ github.event.inputs.VERSION_TAG }} -m ${{ github.event.inputs.RC_TAG }}
-          git push https://github.com/apache/beam sdks/${{ github.event.inputs.VERSION_TAG }}
+          git tag -a sdks/${GITHUB_EVENT_INPUTS_VERSION_TAG} -m ${GITHUB_EVENT_INPUTS_RC_TAG}
+          git push https://github.com/apache/beam sdks/${GITHUB_EVENT_INPUTS_VERSION_TAG}
+        env:
+          GITHUB_EVENT_INPUTS_VERSION_TAG: ${{ github.event.inputs.VERSION_TAG }}
+          GITHUB_EVENT_INPUTS_RC_TAG: ${{ github.event.inputs.RC_TAG }}
       - name: Tag for repo root
         run: |
-          git tag -a ${{ github.event.inputs.VERSION_TAG }} -m ${{ github.event.inputs.RC_TAG }}
-          git push https://github.com/apache/beam ${{ github.event.inputs.VERSION_TAG }}
+          git tag -a ${GITHUB_EVENT_INPUTS_VERSION_TAG} -m ${GITHUB_EVENT_INPUTS_RC_TAG}
+          git push https://github.com/apache/beam ${GITHUB_EVENT_INPUTS_VERSION_TAG}
+        env:
+          GITHUB_EVENT_INPUTS_VERSION_TAG: ${{ github.event.inputs.VERSION_TAG }}
+          GITHUB_EVENT_INPUTS_RC_TAG: ${{ github.event.inputs.RC_TAG }}

Review Comment:
   ## CodeQL / Workflow does not contain permissions
   
   Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
   
   [Show more details](https://github.com/apache/beam/security/code-scanning/95)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial workflows static analysis fixes [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4983398184

   PreCommit Java Dataflow Non-portable workflow looks permared before this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial zizmor [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4795474036

   assign set of reviewers


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial workflows static analysis fixes [beam]

Posted by "derrickaw (via GitHub)" <gi...@apache.org>.
derrickaw merged PR #39097:
URL: https://github.com/apache/beam/pull/39097


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Initial workflows static analysis fixes [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #39097:
URL: https://github.com/apache/beam/pull/39097#issuecomment-4995820824

   Note that there should be a PreCommit GHA triggered, but currently failing with
   
   PreCommit GHA currently failing due to The action zizmorcore/zizmor-action@6599ee8 is not allowed in apache/beam


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org