CI/CD Pipelines & CVE Scanning
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The Infinity OS project implements a robust CI/CD infrastructure designed for zero-downtime deployments and automated security enforcement. The system integrates high-frequency vulnerability scanning, dependency auditing, and multi-stage validation suites to maintain an enterprise-grade security posture. These pipelines ensure that every code push adheres to ISO 27001 standards for technical vulnerability management and operational security.
The scanning infrastructure specifically addresses Common Vulnerabilities and Exposures (CVEs) through a custom SLA enforcement engine. This engine monitors third-party dependencies across Python and Node.js ecosystems, ensuring critical patches are applied within defined timeframes. Sources: scripts/cve-sla-check.js:1-12, compliance/SECURITY_POLICY.md:144-150
CVE SLA Enforcement Engine
The CVE scanning system, specifically cve-sla-check.js, serves as the primary mechanism for technical vulnerability management. It is designed to run daily to detect, classify, and report security risks in the project's dependency tree.
Core Logic and Architecture
The engine performs three primary phases: dependency parsing, OSV API querying, and GitHub issue management. It maintains a local 24-hour cache to reduce API overhead and utilizes a fingerprinting system (CVE-ID::package) to prevent duplicate notifications.
The scan collects dependencies from package.json and requirements.txt across multiple paths including ./backend, ./apps/shell, and ./packages. Sources: scripts/cve-sla-check.js:46-91, scripts/cve-sla-check.js:203-240
Severity Classification & SLAs
Vulnerabilities are classified based on CVSS scores, with specific remediation deadlines enforced by the security policy.
| Severity | CVSS Range | SLA Deadline | Action |
|---|---|---|---|
| Critical | 9.0 - 10.0 | 24 Hours / 7 Days | Auto-create GitHub Issue |
| High | 7.0 - 8.9 | 72 Hours / 14 Days | Auto-create GitHub Issue |
| Medium | 4.0 - 6.9 | 7 Days / 30 Days | Report Only |
| Low | 0.1 - 3.9 | 30 Days / 90 Days | Report Only |
Sources: scripts/cve-sla-check.js:20-26, compliance/SECURITY_POLICY.md:144-148, PROJECT_PULSE_SESSION18.md:144-148
CI/CD Pipeline Stages
The project utilizes GitHub Actions for its primary CI/CD workflows, split into validation, security auditing, and deployment.
1. Validation Suite
Before deployment, a comprehensive validation suite (validate-production.sh) runs checks against the target instance. This includes:
- API Health: Verification of
/health,/docs, and/redocendpoints. - Router Integrity: Testing accessibility of core routers (AI, Billing, Security, etc.).
- Security Headers: Confirming presence of
X-Content-Type-Options,X-Frame-Options, andStrict-Transport-Security. - Database Status: Verifying PostgreSQL/Database health reports.
Sources: scripts/validate-production.sh:100-112, scripts/validate-production.sh:144-155
2. Security Audit Pipeline
The security-audit.sh script performs OWASP-aligned checks across the ecosystem. It is a mandatory gate in the CI/CD pipeline.
The audit specifically looks for "CHANGE_ME" placeholder values in production environments, unpinned Docker tags, and hardcoded secret patterns in .ts and .js files. Sources: scripts/security-audit.sh:35-150
3. Deployment Logic
The deployment process is designed to be idempotent and supports a zero-cost stack using Cloudflare Workers and Pages.
| Stage | Script/Tool | Function |
|---|---|---|
| Preflight | deploy.sh | Tooling check (Node 20+, pnpm 8+, Docker) |
| Database | Supabase/D1 | Schema application and migration |
| Secrets | Vault/GH Secrets | Injection of JWT_SECRET, Cloudflare tokens |
| Build | Vite/pnpm | Compilation of frontend and worker packages |
| Workers | Wrangler | Deployment of AI, Files, and Auth workers |
| Frontend | Wrangler Pages | Deployment to Cloudflare Pages |
Sources: scripts/deploy.sh:80-130, scripts/deploy.sh:230-265, PROJECT_PULSE_SESSION18.md:158-175
Production Readiness Gates
The ecosystem enforces "Hard-Stop Validation" where tasks modifying more than two files simultaneously require architect approval. Every deployment must generate a Project Pulse & Revert Log that includes the Revert Hash and Complexity Level (L1-L5). Sources: CONTRIBUTING.md:27-44, ECOSYSTEM_PRODUCTION_READINESS_V4.md:50-70
Continuous Monitoring
Following deployment, the verify_deployment function in deploy.sh checks the live status of the following endpoints:
- Identity Worker Health:
https://identity.${DOMAIN}/health - Grafana/Monitoring:
https://grafana.${DOMAIN}/api/health - Vault Security:
https://vault.${DOMAIN}/v1/sys/health
Sources: scripts/deploy.sh:304-330
Conclusion
The CI/CD pipelines and CVE scanning mechanisms in Infinity OS create a self-healing and compliant infrastructure. By combining daily OSV-based vulnerability scanning with rigorous multi-stage security audits, the project ensures that deployment speed does not compromise the security mandate. Automated issue deduplication and rate-limiting in the CVE engine specifically prevent operational fatigue while maintaining a "Zero Vulnerability" state for production dependencies. Sources: PROJECT_PULSE_SESSION18.md:85-95, scripts/cve-sla-check.js:300-320