ci: restore osv-scanner configuration in policy workflow
Metadata
Current evaluation
Merged PR #508 to restore OSV-scanner configuration in `.github/workflows/policy.yaml`, excluding `docs` from scans to prevent false positive vulnerability reports.
Resolution: closed resolved
Reason: The PR was merged, updating `.github/workflows/policy.yaml` to include the missing `permissions` and `with:` blocks, specifically setting `osv-exclude-paths` to `docs`.
Evaluated by: mr-cal-bot
No scores available.
Issue body
🤖 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](https://github.com/canonical/snapcraft/blob/main/.github/workflows/policy.yaml) and [charmcraft](https://github.com/canonical/charmcraft/blob/main/.github/workflows/policy.yaml) configure the same reusable `canonical/starflow/scan-python.yaml` workflow. The docs requirements are development-only tooling, not shipped artifacts.
## Validation
- Snapcraft's most recent "Security scan" run with this configuration passes and its log shows `OSV_EXCLUDE_PATHS: docs` taking effect (`--experimental-exclude docs`).
- craft-cli CI logs from #505/#506 show the same job with `OSV_EXCLUDE_PATHS:` empty — this PR restores exactly that input.
## 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.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR #508 to restore OSV-scanner configuration in `.github/workflows/policy.yaml`, excluding `docs` from scans to prevent false positive vulnerability reports. |
Update history
| Date | Change |
|---|---|
| closed | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1130 ci: fix OSV-scanner workflow path and exclude docs-only inputs | craft-application | merged | Merged PR #1130 as commit 235a5cc0, correcting the OSV config path and excluding docs paths and docs-only dependency groups from security scans. | |
| #988 ci: fix OSV scanner policy workflow | craft-providers | merged | Merged as e6a3482: updated OSV scanner inputs and config, excluded docs paths/groups, and added osv-scanner.toml. All CI checks passed. | |
| #1640 ci: align policy OSV scanner inputs | craft-parts | merged | PR #1640 merged as commit 159bad0d, aligning .github/workflows/policy.yaml OSV inputs with starbase #573: added osv-extra-args/exclude-paths, uv-export-no-groups, removed requirements-find-args, added root osv-scanner.toml. | |
| #1299 ci: fix osv scanner on docs | rockcraft | merged | Merged PR #1299 via commit c0191bb5, configuring OSV Scanner to ignore documentation-derived content and fix docs security scanning. | |
| #5487 ci: remove config for osv scanner | snapcraft | merged | Merged PR #5487 as commit 866694712, removing four lines of resolved, expired OSV scanner configuration from CI. | |
| #654 ci: exclude docs from security scan | fetch-service | closed | Merged as commit 03ce591: adds `osv-exclude-paths: "docs/"` to .github/workflows/security-scan.yaml so the starflow OSV-scanner job stops failing on docs/requirements.txt (idna via canonical-sphinx). | |
| #1639 ci: align policy OSV scanner inputs | craft-parts | closed | PR #1639 (align policy OSV scanner inputs) was closed unmerged as superseded by #1640, which merged as commit 159bad0d applying the same OSV workflow inputs and root osv-scanner.toml config. |