Skip to content

Commit 2f9680b

Browse files
omartounsi7emilejbm
authored andcommitted
offline mode added to TrustedMetadataSet
Signed-off-by: Emile Baez <ebaezmunne@gmail.com> fixed error Signed-off-by: Emile Baez <ebaezmunne@gmail.com> nglclient updater refresh method checks for offline mode reformat of Jussi's lazy refresh closed PR. Addition of checking for offline flag passed in from client. Will try to load from local metadata if either is set. If offline is set and local metadata is expired or not available, ExpiredMetadataError will be raised. Tests added for offline being set with and without valid local metadata. (needs review). Signed-off-by: Emile Baez <ebaezmunne@gmail.com> refresh method fix. 164 tests pass, 3 warnings Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3 Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@e38b190...80e868c) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump pylint from 2.17.1 to 2.17.2 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.1 to 2.17.2. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](pylint-dev/pylint@v2.17.1...v2.17.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump pypa/gh-action-pypi-publish from 1.8.3 to 1.8.5 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.3 to 1.8.5. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@48b317d...0bf742b) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump mypy from 1.1.1 to 1.2.0 Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/python/mypy/releases) - [Commits](python/mypy@v1.1.1...v1.2.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump coverage from 7.2.2 to 7.2.3 Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.2 to 7.2.3. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.2.2...7.2.3) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump github/codeql-action from 2.2.9 to 2.2.11 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.9 to 2.2.11. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@04df126...d186a2a) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump actions/github-script from 6.4.0 to 6.4.1 Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@98814c5...d7906e4) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> Removed lazy refresh config Signed-off-by: Emerson Rounds <65183924+emboman13@users.noreply.github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> Removed lazy refresh configuration option Signed-off-by: Emerson Rounds <65183924+emboman13@users.noreply.github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> Removed lazy refresh tests and updated offline tests Signed-off-by: Emerson Rounds <65183924+emboman13@users.noreply.github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump cryptography from 40.0.1 to 40.0.2 Bumps [cryptography](https://github.com/pyca/cryptography) from 40.0.1 to 40.0.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@40.0.1...40.0.2) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump actions/checkout from 3.5.0 to 3.5.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@8f4b7f8...8e5e7e5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump github/codeql-action from 2.2.11 to 2.2.12 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.11 to 2.2.12. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@d186a2a...7df0ce3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> disabled expiry checks in offline mode. updated testing Signed-off-by: Emile Baez <ebaezmunne@gmail.com> NetworkUnavailableError exception added More descriptive exception added for offline mode error case. Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump securesystemslib[crypto,pynacl] from 0.27.0 to 0.28.0 Bumps [securesystemslib[crypto,pynacl]](https://github.com/secure-systems-lab/securesystemslib) from 0.27.0 to 0.28.0. - [Release notes](https://github.com/secure-systems-lab/securesystemslib/releases) - [Changelog](https://github.com/secure-systems-lab/securesystemslib/blob/main/CHANGELOG.md) - [Commits](secure-systems-lab/securesystemslib@v0.27.0...v0.28.0) --- updated-dependencies: - dependency-name: securesystemslib[crypto,pynacl] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump actions/setup-python from 4.5.0 to 4.6.0 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@d27e3f3...57ded4d) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump github/codeql-action from 2.2.12 to 2.3.0 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.12 to 2.3.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@7df0ce3...b2c19fb) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump pylint from 2.17.2 to 2.17.3 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.17.2 to 2.17.3. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](pylint-dev/pylint@v2.17.2...v2.17.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> Removed vestigial code from updater Signed-off-by: Emerson Rounds <65183924+emboman13@users.noreply.github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> Removed unused error Signed-off-by: Emerson Rounds <65183924+emboman13@users.noreply.github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump coverage from 7.2.3 to 7.2.4 Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.3 to 7.2.4. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.2.3...7.2.4) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump github/codeql-action from 2.3.0 to 2.3.2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.0 to 2.3.2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@b2c19fb...f3feb00) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump requests from 2.28.2 to 2.29.0 Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.29.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.28.2...v2.29.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> build(deps): bump coverage from 7.2.4 to 7.2.5 Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.4 to 7.2.5. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](coveragepy/coveragepy@7.2.4...7.2.5) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emile Baez <ebaezmunne@gmail.com> offline mode added to TrustedMetadataSet creation of TrustedMetadataSet object can take additional argument that describes whether client wants to be in offline mode. Code linted according to tox -e lint. Signed-off-by: Emile Baez <ebaezmunne@gmail.com>
1 parent 6a0a12b commit 2f9680b

File tree

14 files changed

+134
-34
lines changed

