fix: suppress CodeQL false positives in formatters.py #57
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.
Problem
CodeQL flagged 5 security alerts in
formatters.pythat are false positives:Analysis
Alert #31: Clear-text logging
Location: Line 97 -
print(json.dumps(data, ...))This is not logging - it's intentional CLI output. The tool only handles public peak data from PeakBagger.com. No credentials or sensitive information ever pass through this code.
Alerts #32-35: Regex ranges
Location: Lines 354-359 - emoji removal regex
The emoji pattern uses overlapping Unicode ranges, which CodeQL flags as potentially exploitable. However, this regex is only used for display formatting (removing emojis from scraped text), not for security validation or input sanitization.
Solution
Add suppression comments (
lgtm[...]) with detailed explanations for why these are false positives:Impact
This will resolve 5 open security alerts on the code scanning dashboard without changing any functional behavior.
🤖 Generated with Claude Code