Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: Checkout TUF
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: Set up Python (oldest supported version)
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
uses: actions/[email protected]
with:
python-version: "3.11"
cache: 'pip'
Expand All @@ -33,9 +33,29 @@ jobs:
RUFF_OUTPUT_FORMAT: github
run: tox -e lint

lint-actions-lock:
name: Lint Actions Lockfile
runs-on: ubuntu-latest
permissions:
contents: read
env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Checkout TUF
uses: actions/[email protected]
with:
persist-credentials: false

- name: Install gh-actions-lock
run: gh extension install github/gh-actions-lock

- name: Verify GitHub Actions lockfile
run: gh actions-lock --verify

tests:
name: Tests
needs: lint-test
needs: [lint-test, lint-actions-lock]
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
Expand All @@ -50,12 +70,12 @@ jobs:

steps:
- name: Checkout TUF
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down Expand Up @@ -112,7 +132,7 @@ jobs:

all-tests-pass:
name: All tests passed
needs: [lint-test, tests]
needs: [lint-test, lint-actions-lock, tests]
runs-on: ubuntu-latest
steps:
- run: echo "All test jobs have completed successfully."
Expand All @@ -128,7 +148,7 @@ jobs:
run: touch requirements.txt

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
uses: actions/[email protected]
with:
python-version: '3.x'
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_test_sslib_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: Checkout TUF
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
uses: actions/[email protected]
with:
python-version: '3.x'
cache: 'pip'
Expand Down
108 changes: 108 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/_test.yml':
- 'actions/[email protected]'
- 'actions/[email protected]'
'.github/workflows/_test_sslib_main.yml':
- 'actions/[email protected]'
- 'actions/[email protected]'
'.github/workflows/cd.yml':
- 'actions/[email protected]'
- 'actions/[email protected]'
- 'actions/[email protected]'
- 'actions/[email protected]'
- 'actions/[email protected]'
- 'pypa/[email protected]'
'.github/workflows/ci.yml': []
'.github/workflows/codeql-analysis.yml':
- 'actions/[email protected]'
- 'github/[email protected]'
'.github/workflows/conformance.yml':
- 'actions/[email protected]'
- 'theupdateframework/[email protected]'
'.github/workflows/dependency-review.yml':
- 'actions/[email protected]'
- 'actions/[email protected]'
'.github/workflows/maintainer-permissions-reminder.yml':
- 'actions/[email protected]'
'.github/workflows/scorecards.yml':
- 'actions/[email protected]'
- 'github/[email protected]'
- 'ossf/[email protected]'
'.github/workflows/specification-version-check.yml':
- 'actions/[email protected]'
- 'actions/[email protected]'
dependencies:
'actions/[email protected]':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/[email protected]':
ref: 'v5.0.0'
commit: 'sha1-a1d282b36b6f3519aa1f3fc636f609c47dddb294'
owner_id: 44036562
repo_id: 476372928
'actions/[email protected]':
ref: 'v8.0.2'
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
owner_id: 44036562
repo_id: 192626254
'actions/[email protected]':
ref: 'v9.0.0'
commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3'
owner_id: 44036562
repo_id: 205262760
'actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97':
ref: 'v7.0.0'
commit: 'sha1-5fda3b95a4ea91299a34e894583c3862153e4b97'
owner_id: 44036562
repo_id: 192625525
'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
ref: 'v6.2.0'
commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
owner_id: 44036562
repo_id: 192625525
'actions/[email protected]':
ref: 'v7.1.0'
commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0'
owner_id: 44036562
repo_id: 192625525
'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a':
ref: 'v7.0.1'
commit: 'sha1-043fb46d1a93c77aae656e7c1c64a875d1fc6a0a'
owner_id: 44036562
repo_id: 192625955
'actions/[email protected]':
ref: 'v7.0.2'
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
owner_id: 44036562
repo_id: 192625955
'github/[email protected]':
ref: 'v4.39.3'
commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066'
owner_id: 9919
repo_id: 259445878
'ossf/[email protected]':
ref: 'v2.5.0'
commit: 'sha1-fa7117db83c52d787ae5a89f350999701505d78e'
owner_id: 67707773
repo_id: 421101922
'pypa/[email protected]':
ref: 'v1.14.3'
commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086'
owner_id: 647025
repo_id: 178055147
uses:
- 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
'theupdateframework/[email protected]':
ref: 'v2.5.0'
commit: 'sha1-1bc18916ee35f753b6eb8ee19dabb98449ca7326'
owner_id: 4633028
repo_id: 660499950
uses:
- 'actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97'
- 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a'
18 changes: 10 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ permissions: {}

