Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dependency audit

# Known advisories in the dependency tree (most of it is bundled into
# dist/cli.mjs, so users only get fixes through a new release). Starts as a
# report; flip continue-on-error off once the tree is clean.
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 9 * * 1'

permissions:
contents: read

jobs:
bun-audit:
name: bun-audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version-file: .bun-version
- name: Audit dependencies (high and critical)
continue-on-error: true
run: bun audit --audit-level=high
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
uses: useblacksmith/setup-docker-builder@e4c1c000c95f9cc255f72940e9c56bcbd1239436 # v1
with:
max-cache-size-mb: "20480"

- name: Build and load image
uses: useblacksmith/build-push-action@v2
uses: useblacksmith/build-push-action@9b0579bbec7a6cad2f171596c57e7ac1e7658850 # v2
with:
context: .
load: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
ref: ${{ needs.verify.outputs.tag }}

- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
uses: useblacksmith/setup-docker-builder@e4c1c000c95f9cc255f72940e9c56bcbd1239436 # v1
with:
max-cache-size-mb: "20480"

Expand All @@ -170,7 +170,7 @@ jobs:
type=raw,value=latest,enable=${{ !github.event.release.prerelease }}

- name: Build and load locally
uses: useblacksmith/build-push-action@v2
uses: useblacksmith/build-push-action@9b0579bbec7a6cad2f171596c57e7ac1e7658850 # v2
with:
context: .
load: true
Expand All @@ -182,7 +182,7 @@ jobs:
docker run --rm verboo:smoke --internal-protocol-self-test

