Fix 10 open CodeQL findings (workflow perms, logging, sanitization)#170
Merged
federiconeri merged 1 commit intomainfrom Apr 7, 2026
Merged
Fix 10 open CodeQL findings (workflow perms, logging, sanitization)#170federiconeri merged 1 commit intomainfrom
federiconeri merged 1 commit intomainfrom
Conversation
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:\n- Fixes open CodeQL findings in workflows and runtime code.\n- Adds explicit minimal workflow token permissions in CI and publish workflows.\n- Replaces regex-based trailing punctuation stripping in polishGoal with a linear scanner.\n- Hardens URL HTML text extraction by replacing fragile tag regexes with deterministic block stripping and conservative entity decoding.\n- Reduces clear-text logging exposure by moving sensitive command error paths through logger and removing provider env-var names from API-key-related runtime errors.\n\nValidation:\n- npm run typecheck\n- npm test -- src/commands/sync.test.ts\n- npm test -- src/commands/agent.test.ts\n- npm test -- src/commands/agent.integration.test.ts\n- npm test -- src/commands/config.test.ts\n- npm test -- src/ai/conversation/url-fetcher.test.ts\n- npm test -- src/tui/utils/polishGoal.test.ts\n\nNote: one unrelated pre-existing untracked local file was left untouched: src/agent/tools/max-length-tool-inputs.integration.test.ts