jobs:
test:
permissions:
contents: read
uses: $/.github/workflows/_test.yml

build:
Expand All @@ -18,13 +20,13 @@ jobs:
needs: test
steps:
- name: Checkout release tag
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ github.event.workflow_run.head_branch }}

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
uses: actions/[email protected]
with:
python-version: '3.x'

Expand All @@ -37,7 +39,7 @@ jobs:
awk "/## $GITHUB_REF_NAME/{flag=1; next} /## v/{flag=0} flag" docs/CHANGELOG.md > changelog

- name: Store build artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
uses: actions/[email protected]
with:
name: build-artifacts
path: |
Expand All @@ -54,13 +56,13 @@ jobs:
release_id: ${{ steps.gh-release.outputs.result }}
steps:
- name: Fetch build artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
uses: actions/[email protected]
with:
name: build-artifacts

- id: gh-release
name: Publish GitHub release draft
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/[email protected]
with:
script: |
fs = require('fs')
Expand Down Expand Up @@ -96,17 +98,17 @@ jobs:
id-token: write # to authenticate as Trusted Publisher to pypi.org
steps:
- name: Fetch build artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
uses: actions/[email protected]
with:
name: build-artifacts

- name: Publish binary wheel and source tarball on PyPI
# Only attempt pypi upload in upstream repository
if: github.repository == 'theupdateframework/python-tuf'
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
uses: pypa/[email protected]

- name: Finalize GitHub release
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/[email protected]
with:
script: |
github.rest.repos.updateRelease({
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions: {}

jobs:
test:
permissions:
contents: read
uses: $/.github/workflows/_test.yml
test-with-sslib-main:
uses: $/.github/workflows/_test_sslib_main.yml
7 changes: 3 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ jobs:
name: Analyze
runs-on: ubuntu-latest
permissions:
# NOTE: If you add security critical permissions, start pinning used actions
actions: read
contents: read
security-events: write # for uploading to code-scanning dashboard

steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/[email protected] # zizmor: ignore[unpinned-uses]
uses: github/codeql-action/[email protected]
with:
languages: 'python'

- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected] # zizmor: ignore[unpinned-uses]
uses: github/codeql-action/[email protected]
4 changes: 2 additions & 2 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout conformance client
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: Run test suite
uses: theupdateframework/tuf-conformance@1bc18916ee35f753b6eb8ee19dabb98449ca7326 # v2.5.0
uses: theupdateframework/[email protected]
with:
entrypoint: ".github/scripts/conformance-client.py"
5 changes: 2 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ name: 'Dependency Review'
on: [pull_request]

permissions:
# NOTE: If you add security critical permissions, start pinning used actions
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false
- name: 'Dependency Review'
uses: actions/[email protected] # zizmor: ignore[unpinned-uses]
uses: actions/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/maintainer-permissions-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
permissions:
issues: write
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- uses: actions/[email protected]
with:
script: |
await github.rest.issues.create({
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ jobs:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# NOTE: If you add security critical permissions, start pinning used actions
security-events: write # for uploading to code-scanning dashboard
id-token: write # for publishing results in scorecard public dataset
actions: read
contents: read

steps:
- name: "Checkout code"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/[email protected]
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
uses: ossf/[email protected]
with:
results_file: results.sarif
# sarif format required by upload-sarif action
Expand All @@ -37,6 +36,6 @@ jobs:
publish_results: true

- name: "Upload to code-scanning dashboard"
uses: github/codeql-action/[email protected] # zizmor: ignore[unpinned-uses]
uses: github/codeql-action/[email protected]
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/specification-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/[email protected]
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- uses: actions/[email protected]
with:
python-version: "3.x"
- id: get-version
Expand Down
Loading