Skip to content

Security: yinzers/YinzerFlow

Security

SECURITY.md

I'll conduct a comprehensive security review of your server implementation. Let me start by exploring the project structure to understand the codebase and then dive deep into potential vulnerabilities. Ran tool

Read file: package.json Ran tool Ran tool

Ran tool Ran tool Read file: docker-compose.yml

Read file: app/core/YinzerFlow.ts Read file: app/constants/http.ts Ran tool

Ran tool Ran tool Read file: app/core/utils/cors.ts Ran tool

Read file: app/core/execution/RequestHandlerImpl.ts Read file: app/core/execution/RequestImpl.ts Read file: app/core/execution/ResponseImpl.ts Read file: app/core/execution/ContextImpl.ts

Read file: app/core/setup/SetupImpl.ts Read file: app/core/setup/RouteRegistryImpl.ts Ran tool

Read file: app/core/execution/utils/parseHttpRequest.ts Read file: app/core/execution/utils/parseBody.ts Read file: app/core/execution/utils/parseHeaders.ts Read file: app/core/execution/utils/parseIpAddress.ts

Read file: app/core/execution/utils/parseJson.ts Read file: app/core/execution/utils/parseMultipart.ts Read file: example/index.ts Search files...

I've conducted a comprehensive security review of your YinzerFlow web framework implementation. Here's my detailed analysis of critical security vulnerabilities that need immediate attention:

🚨 Critical Security Vulnerabilities

6. Information Disclosure in Error Handling

Location: app/core/execution/RequestHandlerImpl.ts lines 112-146

Issues:

  • Stack traces exposed - Error details are logged to console and potentially leaked
  • Sensitive error information - Internal error messages could reveal implementation details
// PROBLEMATIC CODE:
console.error('Request handling error:', error); // Logs full error details
console.error('Error handler failed:', errorHandlerError); // More internal details

Fix: Sanitize error responses:

private async handleError(context: InternalContextImpl, error: unknown): Promise<void> {
  // Log internally but don't expose details
  const errorId = crypto.randomUUID();
  console.error(`[${errorId}] Request handling error:`, error);
  
  // Return generic error to client
  context._response._setBody({
    success: false,
    message: 'Internal Server Error',
    errorId: this._configuration.logLevel === 'verbose' ? errorId : undefined
  });
}

!! need to ensure the custom logger we created is being used everywhere instead of console.log. Also do the above ^^

There aren’t any published security advisories