navi-go

7. MLSecOps / LLMSecOps Pipeline and Demo

This section describes NaviGo’s implemented security and quality pipelines, and locally reproducible demonstration methods.

7.1 Local Development and Quality Gates

Project scripts (package.json):

acceptance (scripts/acceptance.sh) execution order:

  1. typecheck
  2. lint
  3. test:unit
  4. test:integration
  5. test:eval
  6. If OPENAI_API_KEY + DUFFEL_API_TOKEN + POSTGRES_URL are all present, execute one live CLI scenario; otherwise print [blocked] message.

This guarantees a three-layer gate of “static checks + automated tests + conditional real-chain verification.”

7.2 CI (GitHub Actions) Status

.github/workflows/ci.yml

Job 1: security-scan (LLMSecOps)

Enabled:

Job 2: checks

Executes after security-scan passes:

Job 3: build

Executes after security-scan and checks pass:

Job 4: docker-build-and-scan

.github/workflows/llmsecops.yml

Dedicated workflow for LLM application security:

Job 1: ai-sast (AI SAST)

Job 2: ai-supply-chain

Job 3: llm-redteam

Job 4: model-config-audit

7.3 CD (GitHub Actions) Status

See .github/workflows/cd.yml.

Triggered on main branch push or manual dispatch:

  1. Build and push GHCR image
  2. Trivy scan published image (CRITICAL/HIGH)
  3. Generate and upload SBOM
  4. Generate and push build provenance attestation

This forms a supply-chain security closed loop from code to image release (scan + SBOM + provenance).

7.4 LLM Application-Level Security Controls (Runtime)

1) Input and Output Guardrails

2) Structuring and Boundary Validation

3) External Call Resilience

requestJson(...) provides unified:

4) Prompt Security Static Analysis

scripts/prompt-security-scan.ts runs in CI, detecting:

7.5 Observability (LangSmith)

src/observability/tracing.ts:

Entry points:

7.6 Demo: From Commit to Security Verification

A. Local Demo

npm install
npm run typecheck
npm run lint
npm run test:unit
npm run test:integration

(Optional) If LangSmith is configured:

npm run test:eval

(Optional) If OpenAI + Duffel + Postgres are configured:

npm run acceptance

Prompt security scan and model configuration audit can also run locally:

npx tsx scripts/prompt-security-scan.ts
npx tsx scripts/ai-dependency-scan.ts
npx tsx scripts/model-config-audit.ts

B. CI/CD Demo (Repository Side)

  1. Submit PR -> triggers CI + LLMSecOps
  2. Observe security-scan (audit / secret / semgrep / SBOM)
  3. Observe ai-sast (prompt security scan / semgrep extended rules)
  4. Observe ai-supply-chain (audit / AI dependency scan / blocklist)
  5. Observe llm-redteam (adversarial test pass rate)
  6. Observe model-config-audit (model configuration security audit)
  7. Observe checks (typecheck / lint / unit / integration)
  8. Merge to main -> triggers CD
  9. Observe image build, Trivy, SBOM, attestation