14 files changed

+134
-34
lines changed

.github/workflows/_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: Checkout TUF
15-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
15+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
1616

1717
- name: Set up Python 3.x
18-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
18+
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
1919
with:
2020
python-version: 3.x
2121
cache: 'pip'
@@ -56,10 +56,10 @@ jobs:
5656

5757
steps:
5858
- name: Checkout TUF
59-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
59+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
6060

6161
- name: Set up Python ${{ matrix.python-version }}
62-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
62+
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
6363
with:
6464
python-version: ${{ matrix.python-version }}
6565
cache: 'pip'
@@ -101,7 +101,7 @@ jobs:
101101
run: touch requirements.txt
102102

103103
- name: Set up Python
104-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
104+
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
105105
with:
106106
python-version: '3.x'
107107
cache: 'pip'

.github/workflows/cd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
needs: test
1919
steps:
2020
- name: Checkout release tag
21-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
21+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
2222
with:
2323
ref: ${{ github.event.workflow_run.head_branch }}
2424

2525
- name: Set up Python
26-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
26+
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
2727
with:
2828
python-version: '3.x'
2929

@@ -59,7 +59,7 @@ jobs:
5959

6060
- id: gh-release
6161
name: Publish GitHub release draft
62-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
62+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
6363
with:
6464
script: |
6565
fs = require('fs')
@@ -102,13 +102,13 @@ jobs:
102102
- name: Publish binary wheel and source tarball on PyPI
103103
# Only attempt pypi upload in upstream repository
104104
if: github.repository == 'theupdateframework/python-tuf'
105-
uses: pypa/gh-action-pypi-publish@48b317d84d5f59668bb13be49d1697e36b3ad009
105+
uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d
106106
with:
107107
user: __token__
108108
password: ${{ secrets.PYPI_API_TOKEN }}
109109

110110
- name: Finalize GitHub release
111-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
111+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
112112
with:
113113
script: |
114114
github.rest.repos.updateRelease({

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
25+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
2626

2727
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@04df1262e6247151b5ac09cd2c303ac36ad3f62b
28+
uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a
2929
with:
3030
languages: 'python'
3131

3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@04df1262e6247151b5ac09cd2c303ac36ad3f62b
33+
uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: 'Checkout Repository'
18-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
18+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
1919
- name: 'Dependency Review'
2020
uses: actions/dependency-review-action@f46c48ed6d4f1227fb2d9ea62bf6bcbed315589e

.github/workflows/maintainer-permissions-reminder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: File issue to review maintainer permissions
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
16+
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
1717
with:
1818
script: |
1919
await github.rest.issues.create({

.github/workflows/scorecards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
steps:
2323
- name: "Checkout code"
24-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
24+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
2525

2626
- name: "Run analysis"
27-
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86
27+
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af
2828
with:
2929
results_file: results.sarif
3030
# sarif format required by upload-sarif action
@@ -34,6 +34,6 @@ jobs:
3434
publish_results: true
3535

3636
- name: "Upload to code-scanning dashboard"
37-
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b
37+
uses: github/codeql-action/upload-sarif@f3feb00acb00f31a6f60280e6ace9ca31d91c76a
3838
with:
3939
sarif_file: results.sarif

.github/workflows/specification-version-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
outputs:
1515
version: ${{ steps.get-version.outputs.version }}
1616
steps:
17-
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
18-
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
17+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
18+
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
1919
with:
2020
python-version: "3.x"
2121
- id: get-version

requirements/lint.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# are pinned to prevent unexpected linting failures when tools update)
99
black==23.3.0
1010
isort==5.12.0
11-
pylint==2.17.1
12-
mypy==1.1.1
11+
pylint==2.17.3
12+
mypy==1.2.0
1313
bandit==1.7.5
1414
pydocstyle==6.3.0

requirements/pinned.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
certifi==2022.12.7 # via requests
22
cffi==1.15.1 # via cryptography, pynacl
33
charset-normalizer==3.1.0 # via requests
4-
cryptography==40.0.1 # via securesystemslib
4+
cryptography==40.0.2 # via securesystemslib
55
idna==3.4 # via requests
66
pycparser==2.21 # via cffi
77
pynacl==1.5.0 # via securesystemslib
8-
requests==2.28.2
9-
securesystemslib[crypto,pynacl]==0.27.0
8+
requests==2.29.0
9+
securesystemslib[crypto,pynacl]==0.28.0
1010
urllib3==1.26.15 # via requests

requirements/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
-r pinned.txt
55

66
# coverage measurement
7-
coverage==7.2.2
7+
coverage==7.2.5

0 commit comments

Comments
 (0)