Skip to content

Commit 17ad362

Browse files
Merge pull request #70 from andreibesleaga/fix/ci-security-advisory-floors
sec(deps): clear all HIGH advisories via override floors; fix OSV SARIF gate
2 parents 9e5952f + a424aaa commit 17ad362

11 files changed

Lines changed: 268 additions & 133 deletions

File tree

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ OPENAI_API_KEY=your_openai_api_key_here
6767
# MISTRAL_API_KEY=
6868
# GROQ_API_KEY=
6969

70+
# Opt out of KaibanJS anonymous telemetry (any non-empty value = opt out).
71+
# ⚠ Set to 1 on networks that block nom.telemetrydeck.com at DNS level — the
72+
# blocked telemetry fetch otherwise crashes the agent process with an unhandled
73+
# rejection inside kaibanjs before the first task completes.
74+
# KAIBAN_TELEMETRY_OPT_OUT=1
75+
7076
# ── Security: mTLS (optional) ──────────────────────────────────
7177
# Paths to TLS certificates for Redis/Kafka mTLS connections
7278
# Generate self-signed certs: ./scripts/generate-dev-certs.sh

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ jobs:
107107
--format=sarif
108108
--output=osv.sarif
109109
- name: Upload OSV SARIF
110-
if: always()
110+
# `always()` so the SARIF still uploads even when the OSV-Scanner step
111+
# itself errors after writing the file (it runs continue-on-error). The
112+
# `hashFiles` guard covers the other path: when an earlier gate (e.g. the
113+
# audit) fails, OSV-Scanner is skipped and osv.sarif never exists — an
114+
# unguarded upload then adds a bogus second failure ("Path does not
115+
# exist: osv.sarif") that masks the real one.
116+
if: always() && hashFiles('osv.sarif') != ''
111117
uses: github/codeql-action/upload-sarif@v4
112118
with:
113119
sarif_file: osv.sarif

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v6
2121
with:
2222
persist-credentials: false
23-
- uses: ossf/scorecard-action@v2.4.3
23+
- uses: ossf/scorecard-action@v2.4.4
2424
with:
2525
results_file: results.sarif
2626
results_format: sarif

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
### Security
10+
- Raised the transitive `overrides` security floors to clear every open HIGH advisory
11+
in the locked tree: `brace-expansion` >=5.0.8 (GHSA-3jxr-9vmj-r5cp,
12+
GHSA-mh99-v99m-4gvg), `fast-uri` >=4.1.1 (GHSA-v2hh-gcrm-f6hx,
13+
GHSA-4c8g-83qw-93j6), `js-yaml` >=4.3.0 <5 (GHSA-52cp-r559-cp3m) and `postcss`
14+
>=8.5.25 (GHSA-r28c-9q8g-f849). Also cleared the remaining moderates:
15+
`hono` >=4.12.32, `protobufjs` >=8.6.6, and `@modelcontextprotocol/sdk` 1.30.0 with
16+
`@hono/node-server` 2.0.12 (GHSA-frvp-7c67-39w9). `npm audit` now reports
17+
**0 vulnerabilities** at the root and in `board/`, and the Trivy image gate passes
18+
with no fixable CRITICAL/HIGH.
19+
20+
### Changed
21+
- `ossf/scorecard-action` 2.4.3 → 2.4.4.
22+
23+
### Fixed
24+
- CI: the `Upload OSV SARIF` step no longer fails with "Path does not exist:
25+
osv.sarif" when an earlier gate fails — it is now guarded on the file existing,
26+
so a failing audit reports one real error instead of two.
27+
928
## [2.0.0] - in progress (`feat/v2.0`)
1029

1130
Major release — breaking changes are documented in `MIGRATION.md`. Authoritative plan:

SECURITY.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,32 @@ provenance and a Sigstore (cosign keyless) signature.
3838
Several transitive advisories reach the tree via `@langchain/*` (used by
3939
`kaibanjs`) and the OpenTelemetry/gRPC stack. `package.json` `overrides` pin
4040
patched versions: `@langchain/core`, `@langchain/community`, `langchain`,
41-
`langsmith`, `axios`, `protobufjs`, `@grpc/grpc-js`, `ws`, `hono`, `fast-uri`,
42-
`fast-xml-parser`, `qs`, `uuid`, `ip-address`, `expr-eval`, `file-type`, `glob`,
43-
`@opentelemetry/exporter-prometheus`, `form-data` (>=4.0.6), `vite` (>=8.0.16).
44-
45-
### Residual advisories (moderate only)
46-
47-
`npm audit` reports **0 high/critical** (CI fails the build on HIGH+). A number of
48-
**moderate** advisories remain — these fluctuate as the npm advisory database is
49-
updated against existing dependency versions, and are predominantly **dev/build
50-
tooling and transitive** packages (e.g. `brace-expansion`, `postcss`, and various
51-
test/build transitives) that **do not ship in the deployed worker/gateway image or
52-
the published `dist/src` library**. They are tracked and cleared as upstream fixes
53-
land; CI intentionally does not block on moderates.
41+
`langsmith`, `axios`, `protobufjs` (>=8.6.6), `@grpc/grpc-js`, `ws`, `hono`
42+
(>=4.12.32), `fast-uri` (>=4.1.1), `fast-xml-parser`, `qs`, `uuid`, `ip-address`,
43+
`expr-eval`, `file-type`, `glob`, `brace-expansion` (>=5.0.8), `js-yaml`
44+
(>=4.3.0 <5), `postcss` (>=8.5.25), `@opentelemetry/exporter-prometheus`,
45+
`form-data` (>=4.0.6), `vite` (>=8.0.16).
46+
47+
An override is a **security floor, not a version bump** — each one is the lowest
48+
patched release for the advisory, so the pinned tree stays semver-compatible with
49+
what the dependents declare. `js-yaml` is deliberately capped below `5` because
50+
`@langchain/classic` targets the 4.x API.
51+
52+
### Residual advisories
53+
54+
`npm audit` currently reports **0 vulnerabilities** (0 critical / 0 high /
55+
0 moderate / 0 low) for both the root package and `board/`. CI fails the build on
56+
HIGH+ and intentionally does not block on moderates, since moderate findings
57+
fluctuate as the npm advisory database is updated against existing dependency
58+
versions and are predominantly **dev/build tooling and transitive** packages that
59+
**do not ship in the deployed worker/gateway image or the published `dist/src`
60+
library**. Any that reappear are tracked and cleared as upstream fixes land.
61+
62+
Note that the Trivy image scan reads `/app/package-lock.json` inside the runtime
63+
image, so it reports **dev-only** locked packages too even though the runner stage
64+
installs with `npm ci --omit=dev`. A dev-tooling HIGH therefore still fails the
65+
image gate, and the fix is to raise the floor in the lockfile rather than to
66+
exclude the finding.
5467

