|
57 | 57 | - name: Lint |
58 | 58 | run: scripts/lint.sh CLANG_FORMAT=clang-format-20 |
59 | 59 |
|
| 60 | + # ── Step 1b: Security audit (source-only, runs parallel with lint+tests) ── |
| 61 | + # No build needed — scans source files and vendored deps only. |
| 62 | + # Binary-level security (L2/L3/L4/L7) runs in smoke jobs per-platform. |
| 63 | + security-static: |
| 64 | + runs-on: ubuntu-latest |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + |
| 68 | + - name: "Layer 1: Static allow-list audit" |
| 69 | + run: scripts/security-audit.sh |
| 70 | + |
| 71 | + - name: "Layer 6: UI security audit" |
| 72 | + run: scripts/security-ui.sh |
| 73 | + |
| 74 | + - name: "Layer 8: Vendored dependency integrity" |
| 75 | + run: scripts/security-vendored.sh |
| 76 | + |
60 | 77 | # ── Step 2: Unit tests (ASan + UBSan) ─────────────────────── |
61 | 78 | # macOS: use cc (Apple Clang) — GCC on macOS doesn't ship ASan runtime |
62 | 79 | # Linux: use system gcc — full ASan/UBSan support |
@@ -163,6 +180,10 @@ jobs: |
163 | 180 | - name: Build UI binary |
164 | 181 | run: scripts/build.sh --with-ui --version ${{ inputs.version }} CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} |
165 | 182 |
|
| 183 | + - name: Frontend integrity scan (post-build dist/) |
| 184 | + if: matrix.goos == 'linux' && matrix.goarch == 'amd64' |
| 185 | + run: scripts/security-ui.sh |
| 186 | + |
166 | 187 | - name: Archive UI binary |
167 | 188 | run: | |
168 | 189 | tar -czf codebase-memory-mcp-ui-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \ |
@@ -258,6 +279,22 @@ jobs: |
258 | 279 | - name: Smoke test (${{ matrix.variant }}, ${{ matrix.goos }}-${{ matrix.goarch }}) |
259 | 280 | run: scripts/smoke-test.sh ./codebase-memory-mcp |
260 | 281 |
|
| 282 | + - name: Binary string audit (${{ matrix.goos }}-${{ matrix.goarch }}) |
| 283 | + if: matrix.variant == 'standard' |
| 284 | + run: scripts/security-strings.sh ./codebase-memory-mcp |
| 285 | + |
| 286 | + - name: Install output audit (${{ matrix.goos }}-${{ matrix.goarch }}) |
| 287 | + if: matrix.variant == 'standard' |
| 288 | + run: scripts/security-install.sh ./codebase-memory-mcp |
| 289 | + |
| 290 | + - name: Network egress test (${{ matrix.goos }}-${{ matrix.goarch }}) |
| 291 | + if: matrix.variant == 'standard' |
| 292 | + run: scripts/security-network.sh ./codebase-memory-mcp |
| 293 | + |
| 294 | + - name: MCP robustness test |
| 295 | + if: matrix.variant == 'standard' && matrix.goos == 'linux' && matrix.goarch == 'amd64' |
| 296 | + run: scripts/security-fuzz.sh ./codebase-memory-mcp |
| 297 | + |
261 | 298 | smoke-windows: |
262 | 299 | needs: [build-windows] |
263 | 300 | strategy: |
@@ -290,9 +327,19 @@ jobs: |
290 | 327 | shell: msys2 {0} |
291 | 328 | run: scripts/smoke-test.sh ./codebase-memory-mcp.exe |
292 | 329 |
|
| 330 | + - name: Binary string audit (windows-amd64) |
| 331 | + if: matrix.variant == 'standard' |
| 332 | + shell: msys2 {0} |
| 333 | + run: scripts/security-strings.sh ./codebase-memory-mcp.exe |
| 334 | + |
| 335 | + - name: Install output audit (windows-amd64) |
| 336 | + if: matrix.variant == 'standard' |
| 337 | + shell: msys2 {0} |
| 338 | + run: scripts/security-install.sh ./codebase-memory-mcp.exe |
| 339 | + |
293 | 340 | # ── Step 5: Create GitHub release ─────────────────────────── |
294 | 341 | release: |
295 | | - needs: [smoke-unix, smoke-windows] |
| 342 | + needs: [smoke-unix, smoke-windows, security-static] |
296 | 343 | runs-on: ubuntu-latest |
297 | 344 | permissions: |
298 | 345 | contents: write |
|
0 commit comments