Repository navigation
ci: run the shared publish gates before the PyPI upload - #70
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
publish.yml now calls the shared
publish-gates.ymlfrom NaNIsaac/.github, pinned to commit e2bfb9b4aa7820e8efe43afddf2d2308c6069ae3 (the first withleak-allow), before the PyPI upload. The upload stays in thepypijob with thereleaseenvironment, so the PyPI Trusted Publisher registration is unchanged; themcpjob still followspypi.gatesjob, on Python 3.15 as before: build the sdist and wheel once; run the CI test steps (sudo apt-get install -y -qq zsh && uv run --with pytest pytest -q); scan the built files for credential file names, files over 5 MB, home-folder paths and secrets; install the wheel alone in a clean venv, importcodigest, compare the installed version with the tag and runcodigest --help. The publish job had no tag check before; the install check is that now.pypijob: needsgates, runs only on av*tag, and uploads the files the gates checked (artifactpublish-gates-dist) instead of building again.workflow_dispatchruns the gates alone.pypiis skipped there, andmcpwith it.One
leak-allowentry:codigest/core/redact.py: private-key: 2. gitleaks reports the redaction module's PEM private-key pattern and mask templates asprivate-key; they hold no key material. The 4 lines it excuses, 2 per copy:codigest-0.14.1.tar.gz/codigest-0.14.1/src/codigest/core/redact.py:54codigest-0.14.1.tar.gz/codigest-0.14.1/src/codigest/core/redact.py:59codigest-0.14.1-py3-none-any.whl/codigest/core/redact.py:54codigest-0.14.1-py3-none-any.whl/codigest/core/redact.py:59The path is
codigest/core/redact.py, notsrc/...: the wheel has nosrc/folder, and the suffix match covers both copies. A third private-key hit in that file, or one fewer, fails the gates.GitHub only offers
workflow_dispatchfor a workflow file on the default branch, so the gates-only run can be started once this is on main:gh workflow run publish.yml -R NaNIsaac/codigest.local-ci: e011613 | the pinned gates' leak step on a local 0.14.1 build with this entry: 4 allowed lines, no other findings, exit 0; the wheel installed alone in a Python 3.15 venv imports as 0.14.1 and
codigest --helpexits 0 | the test suite not run locally (the PR's Tests workflow runs it), the workflow itself not run (dispatch needs the file on main)Part of: PUBLISH-GATES-ROLLOUT