5568
## Sensitive-data handling (operator responsibility)
5669

examples/blog-team/docker-compose.kafka.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ services:
131131
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
132132
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
133133
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
134+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
135+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
136+
# crashes the agent process (unhandled rejection inside kaibanjs).
137+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
134138
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
135139
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
136140
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -167,6 +171,10 @@ services:
167171
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
168172
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
169173
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
174+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
175+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
176+
# crashes the agent process (unhandled rejection inside kaibanjs).
177+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
170178
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
171179
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
172180
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -202,6 +210,10 @@ services:
202210
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
203211
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
204212
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
213+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
214+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
215+
# crashes the agent process (unhandled rejection inside kaibanjs).
216+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
205217
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
206218
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
207219
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}

examples/blog-team/docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ services:
6868
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
6969
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
7070
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
71+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
72+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
73+
# crashes the agent process (unhandled rejection inside kaibanjs).
74+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
7175
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
7276
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
7377
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -98,6 +102,10 @@ services:
98102
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
99103
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
100104
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
105+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
106+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
107+
# crashes the agent process (unhandled rejection inside kaibanjs).
108+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
101109
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
102110
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
103111
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -127,6 +135,10 @@ services:
127135
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
128136
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
129137
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
138+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
139+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
140+
# crashes the agent process (unhandled rejection inside kaibanjs).
141+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
130142
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
131143
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
132144
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}

examples/global-research/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ services:
4444
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
4545
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
4646
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
47+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
48+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
49+
# crashes the agent process (unhandled rejection inside kaibanjs).
50+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
4751
restart: on-failure
4852
healthcheck:
4953
test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/health']
@@ -70,6 +74,10 @@ services:
7074
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
7175
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
7276
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
77+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
78+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
79+
# crashes the agent process (unhandled rejection inside kaibanjs).
80+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
7381
CHAOS_MODE: ${CHAOS_MODE:-false}
7482
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
7583
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
@@ -101,6 +109,10 @@ services:
101109
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
102110
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
103111
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
112+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
113+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
114+
# crashes the agent process (unhandled rejection inside kaibanjs).
115+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
104116
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
105117
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
106118
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -130,6 +142,10 @@ services:
130142
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
131143
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
132144
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
145+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
146+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
147+
# crashes the agent process (unhandled rejection inside kaibanjs).
148+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
133149
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
134150
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
135151
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}
@@ -159,6 +175,10 @@ services:
159175
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
160176
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}
161177
LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini}
178+
# Opt out of KaibanJS anonymous telemetry (default: on). Set to 1 on networks
179+
# that block nom.telemetrydeck.com at DNS level — the blocked fetch otherwise
180+
# crashes the agent process (unhandled rejection inside kaibanjs).
181+
KAIBAN_TELEMETRY_OPT_OUT: ${KAIBAN_TELEMETRY_OPT_OUT:-}
162182
SEMANTIC_FIREWALL_ENABLED: ${SEMANTIC_FIREWALL_ENABLED:-false}
163183
CIRCUIT_BREAKER_ENABLED: ${CIRCUIT_BREAKER_ENABLED:-false}
164184
JIT_TOKENS_ENABLED: ${JIT_TOKENS_ENABLED:-false}

package-lock.json

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,20 @@
7676
"@langchain/community": ">=0.3.59",
7777
"langchain": ">=0.3.37",
7878
"axios": ">=1.16.1",
79-
"protobufjs": ">=7.5.8",
79+
"protobufjs": ">=8.6.6",
8080
"@grpc/grpc-js": ">=1.14.4",
81-
"fast-uri": ">=3.1.2",
81+
"fast-uri": ">=4.1.1",
8282
"fast-xml-parser": ">=5.7.0",
83-
"hono": ">=4.12.23",
83+
"hono": ">=4.12.32",
84+
"brace-expansion": ">=5.0.8",
85+
"js-yaml": ">=4.3.0 <5",
8486
"ws": ">=8.21.0",
8587
"qs": ">=6.15.2",
8688
"uuid": ">=11.1.1",
8789
"ip-address": ">=10.2.0",
8890
"glob": ">=10.5.0",
8991
"@opentelemetry/exporter-prometheus": ">=0.217.0",
90-
"postcss": ">=8.4.31",
92+
"postcss": ">=8.5.25",
9193
"madge": {
9294
"typescript": "$typescript"
9395
}

0 commit comments

Comments
 (0)