Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 18 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Performance BenchmarksCompared Top regressions:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f32cd81066
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ext in [".ini", ".cfg"] or (ext == ".config" and not stripped_content.startswith(("{", "["))): | ||
| return self._parse_ini_file(content) | ||
|
|
||
| # Try JSON format first | ||
| if ext in [ | ||
| ".json", | ||
| ".manifest", | ||
| ".model", | ||
| ".metadata", | ||
| ] or content.strip().startswith(("{", "[")): | ||
| ] or stripped_content.startswith(("{", "[")): | ||
| return json.loads(content) |
There was a problem hiding this comment.
Handle .config INI sections before JSON parsing
Update _parse_file parsing order for .config: the current guard not stripped_content.startswith(("{", "[")) skips _parse_ini_file for valid INI files that begin with [section]. Those files then go through json.loads, fail, and are marked parse-failed/inconclusive, so structured URL/hash checks never run on valid .config INI manifests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd800cb5f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| def _parse_ini_file(self, content: str) -> dict[str, Any]: | ||
| """Parse INI-style manifests into nested dictionaries.""" | ||
| parser = configparser.ConfigParser() |
There was a problem hiding this comment.
Disable interpolation when parsing INI manifests
_parse_ini_file builds a default ConfigParser, which enables % interpolation. Valid INI values like percent-encoded URLs (...%2F...) raise InterpolationSyntaxError, causing _parse_file to return parse-failed. The scan is then marked inconclusive and structured URL/hash checks never run on valid manifests.
Useful? React with 👍 / 👎.
Summary
This PR hardens the manifest scanner boundary uncovered in the repo-wide correctness audit. Parsed top-level manifest arrays were accepted as successful scans but skipped the structured model-name, URL, and weak-hash checks, so array-shaped model configs could hide weak integrity hashes or untrusted URLs. Malformed or scalar manifest roots also completed successfully even though structured analysis never ran.
Root Cause
Manifest parsing used truthiness and dict-only checks as the control-flow gate. Non-empty lists were truthy but ignored because downstream analysis only ran for dict roots. Empty values, malformed files, and scalar roots were collapsed into a soft debug parse attempt rather than an explicit incomplete scan outcome. The parser also advertised TOML and INI extensions without structured parsing support.
Changes
Validation