- name: Build and push
uses: useblacksmith/build-push-action@v2
uses: useblacksmith/build-push-action@9b0579bbec7a6cad2f171596c57e7ac1e7658850 # v2
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"bin/verboo",
"bin/import-specifier.mjs",
"dist/cli.mjs",
"dist/vendor/ripgrep/**",
"scripts/postinstall.mjs",
"README.md"
],
Expand Down Expand Up @@ -94,7 +93,6 @@
"@modelcontextprotocol/sdk": "1.29.0",
"@orama/orama": "^3.1.18",
"@orama/plugin-data-persistence": "^3.1.18",
"@vscode/ripgrep": "^1.17.1",
"ajv": "8.18.0",
"auto-bind": "5.0.1",
"axios": "1.15.2",
Expand Down Expand Up @@ -161,7 +159,7 @@
"typescript": "5.9.3"
},
"optionalDependencies": {
"@vscode/ripgrep": "^1.15.14"
"@vscode/ripgrep": "^1.17.1"
},
"engines": {
"node": ">=22.0.0"
Expand Down
3 changes: 3 additions & 0 deletions scripts/check-cli-quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ function run(command: string[]) {
const terminalOnly = process.argv.includes('--terminal')
if (!terminalOnly) {
run([process.execPath, 'scripts/build.ts'])
// The bundle must not phone home to Anthropic services or download from its buckets.
run([process.execPath, 'scripts/verify-no-phone-home.ts'])
run([process.execPath, 'scripts/rebrand-check.ts'])
run([node, 'node_modules/typescript/bin/tsc', '--project', 'tsconfig.agent-contracts.json'])
run([process.execPath, 'scripts/run-tests-isolated.ts'])
run([node, 'dist/cli.mjs', '--version'])
Expand Down
15 changes: 15 additions & 0 deletions scripts/cli-quality-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,18 @@ test('the release package is exercised on Linux, macOS and Windows with both sup
expect(workflow.jobs.python).toBeDefined()
expect(workflow.jobs.web).toBeDefined()
})

test('every third-party action is pinned to a full commit SHA', () => {
const { readdirSync } = require('node:fs') as typeof import('node:fs')
const unpinned: string[] = []
for (const name of readdirSync('.github/workflows')) {
if (!/\.ya?ml$/.test(name)) continue
const text = readFileSync(`.github/workflows/${name}`, 'utf8')
for (const match of text.matchAll(/^\s*-?\s*uses:\s*([^\s#]+)/gm)) {
const ref = match[1]!
if (ref.startsWith('./')) continue
if (!/@[0-9a-f]{40}$/.test(ref)) unpinned.push(`${name}: ${ref}`)
}
}
expect(unpinned).toEqual([])
})
28 changes: 27 additions & 1 deletion scripts/rebrand-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ const COMMON_ALLOWLIST = [
const RULES: Rule[] = [
{
name: 'Verboo Code product literal',
pattern: /\b(Verboo Code|Open Claude|OPEN CLAUDE)\b/,
pattern: /\b(OpenClaude|Open Claude|OPEN CLAUDE)\b/,
allowlist: [
...COMMON_ALLOWLIST,
// ~/.openclaude/projects é lido (somente leitura) para o /resume:
'src/utils/envUtils.ts',
'src/utils/sessionStorage.ts',
// CLI brand fallback gated por VERBOO_CLI_BRAND=verboo (alias deprecated):
'src/main.tsx',
],
Expand Down Expand Up @@ -158,6 +161,10 @@ const RULES: Rule[] = [
'src/services/api/filesApi.ts',
// StartupScreen mostra base URL (corrigido em separado):
'src/components/StartupScreen.ts',
// Preset do vendor Anthropic (o usuário escolhe explicitamente):
'src/integrations/vendors/anthropic.ts',
// Chave de API da Anthropic do próprio usuário (/claude login):
'src/services/api/claudeNativeConfig.ts',
],
},
{
Expand All @@ -172,6 +179,25 @@ const RULES: Rule[] = [
// OAuth flow (deferred):
'src/constants/oauth.ts',
'src/main.tsx', // OAuth getOauthConfig contém refs upstream Anthropic
// A loja de plugins da Anthropic (sob demanda) é nomeada como tal:
'src/commands/lsp/lsp.ts',
// Nomes de provedor/vendor (Anthropic é o fornecedor, não a marca):
'src/commands/usage/index.ts',
'src/integrations/routeMetadata.ts',
'src/integrations/vendors/anthropic.ts',
// Comentário com aspas, não texto de UI:
'src/utils/effort.ts',
// Conexão com a chave de API da Anthropic do usuário (nomeia o provedor):
'src/commands/claude/',
'src/utils/claudeLoginRetiredNotice.ts',
'src/utils/claudeNativeCredentials.ts',
'src/services/api/claudeNativeModels.ts',
'src/services/api/claudeNativeUsage.ts',
'src/services/api/client.ts',
// Rótulos "via sua chave Anthropic" no /model e o aviso de saldo esgotado:
'src/commands/model/model.tsx',
'src/utils/model/modelOptions.ts',
'src/services/api/providerLimitErrors.ts',
// SDK error logger uses preserved upstream identifier strings:
'src/services/api/sdk.ts',
// Auth/account model functions reference "Anthropic" provider type:
Expand Down
50 changes: 0 additions & 50 deletions scripts/verify-no-phone-home.sh

This file was deleted.

16 changes: 16 additions & 0 deletions scripts/verify-no-phone-home.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { expect, test } from 'bun:test'

import { BANNED_PATTERNS, findBannedPatterns } from './verify-no-phone-home.js'

test('reports every banned pattern with its count', () => {
const contents = `fetch("https://http-intake.logs.datadoghq.com"); x = "datadoghq.com"; infra.ant.dev`
expect(findBannedPatterns(contents)).toEqual([
{ pattern: 'datadoghq.com', count: 2 },
{ pattern: 'infra.ant.dev', count: 1 },
])
})

test('a clean bundle passes', () => {
expect(findBannedPatterns('const router = "https://code.verboo.ai/router/v1"')).toEqual([])
expect(BANNED_PATTERNS.length).toBeGreaterThan(0)
})
59 changes: 34 additions & 25 deletions scripts/verify-no-phone-home.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { existsSync, readFileSync } from 'node:fs'

const DIST = 'dist/cli.mjs'
const BANNED_PATTERNS = [
// The SDK bundle ships too when present; both must stay free of these.
export const BUNDLES = ['dist/cli.mjs', 'dist/sdk.mjs'] as const

export const BANNED_PATTERNS = [
'datadoghq.com',
'api/event_logging/batch',
'api/claude_code/metrics',
Expand All @@ -15,33 +17,40 @@ const BANNED_PATTERNS = [
'C07VBSHV7EV',
] as const

if (!existsSync(DIST)) {
console.error(`ERROR: ${DIST} not found. Run 'bun run build' first.`)
process.exit(1)
export function findBannedPatterns(
contents: string,
patterns: readonly string[] = BANNED_PATTERNS,
): Array<{ pattern: string; count: number }> {
return patterns
.map(pattern => ({ pattern, count: contents.split(pattern).length - 1 }))
.filter(result => result.count > 0)
}

const contents = readFileSync(DIST, 'utf8')
let exitCode = 0

console.log(`Checking ${DIST} for banned patterns...`)
console.log('')

for (const pattern of BANNED_PATTERNS) {
const count = contents.split(pattern).length - 1
if (count > 0) {
console.log(` FAIL: '${pattern}' found (${count} occurrences)`)
exitCode = 1
} else {
console.log(` PASS: '${pattern}' not found`)
function main(): number {
if (!existsSync(BUNDLES[0])) {
console.error(`ERROR: ${BUNDLES[0]} not found. Run 'bun run build' first.`)
return 1
}
}

console.log('')
let exitCode = 0
for (const bundle of BUNDLES) {
if (!existsSync(bundle)) continue
const found = findBannedPatterns(readFileSync(bundle, 'utf8'))
console.log(`Checking ${bundle} for banned patterns...`)
for (const { pattern, count } of found) {
console.log(` FAIL: '${pattern}' found (${count} occurrences)`)
exitCode = 1
}
if (found.length === 0) console.log(` PASS: none of ${BANNED_PATTERNS.length} patterns found`)
}

if (exitCode === 0) {
console.log('✓ All checks passed — no banned patterns in build output')
} else {
console.log('✗ FAILED — banned patterns found in build output')
console.log('')
console.log(
exitCode === 0
? '✓ All checks passed — no banned patterns in build output'
: '✗ FAILED — banned patterns found in build output',
)
return exitCode
}

process.exit(exitCode)
if (import.meta.main) process.exit(main())
2 changes: 1 addition & 1 deletion src/components/ThemePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const DEMO_PATCH: StructuredPatchHunk = {
lines: [
' function greet() {',
'- console.log("Hello, World!");',
'+ console.log("Hello, OpenClaude!");',
'+ console.log("Hello, Verboo!");', // VERBOO-BRAND
' }',
],
}
Expand Down
Loading