Add standalone OWASP Kubernetes resource importers - #953
Conversation
|
Warning Review limit reached
Next review available in: 22 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe pull request adds OWASP Kubernetes Top 10 2022 and 2025 parsers, updates 2025 mappings, adds parser tests, and exposes both imports through CLI options. ChangesOWASP Kubernetes Top 10 imports
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
7b7e3ec to
eed318d
Compare
|
Please rebase onto latest |
11c247c to
0cf8f32
Compare
… and remove outdated JSON files
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@application/cmd/cre_main.py`:
- Around line 979-996: Ensure the Kubernetes parser modules for
OwaspKubernetesTop10_2022 and OwaspKubernetesTop10_2025 are imported and
registered unconditionally before the batch discovery flow invokes
BaseParser.call_importers(), rather than only inside the corresponding
input-flag branches. Preserve the existing cache_file registration argument and
avoid duplicate registration when explicit flags are handled.
🪄 Autofix
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: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2b63977c-418c-4ac4-997e-22974a93af60
📒 Files selected for processing (7)
application/cmd/cre_main.pyapplication/tests/fixtures/owasp_mappings/owasp_kubernetes_top10_2025.jsonapplication/tests/owasp_kubernetes_top10_2022_parser_test.pyapplication/tests/owasp_kubernetes_top10_2025_parser_test.pyapplication/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.pyapplication/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.pycre.py
Summary
This PR is split out from the larger issue-471 review flow to make review smaller and more focused.
It adds standalone importer support for:
OWASP Kubernetes Top Ten 2022OWASP Kubernetes Top Ten 2025 (Draft)Issue reference:
Problem Fixed
The earlier Kubernetes importer review became too large because it was mixed with unrelated OWASP importer, backend, and frontend work.
For this part of the work, the useful standalone contribution is:
Solution
This PR adds:
cre.py/cre_main.pywiring so the importers can run frommainFiles in scope:
cre.pyapplication/cmd/cre_main.pyapplication/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.pyapplication/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.pyapplication/utils/external_project_parsers/data/owasp_kubernetes_top10_2022.jsonapplication/utils/external_project_parsers/data/owasp_kubernetes_top10_2025.jsonapplication/tests/owasp_kubernetes_top10_2022_parser_test.pyapplication/tests/owasp_kubernetes_top10_2025_parser_test.pyTests
Reviewer Notes
This PR is intentionally narrow because it was split to reduce review size:
This PR is meant to be reviewed as a standalone Kubernetes importer addition.