fix: validate filename and improve PQL docs#2733
Conversation
…ests and registry support
…update documentation
# Conflicts: # router/internal/persistedoperation/PO_MANIFEST_S3_GUIDE.md # router/pkg/config/config.schema.json
WalkthroughThe changes introduce configurability for the persisted operations manifest filename through a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
Router image scan passed✅ No security vulnerabilities found in image: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2733 +/- ##
==========================================
- Coverage 63.35% 63.24% -0.12%
==========================================
Files 249 251 +2
Lines 26671 26763 +92
==========================================
+ Hits 16898 16925 +27
- Misses 8408 8460 +52
- Partials 1365 1378 +13 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@router/pkg/config/config.schema.json`:
- Around line 206-210: The manifest.file_name schema entry currently allows path
traversal (e.g., "../manifest.json")—update the "file_name" validation in
router/pkg/config/config.schema.json to enforce a basename-only pattern that
forbids segments like "../" or "./", leading slashes, and empty segments while
still allowing normal filenames and optional compression extensions (.gz, .zst);
ensure the pattern is strict enough to block absolute paths and directory
separators but permits names like "manifest.json", "manifest.json.gz", and
"manifest.json.zst" so that router/pkg/config/config.go (and the FILE_NAME env
var) cannot be used to escape the configured prefix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 30a99244-9a84-4693-a5fc-b2f4484d9b4f
📒 Files selected for processing (3)
router/internal/persistedoperation/PO_MANIFEST_S3_GUIDE.mdrouter/pkg/config/config.schema.jsonrouter/pkg/config/config_test.go
Summary by CodeRabbit
Documentation
manifest.json). Clarified revision field requirements.Improvements
Checklist
Open Source AI Manifesto
This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.