Repository navigation
Add scheduled OSV-Scanner workflow for existing dependency vulnerabilities #2017
Description
Summary
GStack has dependency lockfiles (bun.lock, lib/diagram-render/bun.lock) and a growing Actions surface, but no scheduled OSV-Scanner workflow. That means newly disclosed vulnerabilities in the existing dependency graph are not surfaced on a recurring cadence unless they happen to be touched by a PR or found manually.
This is separate from the focused PR-time Dependency Review request in #1987. Dependency Review catches vulnerable dependency changes in pull requests. A scheduled OSV-Scanner run catches vulnerabilities disclosed after dependencies are already on main.
Repo-local evidence
origin/maintracks dependency lockfiles:bun.locklib/diagram-render/bun.lock
origin/main:package.jsonincludes runtime dependencies such as@ngrok/ngrok,diff,playwright, andpuppeteer-core, plus@anthropic-ai/sdkas a dev dependency.- The repo has multiple CI workflows under
.github/workflows/, including evals, image publishing, Windows gates, and document gates. - Repo grep found no OSV scheduled scan wiring:
git grep -n -E 'osv-scanner|OSV-Scanner|google/osv|vulnerability scan|dependency-review|semgrep|scorecard|attest-build-provenance|attestation' origin/main -- .github package.json bun.lock lib/diagram-render/bun.lock README.md CONTRIBUTING.md docs- Only unrelated
docs/designs/v2_PLAN.mdtext matchedscorecard; no OSV workflow or vulnerability scan exists.
- Existing adjacent issues cover different layers:
- Add Dependency Review Action to block vulnerable dependency changes #1987 covers PR-time GitHub Dependency Review.
- Add OpenSSF Scorecard workflow for recurring OSS security posture #1997 covers OpenSSF Scorecard posture reporting.
- Add artifact attestations for GHCR CI images #2003 covers GHCR image artifact attestations.
- CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948 covers mutable action tags and provider-key exposure.
None of those add a scheduled full dependency vulnerability scan.
External baseline
The official google/osv-scanner-action README says the action supports two modes:
- Pull-request scanning that reports newly introduced vulnerabilities.
- Full vulnerability scanning that can run on pushes, releases, or a regular schedule, with results reported to GitHub Code Scanning.
That second mode is the missing baseline here.
Expected impact
- Surfaces vulnerabilities disclosed after a dependency is already merged, not just vulnerabilities introduced by new PRs.
- Gives maintainers a recurring Code Scanning signal for the current dependency graph.
- Complements Add Dependency Review Action to block vulnerable dependency changes #1987 instead of duplicating it: PR-time blocking plus scheduled main-branch monitoring cover different failure modes.
Suggested fix
Add a focused workflow such as .github/workflows/osv-scanner.yml:
- Trigger on
scheduleandworkflow_dispatch. - Use least-privilege permissions:
contents: readsecurity-events: writeif uploading SARIF to Code Scanning.
- Run
google/osv-scanner-actionpinned to a full commit SHA, not a mutable tag, to stay aligned with CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948 / ci: pin actions to SHA in 8 broken workflows #2009. - Start non-blocking if needed, but upload SARIF or an artifact so maintainers can inspect findings.
- Include both lockfile surfaces: root
bun.lockandlib/diagram-render/bun.lock.
Duplicate check performed
- Inspected 200 open issues:
gh issue list --repo garrytan/gstack --state open --limit 200 --json number,title,body,labels,url,updatedAt
- Inspected 200 open PRs:
gh pr list --repo garrytan/gstack --state open --limit 200 --json number,title,body,labels,url,updatedAt,headRefName,baseRefName,isDraft
- Searched the inspected issue/PR title+body set for:
osv scheduledscheduled vulnerabilityvulnerability scanfull vulnerability scanosv-scanner actiongoogle/osv-scanner-actioncode scanning vulnerability
- Ran targeted GitHub searches:
"scheduled vulnerability" repo:garrytan/gstack"vulnerability scan" repo:garrytan/gstack"full vulnerability scan" repo:garrytan/gstack"osv-scanner action" repo:garrytan/gstack"google/osv-scanner-action" repo:garrytan/gstack
- No exact covering issue or PR found. Adjacent non-duplicates: CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948, Add Dependency Review Action to block vulnerable dependency changes #1987, Add OpenSSF Scorecard workflow for recurring OSS security posture #1997, Add artifact attestations for GHCR CI images #2003, and PR ci: pin actions to SHA in 8 broken workflows #2009.
Commands/files inspected
README.mdCONTRIBUTING.mddocs/ADDING_A_HOST.mddocs/OPENCLAW.mddocs/skills.md.github/workflows/skill-docs.yml.github/workflows/evals.yml.github/workflows/evals-periodic.yml.github/workflows/ci-image.yml.github/workflows/actionlint.ymlpackage.jsongit fetch origin main --prunegit ls-tree -r --name-only origin/main .githubgit ls-tree -r --name-only origin/main | egrep '(^|/)(bun.lock|package-lock.json|pnpm-lock.yaml|yarn.lock|deno.lock|go.sum|Cargo.lock)$'git grep -n -E 'osv-scanner|OSV-Scanner|google/osv|vulnerability scan|dependency-review|semgrep|scorecard|attest-build-provenance|attestation' origin/main -- .github package.json bun.lock lib/diagram-render/bun.lock README.md CONTRIBUTING.md docsgh repo view google/osv-scanner-action --json nameWithOwner,url,descriptiongh api repos/google/osv-scanner-action/readme --jq .download_url | xargs curl -fsSL- Recent merged PRs inspected by title/files: v1.58.1.0 feat: hermetic local E2E + Conductor prose AskUserQuestion #2004, v1.58.0.0 feat: diagram + multi-format document engine (mermaid, excalidraw, single-file HTML, DOCX) #1990, v1.57.10.0 feat: Codex review default-on across review/ship/plan/docs #1966, v1.57.9.0 feat: source-clean gbrain render (dev-setup --out-dir + machine-wide gbrain-refresh) #1951, v1.57.8.0 feat: browse js/eval --out render-to-file (canonical Chromium for offline rendering) #1929, v1.57.7.0 feat: GSTACK REVIEW REPORT always declares unresolved decisions #1916, v1.57.4.0 refactor(ethos): rename Boil the Lake principle to Boil the Ocean #1912, v1.57.6.0 fix wave: 8 community bugs (4 security guards failing open) #1911, v1.57.5.0 feat: cross-session decision memory + gbrain dream-stage call graph #1910, v1.57.3.0 fix(ship): always-loaded PR-title-version rule + fork-PR title-sync backstop #1909, v1.57.2.0 feat: AskUserQuestion prose fallback when the tool fails at runtime #1908, v1.57.0.0 feat: carve-guard system + carve cso/document-release/design-consultation #1907
Activity
optimization2026 commentedon Jun 30, 2026
I think this fits well as a scheduled security workflow, but it should have a clear contract.
A scheduled OSV scanner should define:
A standard AISP-style contract could look like:
[ { "role": "system", "content": { "protocol": "AISP V1.0.0", "axiom_0": "Human_Sovereignty_and_Wellbeing", "id": "gstack_scheduled_osv_scan_aisp", "name": "gstack Scheduled OSV Scan Workflow", "version": "1.0.0", "license": "MIT", "summary": "Machine-checkable contract for scheduled OSV dependency vulnerability scans.", "flow_format": "mermaid", "loading_mode": "node", "tools": ["filesystem", "shell", "github"], "params": { "repo_root": "string", "schedule": "string" }, "system_prompt": "" } }, { "role": "user", "content": { "instruction": "STRICTLY OBEY aisp_contract; its non_negotiable rules are inviolable; then RUN aisop.main", "user_input": "{user_input}", "aisp_contract": { "profile": "aisp.skill.v1", "invocation": { "mode": "scheduled_security_workflow", "when_to_use": [ "on scheduled dependency security scan", "before release gate", "when dependency manifests change" ], "when_not_to_use": [ "non-security dependency update with no scan requested" ] }, "non_negotiable": [ { "rule": "Do not create duplicate alerts for the same OSV finding.", "enforced_by": "dedupe.step2:sys.assert" }, { "rule": "Critical findings must be surfaced with affected package, version, advisory, and remediation path.", "enforced_by": "report.step2:sys.assert" }, { "rule": "Scheduled scanner must record scan timestamp and dependency manifest hash.", "enforced_by": "trace.step2:sys.assert" } ], "discovery": { "category": "security_workflow", "tags": ["gstack", "osv", "dependencies", "security", "scheduled", "aisp"] }, "risk_level": "high", "resources": [ { "id": "repo", "path": "{repo_root}", "kind": "repository", "mode": "read_only", "when": "Read during dependency scan.", "scope": "skill" } ] }, "aisop": { "main": "graph TD\n inventory[Build dependency inventory] --> scan[Run OSV scan]\n scan --> classify[Classify findings]\n classify --> dedupe[Deduplicate existing alerts]\n dedupe --> report[Report or update issue]\n report --> trace[Record scan trace]\n trace --> end_node((End))" }, "functions": { "inventory": { "step1": "Find dependency manifests and compute manifest hashes.", "output_mapping": "dependency_inventory" }, "scan": { "step1": "Run OSV scanner against dependency_inventory.", "output_mapping": "osv_findings" }, "classify": { "step1": "Classify findings by severity, exploitability, affected package, and fix availability.", "output_mapping": "classified_findings" }, "dedupe": { "step1": "Compare classified_findings against existing reports/issues.", "step2": "sys.assert('duplicate findings are not re-reported', 'OSV scan must deduplicate repeated findings')", "output_mapping": "deduped_findings" }, "report": { "step1": "Create or update report with affected package, version, advisory, severity, and remediation.", "step2": "sys.assert('critical findings include remediation path', 'Critical OSV findings require remediation guidance')", "output_mapping": "security_report" }, "trace": { "step1": "Record scan timestamp, manifest hashes, scanner version, finding count, and report destination.", "step2": "sys.assert('scan trace includes timestamp and manifest hash', 'Scheduled scan must be traceable')", "output_mapping": "osv_scan_trace" }, "end_node": { "step1": "Return security_report and osv_scan_trace." } } } } ]This keeps the workflow useful without alert spam.
The key invariant:
capy-ai commentedon Oct 2, 2026
Verified on main (v1.91.13.0):
.github/workflows/osv-scanner.ymlruns OSV-Scanner on a weekly schedule (cron: '23 7 * * 1') using the pinned reusable workflow, with an ignore ledger for justified exceptions. Added in v1.65.0.0 (#2577). Thanks for the suggestion! Reply here if you'd like something more from it and we'll reopen.