Skip to content

Commit ef139f4

Browse files
authored
Fix zizmor findings (onnx#7581)
### Motivation and Context Fixes # --------- Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
1 parent eec2c07 commit ef139f4

File tree

4 files changed

+11
-59
lines changed

4 files changed

+11
-59
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
@@ -80,17 +69,7 @@ jobs:
8069
export ONNX_ML=1
8170
pip install .
8271
83-
# ℹ️ Command-line programs to run using the OS shell.
84-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
85-
86-
# If the Autobuild fails above, remove it and uncomment the following three lines.
87-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
88-
89-
# - run: |
90-
# echo "Run, Build Application using script"
91-
# ./location_of_script_within_repo/buildscript.sh
92-
9372
- name: Perform CodeQL Analysis
94-
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v3.29.5
73+
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7
9574
with:
9675
category: "/language:${{matrix.language}}"

.github/workflows/pr_checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches:
1010
- main
1111

12-
permissions: # set top-level default permissions as security best practice
12+
permissions:
1313
contents: read
1414

1515
concurrency:
@@ -40,6 +40,6 @@ jobs:
4040
set +e
4141
lintrunner f --all-files -v
4242
exit 0
43-
- uses: parkerbxyz/suggest-changes@v3
43+
- uses: parkerbxyz/suggest-changes@bd099ea0d10f0e9efeb9e46d604bbe6d7a80bc34
4444
with:
4545
comment: 'You can commit the suggested changes from lintrunner.'

.github/workflows/preview_source_dist_test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ name: Test source dist of preview build at onnx-weekly
66

77
on:
88
schedule:
9-
# Run weekly on Tuesday 00:00 UTC
10-
- cron: '00 00 * * 2'
9+
- cron: '0 0 * * 2'
1110
workflow_call:
1211
inputs:
1312
os:
@@ -38,7 +37,9 @@ jobs:
3837

3938
- name: Checkout repository
4039
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
41-
40+
with:
41+
submodules: 'recursive'
42+
persist-credentials: false
4243

4344
- name: Test preview build source distribution from PyPI
4445
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
@@ -47,7 +48,7 @@ jobs:
4748
python -m pip install --upgrade pip
4849
python -m pip install setuptools
4950
python -m pip install --use-deprecated=legacy-resolver --no-binary onnx-weekly onnx-weekly
50-
python -m pip install pytest ml_dtypes pillow parameterized google-re2
51+
python -m pip install pytest ml_dtypes pillow parameterized
5152
pytest
5253
5354
- name: Test preview build source distribution from test.PyPI
@@ -56,5 +57,5 @@ jobs:
5657
python -m pip uninstall -y onnx-weekly
5758
python -m pip install setuptools
5859
python -m pip install -i https://test.pypi.org/pypi/ --use-deprecated=legacy-resolver --no-binary onnx-weekly onnx-weekly
59-
python -m pip install pytest ml_dtypes pillow parameterized google-re2
60+
python -m pip install pytest ml_dtypes pillow parameterized
6061
pytest

.github/workflows/scorecard.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,14 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
# This workflow uses actions that are not certified by GitHub. They are provided
6-
# by a third-party and are governed by separate terms of service, privacy
7-
# policy, and support documentation.
8-
95
name: Scorecard supply-chain security
106
on:
11-
# For Branch-Protection check. Only the default branch is supported. See
12-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
137
branch_protection_rule:
14-
# To guarantee Maintained check is occasionally updated. See
15-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
168
schedule:
179
- cron: '24 10 * * 6'
1810
push:
1911
branches: [ "main" ]
2012

21-
# Declare default permissions as read only.
2213
permissions: read-all
2314

2415
jobs:
@@ -30,38 +21,19 @@ jobs:
3021
security-events: write
3122
# Needed to publish results and get a badge (see publish_results below).
3223
id-token: write
33-
# Uncomment the permissions below if installing in a private repository.
34-
# contents: read
35-
# actions: read
36-
3724
steps:
3825
- name: "Checkout code"
3926
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v3.1.0
4027
with:
4128
persist-credentials: false
4229

4330
- name: "Run analysis"
44-
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
31+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a
4532
with:
4633
results_file: results.sarif
4734
results_format: sarif
48-
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
49-
# - you want to enable the Branch-Protection check on a *public* repository, or
50-
# - you are installing Scorecard on a *private* repository
51-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
52-
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
53-
54-
# Public repositories:
55-
# - Publish results to OpenSSF REST API for easy access by consumers
56-
# - Allows the repository to include the Scorecard badge.
57-
# - See https://github.com/ossf/scorecard-action#publishing-results.
58-
# For private repositories:
59-
# - `publish_results` will always be set to `false`, regardless
60-
# of the value entered here.
6135
publish_results: true
6236

63-
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
64-
# format to the repository Actions tab.
6537
- name: "Upload artifact"
6638
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
6739
with:
@@ -71,6 +43,6 @@ jobs:
7143

7244
# Upload the results to GitHub's code scanning dashboard.
7345
- name: "Upload to code-scanning"
74-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v3.29.5
46+
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7
7547
with:
7648
sarif_file: results.sarif

0 commit comments

Comments
 (0)