Conversation
GitHub Actions maps `with:` inputs to INPUT_* prefixed env vars, but review-engine's privacyGuard.validateEnvironment() checks process.env directly. Set ANTHROPIC_API_KEY and GITHUB_TOKEN on process.env after reading them via core.getInput(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Dialectic PR ReviewFramework: vanilla SummaryThe change introduces a security concern by exposing sensitive credentials to the global process environment. While functionally correct for bridging GitHub Actions inputs to review-engine expectations, it creates unnecessary security exposure and tight coupling that should be addressed. Issues🔐 Environment variable pollution with sensitive dataFile: Setting ANTHROPIC_API_KEY and GITHUB_TOKEN directly on process.env exposes sensitive credentials to all child processes and modules. This creates a security risk where any dependency or spawned process can access these tokens. Suggestion: Pass credentials as parameters to review-engine instead of polluting process.env. If review-engine requires env vars, consider using a more secure approach like temporary env scoping or credential injection at the module boundary. 🔧 Tight coupling between GitHub Actions and review-engineFile: The code creates a bridge between GitHub Actions input format and review-engine's expected environment variables. This coupling makes the code harder to test and maintain, as it assumes specific environment variable names. Suggestion: Consider refactoring review-engine to accept credentials as parameters, or create a dedicated configuration object that can be passed to review-engine without modifying global state. Metadata
Powered by Dialectic PR Review |
review-engine already receives credentials as options parameters, so the process.env validation was redundant. Remove validateEnvironment() from review-engine (CLI already validates via getEnvOrThrow), remove the process.env bridge hack from action.ts, and delete the now-unused validateEnvironment() method from PrivacyGuard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub Actions maps
with:inputs to INPUT_* prefixed env vars, but review-engine's privacyGuard.validateEnvironment() checks process.env directly. Set ANTHROPIC_API_KEY and GITHUB_TOKEN on process.env after reading them via core.getInput().