Repository navigation
ci: dependency review and Renovate config validation - #302
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 5 selected item(s). Review details
|
|
|
||
| name: dependency-review | ||
|
|
||
| # Fails a PR that adds or moves a dependency to a version with a known |
There was a problem hiding this comment.
Must-fix: this header is a block of about 13 # lines. check_comment_blocks.py fails any new block over two lines (AGENTS.md), and it also tells backstory instead of the constraint. Reduce it to two lines, for example: path-filtered, so keep it out of the required checks; it judges only the PR's dependency change (pip-audit.yml audits the locks). Put the rest in the PR description.
There was a problem hiding this comment.
Fixed in 9792e16: two lines (judges only the PR's dependency change; path-filtered, keep out of required checks). The rest is in the PR description.
| dependency-review: | ||
| name: Dependency review | ||
| # A short job: ubuntu-latest, as for the other short jobs (see ci.yml). | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Nit: no timeout-minutes, while the other workflows set one (for example agent-quality.yml and conda-forge.yml: 15). A hung job would run for 6 hours. Add timeout-minutes: 10. The same applies to renovate-validation.yml.
Suggestion:
| runs-on: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 |
There was a problem hiding this comment.
Fixed in 9792e16: timeout-minutes: 10 on both new jobs.
| - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 | ||
| with: | ||
| fail-on-severity: high | ||
| # The thirteen filelock advisories SECURITY.md documents, which no |
There was a problem hiding this comment.
There was a problem hiding this comment.
Fixed in 9792e16: two lines, pointing at tests/test_advisory_lists.py, which fails if the four lists drift.
| # without resolving or installing anything. Each --ignore-vuln is | ||
| # an advisory SECURITY.md documents and dokimi/osv-scanner.toml ignores; | ||
| # add or drop them together, in all three. | ||
| # add or drop them together, in all four (dependency-review.yml too). |
There was a problem hiding this comment.
Must-fix: this edits a 9-line comment block (lines 51-59). scripts/check_comment_blocks.py fails any block over two lines once the PR changes one of its lines, and .yml is in its SUFFIXES. Shorten the block to the reason, for example: # Each --ignore-vuln is documented in SECURITY.md; keep it in sync with osv-scanner.toml and dependency-review.yml., and move the sed/awk detail next to the step.
There was a problem hiding this comment.
Fixed in 9792e16 by reverting pip-audit.yml to main: the sync is now enforced by test_dependency_review_allows_the_same_ghsa_ids rather than the comment, so the block is left untouched.
|
|
||
| name: renovate-validation | ||
|
|
||
| # Validates .github/renovate.json5 with Renovate's own config validator. A |
There was a problem hiding this comment.
There was a problem hiding this comment.
Fixed in 9792e16: shortened to your suggested two lines.
dependency-review.yml fails a PR that adds or moves a dependency to a version with a High or Critical advisory, allowing the thirteen filelock advisories SECURITY.md documents (kept in sync by test_advisory_lists.py). renovate-validation.yml runs Renovate's config validator in strict mode, with its version pinned and bumped by a Renovate custom manager. Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
aa6786b to
9792e16
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
=======================================
Coverage 93.50% 93.51%
=======================================
Files 273 273
Lines 35569 35569
Branches 6040 6040
=======================================
+ Hits 33260 33262 +2
+ Misses 1492 1491 -1
+ Partials 817 816 -1 🚀 New features to boost your workflow:
|
antonwolfy
left a comment
There was a problem hiding this comment.
LGTM. Both workflows are scoped correctly and the new test pins the fourth advisory list. No findings.
What I ran, on a Linux review host at 9792e16:
make ci-local: 29 passed, 0 failed, 7 skipped (job conditions, no docker/semgrep). Changed-line coverage passed.- zizmor on both new workflows: no findings.
check_comment_blocks.pyagainst the base: no block over two lines.- Mutations of
allow-ghsas(drop, add, alter or re-case an ID, empty value, key removed): the new test fails on each. Reordering and extra whitespace pass, as they should.
Checked, no issues
- Path filter:
dokimi/requirements*.txtmatches all seven requirements files, locks included;pyproject.tomland the workflow and action directories are listed. - Renovate manager: the
matchStringspattern returns['44.198.0']onvalidator_version: '44.198.0', and the file pattern matches the workflow path. - ID sets: the 13 IDs in
allow-ghsasequal the 13 GHSA IDs inosv-scanner.toml. - Docs: the SECURITY.md wording matches
fail-on-severity: highand the four lists.
Summary
Two small CI gates dokimi lacks, taken from the CI survey of oneDAL, scikit-learn-intelex, abicheck and enterprise-agent-toolkit:
renovate.json5Renovate cannot parse fails nowhere visible — the bot just stops opening update PRs.Changes
.github/workflows/dependency-review.yml:actions/dependency-review-actionon PRs touching the locks, requirements files,pyproject.tomlor workflows; fails on a High/Critical advisory the PR introduces; job summary only (no PR comment, so a fork PR's read-only token is enough).allow-ghsascarries the 13 filelock advisories SECURITY.md documents (no lock can fix them while litellm requiresfilelock<4.0), so a PR moving filelock within<4.0is not failed. Same IDs aspip-audit.ymlandosv-scanner.toml;tests/test_advisory_lists.pynow checks this fourth list too, and SECURITY.md / the pip-audit comment say "all four"..github/workflows/renovate-validation.yml:renovate-config-validator --stricton.github/renovate.json5, validator pinned to 44.198.0; a new custom regex manager inrenovate.json5bumps that pin.Considered and dropped (measured on
main): codespell — all hits are deliberate identifiers/test inputs (isntall,udpate,mian,Provence…), as the pre-commit config already notes; ruff-format — would reformat 509 files and conflict with every open PR.Risk
Both jobs are path-filtered, so they must stay out of the required checks (a required check that never starts holds a PR forever); the workflow comment says so. dependency-review judges GitHub's dependency graph, which lists all eight manifests (
requirements*.txt, the three locks,pyproject.toml).Testing
renovate-config-validator@44.198.0 --strict .github/renovate.json5: validated.['44.198.0'].pytest tests/test_advisory_lists.py: 7 passed; dropping one ID fromallow-ghsasmakes the new test fail.Revert
Plain revert; nothing persisted.
Checklist
pytestpassesruff,mypy, and schema checks passAGENTS.md.github/.licenserc.yaml)🤖 Generated with Claude Code