From f29a49ac088cfa63183f750765bfb4a28ef14c14 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 20:09:32 -0700 Subject: [PATCH 1/8] Add Scorecard supply-chain security workflow This workflow analyzes the supply chain security of the repository using Scorecard. It includes steps for checking out the code, running the analysis, and uploading results. Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- .github/workflows/scorecard.yml | 78 +++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..aa0e5de --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,78 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '34 23 * * 6' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. + if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore + # file_mode: git + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard (optional). + # Commenting out will disable upload of results to your repo's Code Scanning dashboard + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif From f446f392fba067bab9c07fd7db1427101b13671d Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 20:44:26 -0700 Subject: [PATCH 2/8] Add OpenSSF Scorecard badge to README Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 52441b3..be3974d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Test Coverage](https://openleadr.org/coverage/badge.svg)](https://openleadr.org/coverage) ![PyPI Downloads](https://img.shields.io/pypi/dm/openleadr?color=lightblue&label=PyPI%20Downloads) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4317/badge)](https://bestpractices.coreinfrastructure.org/projects/4317) + [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/OpenLEADR/openleadr-python/badge)](https://scorecard.dev/viewer/?uri=github.com/OpenLEADR/openleadr-python) ![OpenLEADR](https://openleadr.org/images/lf-logo.png) From 56f1e194404e83d8e3c874929a5b418c249b8a29 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 20:47:28 -0700 Subject: [PATCH 3/8] Change Python version format in test suite workflow Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- .github/workflows/test-suite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 814b68d..90a2d6a 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.7", "3.8", "3.9"] steps: - uses: actions/checkout@v2 From 8cd7a4f5d8af73119e623fa53b45dff7f6164054 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 20:53:52 -0700 Subject: [PATCH 4/8] Update Python versions and GitHub actions versions Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- .github/workflows/test-suite.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 90a2d6a..6149663 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -15,14 +15,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip From a4f82c789d1d3a1b4c4b55ab28c983ec199b36f4 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 21:03:39 -0700 Subject: [PATCH 5/8] Update pip install command for cryptography package Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- .github/workflows/test-suite.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 6149663..b4616ad 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -27,6 +27,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install 'cryptography<40' pip install . pip install flake8 pytest if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; fi From 03bb586cfb1af02aa0f944982e3175f8aa852052 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 21:19:55 -0700 Subject: [PATCH 6/8] Add cryptography dependency to dev requirements Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- dev_requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev_requirements.txt b/dev_requirements.txt index 9ccadbf..38dd10a 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,5 +1,6 @@ termcolor pytest pytest-asyncio +cryptography<40 sphinx -sphinxcontrib-apidoc \ No newline at end of file +sphinxcontrib-apidoc From 13c9c7f0a6f405b856fc5f6fa2cc626eb2268831 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Sun, 2 Aug 2026 21:20:54 -0700 Subject: [PATCH 7/8] Update Python version and dependencies in setup.py Updated Python version requirement and added cryptography dependency. Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e084d9f..fc7c1c5 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ project_urls={'GitHub': 'https://github.com/openleadr/openleadr-python', 'Documentation': 'https://openleadr.org/docs'}, packages=['openleadr', 'openleadr.service'], - python_requires='>=3.7.0', + python_requires='>=3.8.0', include_package_data=True, - install_requires=['xmltodict==0.13.0', 'aiohttp>=3.8.3,<4.0.0', 'apscheduler>=3.10.0,<4.0.0', 'jinja2>=3.1.2,<4.0.0', 'signxml==3.2.1'], + install_requires=['xmltodict==0.13.0', 'aiohttp>=3.8.3,<4.0.0', 'apscheduler>=3.10.0,<4.0.0', 'jinja2>=3.1.2,<4.0.0','cryptography<40', 'signxml==3.2.1'], entry_points={'console_scripts': ['fingerprint = openleadr.fingerprint:show_fingerprint']}) From 9f11b197edab6b1c410b77abc92e5f3c502039d0 Mon Sep 17 00:00:00 2001 From: AXM Software <35903292+axmsoftware@users.noreply.github.com> Date: Mon, 3 Aug 2026 05:17:36 -0700 Subject: [PATCH 8/8] Modify test suite to use newer Python versions Updated Python versions and actions in the test suite workflow. Signed-off-by: AXM Software <35903292+axmsoftware@users.noreply.github.com> --- .github/workflows/test-suite.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index b4616ad..d6028f3 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -15,28 +15,27 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] - + python-version: ['3.9', '3.10', '3.11', '3.12'] + env: + UV_PYTHON_DOWNLOADS: never steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - + - name: Install UV + uses: astral-sh/setup-uv@v6 - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install 'cryptography<40' - pip install . - pip install flake8 pytest - if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; fi + uv venv --python ${{ matrix.python-version }} + uv sync --python ${{ matrix.python-version }} --group dev - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 openleadr/ --count --select=E9,F63,F7,F82 --show-source --statistics + uv run flake8 openleadr/ --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 openleadr/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + uv run flake8 openleadr/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest -vv test/ + uv run pytest -vv test/