Skip to content

fix: weasyprint timeout and export auth as env var placeholders#94

Merged
mikolajbadyl merged 1 commit intomainfrom
fix/weasyprint-timeout-and-export-secrets
Feb 28, 2026
Merged

fix: weasyprint timeout and export auth as env var placeholders#94
mikolajbadyl merged 1 commit intomainfrom
fix/weasyprint-timeout-and-export-secrets

Conversation

@mikolajbadyl
Copy link
Member

  • `weasyprint` now runs with a 30s timeout — hangs no longer freeze the CLI
  • Auth credentials in exported files (curl/pytest/postman) replaced with env var placeholders (`$AUTH_TOKEN`, `os.environ["AUTH_TOKEN"]`, `{{AUTH_TOKEN}}`)
  • OpenAPI `security` field now parsed per-endpoint and globally — `requires_auth` correctly set from spec
  • Export auth config falls back to CLI `--auth`/`--token` flags when no saved project config exists
  • `Content-Type: application/json` omitted from curl/pytest exports when request has no body

@kilo-code-bot
Copy link

kilo-code-bot bot commented Feb 28, 2026

Code Review Summary

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 4
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
internal/exporter/pytest.go 27 Unescaped double quotes in Go string literal - will fail to compile
internal/exporter/pytest.go 31 Unescaped double quotes in Go string literal - will fail to compile
internal/exporter/pytest.go 34 Unescaped double quotes in Go string literal - will fail to compile
internal/exporter/pytest.go 35 Unescaped double quotes in Go string literal - will fail to compile
Files Reviewed (6 files)
  • internal/cli/handlers.go - No issues
  • internal/core/parser/parser.go - No issues (security requirement parsing, method filtering)
  • internal/core/reporter/reporter.go - No issues (timeout context added)
  • internal/exporter/curl.go - No issues
  • internal/exporter/postman.go - No issues
  • internal/exporter/pytest.go - 4 issues

Summary: The PR introduces good improvements - security requirement parsing in OpenAPI specs, timeout handling for PDF generation, and environment variable-based authentication for exported tests. However, there are 4 critical Go syntax errors in pytest.go where double quotes inside string literals are not escaped. These will cause compilation failure and must be fixed before merging.

Fix these issues in Kilo Cloud

@mikolajbadyl mikolajbadyl merged commit 9621eba into main Feb 28, 2026
1 check passed
@mikolajbadyl mikolajbadyl deleted the fix/weasyprint-timeout-and-export-secrets branch February 28, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant