ibexharness
DocsBlogReleasesRoadmap
GitHub
ibexharness

Documentation

Architecture Decision RecordsADR-0002: Repository foundation bootstrapADR-0003: Branch protection and merge policyADR-0004: Protobuf and code generation policyADR-0005: Postgres migration strategyADR-0006: Auth protobuf contract (`ibex.auth.v1`)ADR-0007: Auth token validation implementationADR-0008: Security scanning and CI quality gatesADR-0009: Permission bitmap layoutADR-0010: Cryptography policyADR-0011: Proxy auth gRPC client and middlewareADR-0012: Proxy request normalization (OpenAI chat)ADR-0013: Proxy input validation and stable error envelopeADR-0014: Core domain migration sequencingADR-0015: Proxy rate limit skeleton (Phase 1)ADR-0016: Proxy agent identity verification (Phase 1)ADR-0017: Request ID and trace context strategy (Phase 1)ADR-0018: Graceful shutdown contract (Phase 1)ADR-0019: OpenTelemetry provider configuration (Phase 1)ADR-0020: Shared package boundaries — `packages/config` and `packages/apierror`ADR-0021: Prometheus Metric Catalog (Phase 1)ADR-0022: Health check contract (Phase 1)ADR-0023: Docs site architecture (Phase 1.5)
ADRs›ADR-0008: Security scanning and CI quality gates
ADRs

ADR-0008: Security scanning and CI quality gates

Architecture decision record 0008.

ADR-0008: Security scanning and CI quality gates

  • Status: Accepted
  • Date: 2026-06-02
  • Authors: IBEX Harness team

Context

docs/SECURITY.md §12.2 and docs/DEPENDENCIES.md §9 listed recommended scanners that were not wired in CI. ADR-0003 required only repo-guards, markdownlint, and gitleaks. golangci-lint ran with continue-on-error: true, providing no merge enforcement.

The repo has a single root go.mod, Go services auth and proxy, two Dockerfiles, and no Python/TypeScript application code yet.

Decision

Workflows added

WorkflowPurposePR required check
.github/workflows/codeql.ymlCodeQL (go now; python/javascript when app code exists)CodeQL
.github/workflows/semgrep.ymlIBEX custom rules (hard gate) + community rules (SARIF, non-blocking)semgrep
.github/workflows/scorecard.ymlOSSF supply-chain scoreNo
.github/workflows/sbom.ymlSyft SBOM + Grype scan (CRITICAL); reports as workflow artifacts only (no SARIF upload—Grype SBOM SARIF lacks GitHub artifactLocation)No

CI jobs added or changed (.github/workflows/ci.yml)

JobFailure threshold
trivyCRITICAL/HIGH filesystem CVEs; ignore-unfixed: true
osv-scanCRITICAL/HIGH via OSV reusable workflow
hadolint≥ warning (.hadolint.yaml)
banditHIGH+HIGH when services/memory exists; skip (success) until then
golangci-lintAny lint issue; single job for auth+proxy; no continue-on-error

Weekly schedule on CI runs only osv-scan (other jobs use if: github.event_name != 'schedule').

CI uses go-version-file: go.mod so the runner Go version tracks go.mod (currently 1.25.11; golang.org/x/crypto ≥ v0.52.0; golangci-lint v2.4+ for Go 1.25).

CodeQL default vs advanced

GitHub Default CodeQL setup conflicts with the advanced .github/workflows/codeql.yml (SARIF rejected). Repo admin must disable Default setup (Settings → Code security → Code scanning → CodeQL → Advanced) before the CodeQL check is reliable.

Dependabot

  • Active: github-actions, gomod at /
  • Deferred (documented in .github/dependabot.yml): pip (/services/memory), npm (/services/dashboard)

Branch protection

.github/branch-protection-main.json adds: CodeQL, trivy, osv-scan, semgrep, golangci-lint, bandit, hadolint.

Apply after the governance PR registers check names:

bash
gh api --method PUT \
  repos/Rick1330/ibex-harness/branches/main/protection \
  --input .github/branch-protection-main.json

AI agent enforcement

  • Custom Semgrep rules encode .cursorrules invariants
  • prompts/20-security-ci-audit.txt for CI/security config reviews
  • .cursorrules §9.5 CI tooling invariants

Consequences

Positive

  • Unified dependency CVE coverage (OSV) and container/filesystem scanning (Trivy)
  • IBEX-specific invariants enforced mechanically on every PR
  • Supply-chain visibility (Scorecard, SBOM) without blocking solo merge velocity on informational jobs

Negative

  • First PR may fail until CVEs/lint/hadolint findings are fixed
  • Branch protection cannot include new checks until GitHub has seen them on a PR
  • CodeQL requires one-time disable of GitHub Default setup

References

  • CONTRIBUTING.md
  • ADR-0003
  • docs/SECURITY.md §12.2

Was this page helpful?

Edit on GitHub

Last updated on

PreviousADR-0007: Auth token validation implementationNextADR-0009: Permission bitmap layout

On this page

  • Context
  • Decision
  • Workflows added
  • CI jobs added or changed (.github/workflows/ci.yml)
  • CodeQL default vs advanced
  • Dependabot
  • Branch protection
  • AI agent enforcement
  • Consequences
  • Positive
  • Negative
  • References
0%