Repository navigation
feat(admin): mobile shell with a nav drawer, header and scrolling content (#226) #328
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Audit | |
| # Publishes the objective, third-party signals that back AUDIT.md/audit/claims.yaml | |
| # (OpenSSF Scorecard + SBOM), and re-runs the deterministic half of claims.yaml as a | |
| # CI gate so a claim silently going false (a new Postgres/MySQL/Redis dependency, a | |
| # real vulnerability, a leaked secret) fails the build instead of quietly rotting. | |
| # This is separate from ci.yml (build/test) — audit signal, not correctness. | |
| on: | |
| push: | |
| branches: [main] | |
| # Also on pull requests. Without this the Go stdlib CVE that broke the | |
| # clean-security-scan claim sat undetected until it was already on main, | |
| # because this workflow only ran on push, weekly, and manually. The scan is | |
| # cheap and catches that class before merge instead of after. | |
| pull_request: | |
| schedule: | |
| - cron: '20 6 * * 1' # weekly, Monday — catches newly-disclosed CVEs even with no code changes | |
| workflow_dispatch: | |
| permissions: read-all | |
| jobs: | |
| scorecard: | |
| name: OpenSSF Scorecard | |
| # Scorecard refuses any ref but the default branch ("Only the default branch | |
| # main is supported"), so running it on a PR or a workflow_dispatch against a | |
| # feature branch produced a red run that meant nothing and buried the real | |
| # result from the claims guard. Schedule and push-to-main still cover it. | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.3 — floating v2 tag no longer resolves upstream; pinned to commit per Scorecard's own pinned-deps recommendation | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| publish_results: true | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: scorecard-sarif | |
| path: results.sarif | |
| retention-days: 30 | |
| - uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: results.sarif | |
| sbom: | |
| name: SBOM (syft) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: anchore/sbom-action@v0 | |
| with: | |
| path: . | |
| format: cyclonedx-json | |
| output-file: calnode-sbom.cdx.json | |
| artifact-name: calnode-sbom.cdx.json | |
| claims-guard: | |
| name: Deterministic claims guard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # gitleaks needs full history | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10.32.1 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| cache-dependency-path: frontend/pnpm-lock.yaml | |
| - name: Install frontend deps | |
| working-directory: frontend | |
| run: pnpm install --frozen-lockfile | |
| - name: Build frontend (required by the Go embed, same as ci.yml) | |
| working-directory: frontend | |
| run: pnpm build | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: No server-DB driver (single-binary-no-server-db claim) | |
| run: | | |
| if grep -iE 'postgres|mysql|redis' go.mod; then | |
| echo "::error::go.mod pulled in a server DB driver — this breaks the single-binary claim in audit/claims.yaml" | |
| exit 1 | |
| fi | |
| - name: No tenant/workspace column (instance-per-tenant-isolation claim) | |
| run: | | |
| if grep -rl 'tenant_id\|workspace_id' internal/db/migrations/*.sql; then | |
| echo "::error::a tenant/workspace column appeared — re-check the instance-per-tenant claim in audit/claims.yaml" | |
| exit 1 | |
| fi | |
| - name: govulncheck (clean-security-scan claim) | |
| run: | | |
| go install golang.org/x/vuln/cmd/govulncheck@latest | |
| govulncheck ./... | |
| - name: gosec (clean-security-scan claim — AUDIT.md says every finding is annotated) | |
| run: | | |
| go install github.com/securego/gosec/v2/cmd/gosec@latest | |
| gosec ./... | |
| - name: gitleaks (clean-security-scan claim) | |
| # gitleaks/gitleaks-action@v2 now requires a paid GITLEAKS_LICENSE for | |
| # organization repos ("Calnode" is one) — the underlying CLI is still | |
| # free/open-source (MIT), so install and run it directly instead, the | |
| # same way govulncheck/gosec above do, and the same invocation AUDIT.md | |
| # documents for a local run. | |
| run: | | |
| go install github.com/zricethezav/gitleaks/v8@latest | |
| gitleaks detect --source . --no-banner -v |