Files
stack/apps/orchestrator/src/main.ts
Jason Woltje 92c310333c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix(SEC-REVIEW-4-7): Address remaining MEDIUM security review findings
- Graceful container shutdown: detect "not running" containers and skip
  force-remove escalation, only SIGKILL for genuine stop failures
- data: URI stripping: add security audit logging via NestJS Logger
  when data: URIs are blocked in markdown links and images
- Orchestrator bootstrap: replace void bootstrap() with .catch() handler
  for clear startup failure logging and clean process.exit(1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:51:22 -06:00

24 lines
727 B
TypeScript

import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";
import { Logger } from "@nestjs/common";
const logger = new Logger("Orchestrator");
async function bootstrap() {
const app = await NestFactory.create(AppModule, {
logger: ["error", "warn", "log", "debug", "verbose"],
});
const port = process.env.ORCHESTRATOR_PORT ?? 3001;
const host = process.env.HOST ?? process.env.BIND_ADDRESS ?? "127.0.0.1";
await app.listen(Number(port), host);
logger.log(`🚀 Orchestrator running on http://${host}:${String(port)}`);
}
bootstrap().catch((err: unknown) => {
logger.error("Failed to start orchestrator", err instanceof Error ? err.stack : String(err));
process.exit(1);
});