Repository navigation
61 lines (54 loc) · 1.99 KB
/
Copy pathci.yml
File metadata and controls
61 lines (54 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- run: npm run build --workspaces --if-present
- run: npm test
catalog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# Catalog quality gate. audit-catalog.py walks every packages/*/*/server.json
# and fails (exit 1) on any HIGH finding: missing required fields, a name
# that isn't io.github.codespar/mcp-*, a version that disagrees with
# package.json, or a repository.url still on the legacy mcp-dev-brasil.
# This is what catches drift like a bumped package.json whose server.json
# was left stale, before it reaches the registry.
- name: Catalog audit (no HIGH findings)
run: npm run audit:catalog
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- name: npm audit
run: npm audit --omit=dev || true
- name: Scan for hardcoded secrets
run: |
echo "Scanning for hardcoded API keys..."
# Real Stripe live keys are sk_live_ followed by 20+ alphanumeric chars.
# Documentation placeholders like "sk_live_..." stop right after the
# underscore and must not trip the scan. The AWS pattern (AKIA + 16
# uppercase/digit chars) is already shape-specific enough on its own.
if grep -rnE "sk_live_[A-Za-z0-9]{20,}|AKIA[A-Z0-9]{16}" --include="*.ts" packages/ 2>/dev/null | grep -v node_modules | grep -v ".env"; then
echo "::error::Hardcoded secret found in source code"
exit 1
fi
echo "No hardcoded secrets found"