Conversation
codex-check only ran 3 quality-gate meta-checks and never actually
analyzed code content. eval(), innerHTML, SQL injection, console.log
all passed silently.
Root cause: two disconnected systems — quality-gate.ts (called by
bridge) vs enforcement/validators (real analyzers, never wired in).
Fix: use ValidatorRegistry directly in handleCodexCheck(), bypassing
RuleEnforcer.validateOperation() whose dependency chain cascades
failures when validators lack full project context.
SNIPPET_SAFE_RULES whitelist (10 validators that work on raw code):
security-by-design, input-validation, clean-debug-logs,
console-log-usage, no-duplicate-code, loop-safety,
no-over-engineering, single-responsibility, error-resolution,
module-system-consistency
Also fixes:
- Bridge positional mode now parses inline JSON payloads for hooks
(node bridge.mjs hooks '{"action":"install"}' works)
- 3 stale test failures (missing session_stats keys + version string)
Verified: eval()→blocked, innerHTML→blocked, console.log→blocked,
CJS/ESM mix→blocked, clean code→passes. 129/129 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codex-check only ran 3 quality-gate meta-checks (tests-required, docs-required, resolve-errors) and never actually analyzed code content.
eval(),innerHTML, SQL injection,console.logall passed silently.Root Cause
Two disconnected systems in StringRay:
The `RuleEnforcer.validateOperation()) path was also broken for snippets — its dependency chain cascades failures when validators lack full project context (no test files, no package.json).
Fix
handleCodexCheck()vialoadFramework()security-by-design— eval, XSS, SQL injection, hardcoded credsinput-validation— unvalidated parametersclean-debug-logs— TODO, FIXME patternsconsole-log-usage— console.log detectionno-duplicate-code— duplicate code blocksloop-safety— infinite loop detectionno-over-engineering— complexity checkssingle-responsibility— SRP violationserror-resolution— error handling patternsmodule-system-consistency— mixed CJS/ESM importsAlso Fixes
node bridge.mjs hooks '{"action":"install"}')subagent_dispatches/subagent_validations/subagent_blockskeys in test fixture + version string v2.1→v2.2Verification
eval(data)innerHTML = htmlconsole.log(x)require('fs') + importfunction add(a,b) {}npm run buildclean, 0 errors