feat: resolve PyPI packages through Cisco Artifactory for supply-chain safety#744
Open
feat: resolve PyPI packages through Cisco Artifactory for supply-chain safety#744
Conversation
danischm
approved these changes
Apr 8, 2026
Collaborator
Author
|
@aitestino , please also review, I agreed with @danischm that we would trial this approach with nac-test to gather experience before discussing with the wider team. Local development will now require authentication for uv sync operations (see README) |
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.
Description
Route all PyPI dependency resolution through Cisco's Artifactory instance (
artifactory.devhub-cloud.cisco.com) to protect against supply-chain attacks. Fork PRs automatically fall back topypi.orgsince GitHub does not expose repository secrets to forks.Closes
Related Issue(s)
Type of Change
Test Framework Affected
Network as Code (NaC) Architecture Affected
Platform Tested
Key Changes
[[tool.uv.index]]withdefault = truepointing to Cisco Artifactory, replacing PyPI as the default package index for project-scoped uv commands (sync, lock, run).UV_DEFAULT_INDEXenv var withname=urlsyntax souv tool install(bandit, mypy) also routes through Artifactory with proper credential pairing. Added per-job "Configure package index" fallback steps that override back to pypi.org when credentials are empty (fork PRs).actions/checkoutandastral-sh/setup-uvto commit SHAs.Testing Done
Test Commands Used
Checklist
Screenshots (if applicable)
N/A
Additional Notes
uv tool installdoes not readtool.uv.indexfrom pyproject.toml -- it only respectsUV_DEFAULT_INDEX. Thename=urlsyntax (cisco-artifactory-devhub=https://...) is required so uv can pair the index with theUV_INDEX_CISCO_ARTIFACTORY_DEVHUB_*credential env vars.exclude-newer = "3 days"was evaluated but deferred -- Cisco Artifactory does not provide PEP 700upload-timemetadata, causing uv to emit warnings for every package. Can revisit once Artifactory adds support.