Add OSV-scanner PR gate + Dependabot remediation SLA, fix stale frontend lockfile - #671
Merged
Topmatrixmor2014 merged 3 commits intoAug 21, 2026
Conversation
added 2 commits
August 17, 2026 21:48
- @finchippay/sdk was declared as a dependency ("*") but had no
corresponding entry in package-lock.json at all, so npm ci silently
skipped it and OSV-scanner/Dependabot could not resolve it against
the GHSA/OSV database. Point it at file:../sdk (its real monorepo
path) so it resolves and is captured in the lockfile.
- postcss was pinned via package.json#overrides (8.5.26) while the
direct devDependency stayed at ^8. npm forbids overriding a direct
dependency this way (EOVERRIDE), which meant npm ci was already
broken on the default branch. Align the direct devDependency to
8.5.26 to match the override and unblock installs.
- Regenerated package-lock.json (lockfileVersion 3) from the corrected
package.json so the lockfile fully matches declared dependencies.
- .github/workflows/osv-scanner.yml (new, 88 lines): pinned OSV-Scanner v2.5.0 binary scans every real npm/pnpm/Cargo lockfile in the repo (package-lock.json, frontend/package-lock.json, backend/package-lock.json, backend/pnpm-lock.yaml, Cargo.lock) on every PR and push to main. Fails the build when any vulnerability group's max CVSS score is >=7.0 (High/Critical); results are uploaded as a build artifact for full detail. - .github/dependabot.yml (new, 77 lines): weekly update PRs for npm (root, frontend, backend, sdk), cargo, and github-actions, grouped by minor/patch within each ecosystem to reduce PR noise. - docs/vulnerability-management.md (new, 84 lines): documents the detection layers, remediation SLA (Critical 7d / High 14d / Medium 30d / Low best-effort, mirroring SECURITY.md's response targets), and the triage workflow for dependency alerts.
🤖 Greptile AI Code ReviewGreptile will automatically review this PR (5 file(s) changed). Review gates:
|
Contributor
|
Please fix this failing CI |
… severity gate Real CI run (PR FinChippay#671) surfaced two things: 1. The severity gate in osv-scanner.yml was checking a JSON field (.groups[].max_severity) that does not exist in the OSV schema - severity lives under .vulnerabilities[].severity[].score as a raw CVSS vector string, which jq cannot parse into a number. Replaced it with osv-scanner's own pre-computed summary line ("X Critical, Y High, ..."), verified against all four real scan outputs from this PR (2 High / 8 High / 0 High-1 Unknown / clean). 2. Real High/Critical findings, triaged per docs/vulnerability-management.md: - backend/pnpm-lock.yaml: 8 High findings (brace-expansion, fast-uri, js-yaml, all transitive) - fixed via pnpm.overrides in backend/package.json pinning each to its patched release. - package-lock.json + frontend/package-lock.json: 2 High findings for image-size@2.0.2 (transitive devDependency of vite-plugin-storybook-nextjs only, never runs against production input; upstream archived, no fix available) - documented and suppressed via osv-scanner.toml IgnoredVulns, expiring 2026-11-15 for re-review, rather than adopting an unverified third-party fork. - Cargo.lock: 1 Unknown-severity finding, below the gate threshold, no action needed to unblock this PR.
Author
|
i have fixed the ci work flow. |
4 tasks
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.
Summary
close #646
No PR-time dependency vulnerability gate exists today —
security-audit.yml(npm audit / cargo audit) andsbom-scan.yml(Grype) both only run on a weeklyschedule. Meanwhilefrontend/package-lock.jsonhad drifted fromfrontend/package.jsonbadly enough thatnpm ciwas already broken onmain(see commit 1). This PR:.github/dependabot.ymlwith grouped PRs per ecosystem and a documented remediation SLA.docs/vulnerability-management.md.Commit 1 —
fix(frontend): resolve stale package-lock.json driftFiles changed:
frontend/package.json(+2/-2 lines),frontend/package-lock.json(regenerated, 4245 insertions / 4085 deletions)Two concrete bugs, not just staleness:
frontend/package.jsonline 24:"@finchippay/sdk": "*"had no matching entry anywhere inpackage-lock.json— npm was silently not locking it at all, so OSV-Scanner/Dependabot couldn't see it against the advisory database. Changed to"@finchippay/sdk": "file:../sdk"(its real path in this monorepo) so it resolves and appears in the lockfile.frontend/package.jsonline 83:"postcss": "^8"as a direct devDependency, whilepackage.json#overridesseparately pinnedpostcssto8.5.26. npm forbids overriding a direct dependency this way (EOVERRIDE) — this was already breakingnpm cionmain, verified locally:npm error Override for postcss@^8 conflicts with direct dependency. Fixed by pinning the direct dependency to8.5.26to match the override's intent.frontend/package-lock.jsonregenerated in full from the correctedpackage.json(lockfileVersion 3, 1204 resolved packages).Verified: confirmed
npm cifails on the original files with the exactEOVERRIDEerror above; confirmed the regenerated lockfile installs cleanly for the@finchippay/sdkandpostcssentries specifically. Backend'sbackend/pnpm-lock.yamlwas checked too —pnpm install --frozen-lockfilepasses clean, no drift there, no changes needed.Known follow-up (not fixed here, out of scope): regenerating the lockfile surfaced a real peer-dependency conflict —
next@^16.3.0vs.@storybook/experimental-nextjs-vite@8.6.18's peer range (^14.1.0 || ^15.0.0). This doesn't block the OSV-Scanner gate (it reads the lockfile directly, no install needed), but a plainnpm ciinfrontend/needs--legacy-peer-depsuntil Storybook's Next.js addon is upgraded or Next is pinned back — this is a version-compatibility decision outside this issue's scope, tracked indocs/vulnerability-management.mdand should be filed as a separate follow-up issue.Cargo.lockwas not regenerated — nocargo/rustuptoolchain was available to verify it in this environment, and the issue only calls outfrontend/package-lock.jsonfor drift resolution. It's included in the new OSV-Scanner job's scan list regardless.Commit 2 —
ci(security): add OSV-Scanner PR gate and Dependabot config.github/workflows/osv-scanner.yml(new, 88 lines)pull_request(→main),push(→main), andworkflow_dispatch— this is the new PR-time gate; every other security workflow in the repo (security-audit.yml,sbom-scan.yml) only runs on a weeklyschedule.v2.5.0(a tagged release, notlatest) via the official binary download URL.package-lock.json,frontend/package-lock.json,backend/package-lock.json,backend/pnpm-lock.yaml,Cargo.lock— covering npm, pnpm, and Cargo against the OSV/GHSA database, the same source Dependabot uses.exit 1) if any vulnerability group'smax_severity(CVSS base score) is>= 7.0(High or Critical). Findings below that threshold are logged but don't fail the build, matching the acceptance criteria ("fails on high/critical").osv-scan-results) so low/medium findings and full advisory detail are still reviewable..github/dependabot.yml(new, 77 lines)npmecosystem entries for/(root workspace),/frontend,/backend(covers bothpackage-lock.jsonandpnpm-lock.yaml), and/sdk.cargoecosystem entry for/(workspace root, matchesCargo.toml).github-actionsecosystem entry for/(keeps the CI supply chain itself patched).groups:block bundling minor/patch updates into a single PR per ecosystem/directory to cut review noise; major bumps for the root workspace are excluded from auto-updates and left for manual review.dependencies+ ecosystem +securityfor easy triage/filtering.docs/vulnerability-management.md(new, 84 lines)npm audit/cargo audit/Grype workflows.SECURITY.md:Acceptance criteria checklist
.github/workflows/osv-scanner.yml, runs on every PR)dependabot.ymldefines grouped PRs and a documented SLA (grouping in the config itself; SLA table indocs/vulnerability-management.md, referenced from the config's header comment)frontend/package-lock.jsonnow matchesfrontend/package.json(verified: no moreEOVERRIDE,@finchippay/sdknow resolves)docs/vulnerability-management.md)