Skip to content

ci: restore osv-scanner configuration in policy workflow - #508

Closed
dangertoaster wants to merge 1 commit into
canonical:mainfrom
dangertoaster:work/bot/osv-constraint-pins
Closed

dangertoaster wants to merge 1 commit into
canonical:mainfrom
dangertoaster:work/bot/osv-constraint-pins

Conversation

@dangertoaster

Copy link
Copy Markdown
Contributor

🤖 This message was generated by kimi-k3.

Problem

The python-scans job in .github/workflows/policy.yaml lost its permissions block and its entire with: configuration, so the OSV-scanner runs with OSV_EXCLUDE_PATHS empty. It then scans docs/requirements.txt, and because the docs groups are also absent from uv-export-no-groups, resolves the unpinned specifiers (e.g. sphinx-autobuild) at their minimum satisfying versions — flagging vulnerabilities in anyio 4.9.0, h11 0.9.0, and idna 3.9.0, none of which are ever actually installed (the uv.lock already contains fixed versions of all three).

This currently fails the Security scan / OSV-scanner check on unrelated PRs (e.g. #505, #506).

Fix

Restore the missing permissions and with: blocks, excluding docs from the OSV scan and the docs dependency groups from the uv export — matching how snapcraft and charmcraft configure the same reusable canonical/starflow/scan-python.yaml workflow. The docs requirements are development-only tooling, not shipped artifacts.

Validation

Provenance

Discovered while validating preparation PRs for the Starbase sync (#507), where the starbase-provided policy.yaml includes this configuration by default. The exact exclusion set (docs only, no tests/spread) matches this repository's structure — craft-cli has no spread tests.

The python-scans job lost its permissions block and its entire 'with'
configuration (osv-exclude-paths, uv-export-no-groups), so OSV-scanner
runs without the docs exclusions. The scanner then resolves the unpinned
specifiers in docs/requirements.txt at their minimum versions and
reports vulnerabilities (anyio, h11, idna) in versions that are never
actually installed.

Restore the docs exclusions, matching how snapcraft and charmcraft
configure the same reusable workflow.
@dangertoaster

Copy link
Copy Markdown
Contributor Author

🤖 [BEEP BOOP, A BOT WROTE THIS COMMENT - kimi-k3, opencode]

Closing as unnecessary — the starbase merge PR (#507) already restores the complete python-scans configuration in policy.yaml (including the with: block) and adds the osv-scanner.toml config file, so the OSV-scanner failures only affect PRs branched from plain main until the merge lands. No separate fix needed.

@dangertoaster
dangertoaster deleted the work/bot/osv-constraint-pins branch October 16, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant