fix: mark malformed Keras ZIP configs inconclusive#918
fix: mark malformed Keras ZIP configs inconclusive#918mldangelo-oai wants to merge 2 commits intomainfrom
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 0 minutes and 28 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 improvements:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb97845cf6
ℹ️ 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 not isinstance(model_config, dict): | ||
| self._mark_inconclusive_scan_result(result, "keras_zip_config_invalid_type") | ||
| result.add_check( | ||
| name="Model Config Type Validation", | ||
| passed=False, | ||
| message=f"Invalid config.json type: expected dict, got {type(model_config).__name__}", | ||
| severity=IssueSeverity.INFO, | ||
| location=f"{path}/{config_info.filename}", | ||
| details={"actual_type": type(model_config).__name__, "expected_type": "dict"}, | ||
| ) | ||
| self._merge_recursive_archive_scan(path, result) | ||
| self._finish_scan_result(result) | ||
| return result |
There was a problem hiding this comment.
Run Keras security checks before returning on non-dict config
The early return for non-dict config.json stops scanning before _check_get_file_gadget and _check_embedded_hdf5_weights_external_references run. A parsed-list config can still carry get_file gadget data or malicious model.weights.h5, but this path now reports only inconclusive metadata and may miss warning/critical CVE findings.
Useful? React with 👍 / 👎.
Summary
Validation