You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: consolidate envvar security validation and use feature flags
Refactors the environment variable injection security fix based on feedback:
1. Consolidates EnvVarSecurity into EnvvarSanitization namespace within
envvar-prefix-context-parser.ts instead of standalone module
2. Replaces config-based feature flag with workspace feature flag
'envvar_context_validation' in user.featureFlags.permanentWSFeatureFlags
3. Consolidates all tests into single test file with two test suites:
- TestEnvvarPrefixParser (integration tests)
- TestEnvvarSanitization (unit tests)
Changes:
- Added 'envvar_context_validation' to WorkspaceFeatureFlags in protocol.ts
- Moved security validation logic into EnvvarSanitization namespace
- Updated parser to check user feature flags instead of config
- Removed standalone envvar-security.ts and envvar-security.spec.ts files
- Removed envvarContextValidation from config.ts
- Updated design document to reflect refactored architecture
The security functionality remains identical - three-layer validation with
backward compatibility when feature flag is disabled.
Co-authored-by: Ona <[email protected]>
0 commit comments