bitflicker64 commented on code in PR #3326: URL: https://github.com/apache/hugegraph/pull/3326#discussion_r4253638064
########## .github/workflows/submit-dependencies.yml: ########## @@ -0,0 +1,95 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Dependency baseline + +on: + push: + branches: [master] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: dependency-baseline-${{ github.repository }}-master + cancel-in-progress: false + +jobs: + validate: + if: >- + (github.repository == 'apache/hugegraph' || github.repository == 'hugegraph/hugegraph') && + github.ref == 'refs/heads/master' && + (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + PYTHONDONTWRITEBYTECODE: '1' + steps: + - name: Checkout event commit + uses: actions/checkout@v7 + with: + ref: ${{ github.sha }} + persist-credentials: false + - name: Test CI policy and dependency inventory + run: | + python3 -m unittest discover -s .github/scripts -p 'test_ci_policy.py' + python3 -m unittest discover -s install-dist/scripts/dependency -p 'test_*.py' + + submit: + needs: validate + if: >- + ((github.repository == 'apache/hugegraph' && github.event.repository.fork == false) || + github.repository == 'hugegraph/hugegraph') && + github.ref == 'refs/heads/master' && + (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: write + steps: + - name: Checkout event commit + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false + - name: Set up project JDK + uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 + with: + java-version-file: .github/workflows/.java-version + distribution: 'temurin' + - name: Verify checkout and current master + env: + EXPECTED_SHA: ${{ github.sha }} + run: | + test "$(git rev-parse HEAD)" = "$EXPECTED_SHA" + test "$(git ls-remote origin refs/heads/master | cut -f1)" = "$EXPECTED_SHA" + - name: Install the complete Maven reactor + run: mvn -B -ntp install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true --fail-at-end + - name: Refuse a stale master submission + env: + EXPECTED_SHA: ${{ github.sha }} + run: test "$(git ls-remote origin refs/heads/master | cut -f1)" = "$EXPECTED_SHA" + - name: Submit resolved reactor dependencies + uses: advanced-security/maven-dependency-submission-action@a64327a7329c9939cf675e458452febe1894a70c # v6.0.1 Review Comment: Important: `advanced-security/maven-dependency-submission-action` is not on the ASF Actions allow list, so this workflow cannot start in `apache/hugegraph`, which is the repository the PR is meant to give a baseline. Evidence: `apache/*` repositories only run actions from `apache/*`, `github/*`, `actions/*` and entries in `apache/infrastructure-actions` `approved_patterns.yml` (generated from `actions.yml`). At allow-list commit `b1b1ab19` (2026-10-12) the only `advanced-security` entry is `advanced-security/dismiss-alerts@a18f986bdb40edba0dd7a74382c15d4a3d50a1c8`; neither file names `maven-dependency-submission-action` at any ref, and a search of that repository finds no PR or issue adding it. The other third-party actions already used here are listed (`codecov/codecov-action@*`, `peter-evans/create-or-update-comment@e8674b07...`). GitHub rejects the whole workflow file when one `uses:` is disallowed, so `validate` would not run either. This PR's checks cannot show it, because the workflow only triggers on `push` to master and `workflow_dispatch`, and the org validation ran in `hugegraph/hugegraph`, which is outside the ASF policy. I could not read the live org Actions settings (403), so this rests on the published allow list. Requested change: get `advanced-security/maven-dependency-submission-action@a64327a7329c9939cf675e458452febe1894a70c` added to `actions.yml` in `apache/infrastructure-actions` and link that PR here before merge, or produce the snapshot without a non-allow-listed action. `docs/ci.md` should also name the allow-list entry as a precondition, since every later SHA bump of this pin needs a matching entry. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
