Skip to content

Commit 15126f0

Browse files
teknium1nickdlkk
authored andcommitted
chore(security): add OSV-Scanner CI + Dependabot for github-actions only (NousResearch#20037)
Adds two supply-chain controls that complement our existing pinning strategy (full-SHA action pins, exact-version source dep pins via uv.lock / package-lock.json) without undermining it. .github/workflows/osv-scanner.yml Detection-only scan of uv.lock and the ui-tui/website package-locks against the OSV vulnerability database. Runs on PRs that touch lockfiles, on push to main, and weekly against main so CVEs published after merge still surface. Uses Google's officially- recommended reusable workflow pinned by full SHA (v2.3.5). Findings upload to the Security tab; fail-on-vuln is disabled so pre-existing vulns in pinned deps do not block merges — we move pins deliberately, not under CI pressure. .github/dependabot.yml Scoped to github-actions only. Action pins must be moved when upstream publishes patches (often themselves security fixes); Dependabot opens a PR with the new SHA + release notes for normal review. Source-dependency ecosystems (pip, npm) are deliberately NOT enabled — automatic version-bump PRs against uv.lock / package-lock.json would fight our pinning strategy. CVE-driven security updates for source deps are enabled separately via the repo's Dependabot security updates setting (GitHub UI), which fires only when a pinned version becomes known-vulnerable.
1 parent fab81c7 commit 15126f0

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Dependabot configuration for hermes-agent.
2+
#
3+
# Deliberately scoped to github-actions only.
4+
#
5+
# We do NOT enable Dependabot for pip / npm / any source-dependency ecosystem
6+
# because we pin source dependencies exactly (uv.lock, package-lock.json) as
7+
# part of our supply-chain posture. Automatic version-bump PRs against those
8+
# pins would undermine the strategy — pins are moved deliberately, after
9+
# review, not on a schedule.
10+
#
11+
# github-actions is the exception: action pins (we use full commit SHAs per
12+
# supply-chain policy) must be updated when upstream actions publish
13+
# patches — usually themselves security fixes. Dependabot opens a PR with
14+
# the new SHA and release notes; we review and merge like any other PR.
15+
#
16+
# Security-update PRs for source dependencies (opened ONLY when a CVE is
17+
# published affecting a currently-pinned version) are enabled separately
18+
# via the repo's Dependabot security updates setting
19+
# (Settings → Code security → Dependabot → Dependabot security updates).
20+
# Those are CVE-only, not schedule-driven, and do not conflict with our
21+
# pinning strategy — they fire when a pinned version becomes known-bad,
22+
# which is exactly when we want to move the pin.
23+
24+
version: 2
25+
updates:
26+
- package-ecosystem: "github-actions"
27+
directory: "/"
28+
schedule:
29+
interval: "weekly"
30+
day: "monday"
31+
open-pull-requests-limit: 5
32+
labels:
33+
- "dependencies"
34+
- "github-actions"
35+
commit-message:
36+
prefix: "chore(actions)"
37+
include: "scope"
38+
groups:
39+
# Batch routine action bumps into one PR per week to reduce noise.
40+
# Security updates still open individually and bypass grouping.
41+
actions-minor-patch:
42+
update-types:
43+
- "minor"
44+
- "patch"

.github/workflows/osv-scanner.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: OSV-Scanner
2+
3+
# Scans lockfiles (uv.lock, package-lock.json) against the OSV vulnerability
4+
# database. Runs on every PR that touches a lockfile and on a weekly schedule
5+
# against main.
6+
#
7+
# This is detection-only — OSV-Scanner does NOT open PRs or modify pins.
8+
# It reports known CVEs in currently-pinned dependency versions so we can
9+
# decide when and how to patch on our own schedule. Our pinning strategy
10+
# (full SHA / exact version) is preserved; only the notification signal
11+
# is added.
12+
#
13+
# Complements the existing supply-chain-audit.yml workflow (which scans
14+
# for malicious code patterns in PR diffs) by covering the orthogonal
15+
# "currently-pinned dep became known-vulnerable" case.
16+
#
17+
# Uses Google's officially-recommended reusable workflow, pinned by SHA.
18+
# Findings land in the repo's Security tab (Code Scanning > OSV-Scanner).
19+
# fail-on-vuln is disabled so the job does not block merges on pre-existing
20+
# vulnerabilities in pinned deps that we may need to patch deliberately.
21+
22+
on:
23+
pull_request:
24+
branches: [main]
25+
paths:
26+
- 'uv.lock'
27+
- 'pyproject.toml'
28+
- 'package.json'
29+
- 'package-lock.json'
30+
- 'ui-tui/package.json'
31+
- 'ui-tui/package-lock.json'
32+
- 'website/package.json'
33+
- 'website/package-lock.json'
34+
- '.github/workflows/osv-scanner.yml'
35+
push:
36+
branches: [main]
37+
paths:
38+
- 'uv.lock'
39+
- 'pyproject.toml'
40+
- 'package.json'
41+
- 'package-lock.json'
42+
- 'ui-tui/package-lock.json'
43+
- 'website/package-lock.json'
44+
schedule:
45+
# Weekly scan against main — catches CVEs published after merge for
46+
# deps that haven't changed since.
47+
- cron: '0 9 * * 1'
48+
workflow_dispatch:
49+
50+
permissions:
51+
# Required by the reusable workflow to upload SARIF to the Security tab.
52+
actions: read
53+
contents: read
54+
security-events: write
55+
56+
jobs:
57+
scan:
58+
name: Scan lockfiles
59+
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@c51854704019a247608d928f370c98740469d4b5 # v2.3.5
60+
with:
61+
# Scan explicit lockfiles rather than recursing, so we only look at
62+
# the three sources of truth and skip vendored / test / worktree dirs.
63+
scan-args: |-
64+
--lockfile=uv.lock
65+
--lockfile=ui-tui/package-lock.json
66+
--lockfile=website/package-lock.json
67+
fail-on-vuln: false

0 commit comments

Comments
 (0)