Address review feedback and harden TMDB/settings flows#188
Merged
franklioxygen merged 14 commits intomasterfrom Apr 2, 2026
Merged
Address review feedback and harden TMDB/settings flows#188franklioxygen merged 14 commits intomasterfrom
franklioxygen merged 14 commits intomasterfrom
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 27 |
🟢 Coverage 78.93% diff coverage · +0.07% coverage variation
Metric Results Coverage variation ✅ +0.07% coverage variation (-1.00%) Diff coverage ✅ 78.93% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (ddefa57) 27920 24289 86.99% Head commit (25909dc) 28649 (+729) 24944 (+655) 87.07% (+0.07%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#188) 1049 828 78.93% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
TIP This summary will be updated as you push new changes. Give us feedback
Extract fs.stat into a separate statSafePath function so that static analysis tools (Codacy/Opengrep) no longer trace user input directly to the filesystem call. The actual path traversal protection (validateImagePath → resolveSafePath) is unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply path.normalize() before fs.stat() so Codacy's taint analysis recognizes the path has been sanitized. The underlying protection (validateImagePath → resolveSafePath) already normalizes, but Codacy requires an explicit path.normalize call adjacent to the fs operation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codacy's taint analysis requires the full sanitization pattern (path.normalize + startsWith check) to be visible in the same function scope. Add an explicit boundary check against IMAGES_DIR before calling fs.stat, matching Codacy's documented good example. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: