Interact with lookaside cache without pkg-tool#604
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the lookaside tools by replacing external subprocess calls to rhpkg/centpkg with direct usage of the pyrpkg library, and removes the PrepSourcesTool. The review feedback highlights two critical path traversal vulnerabilities: one in DownloadSourcesTool where unvalidated filenames from the sources file could lead to arbitrary file writes, and another in UploadSourcesTool where unvalidated input filenames could allow arbitrary file reads and uploads. Additionally, it is recommended to download sources in parallel using asyncio.gather to improve efficiency.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
|
/agentic_review |
There was a problem hiding this comment.
Code Review
This pull request refactors the lookaside toolchain by replacing external CLI subprocess calls to rhpkg and centpkg with direct Python API usage via pyrpkg, while also removing the PrepSourcesTool. Feedback on these changes suggests several robustness improvements: explicitly specifying UTF-8 encoding when reading and writing the .gitignore file, gracefully handling missing sources files during download, deduplicating download entries to avoid concurrent write race conditions, and skipping duplicate files during upload to prevent redundant operations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
|
/agentic_review |
There was a problem hiding this comment.
Code Review
This pull request refactors the lookaside tool to use the pyrpkg library directly instead of executing rhpkg and centpkg commands via subprocesses, and removes the PrepSourcesTool. The review feedback highlights critical issues with this transition: first, direct instantiation of CGILookasideCache bypasses the loading of client and CA certificates from system configuration files, which will cause authentication failures in production; second, the path traversal checks should explicitly forbid reading or writing files within the .git directory to prevent potential security vulnerabilities such as arbitrary code execution.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the lookaside tool implementation to use the pyrpkg library directly instead of executing rhpkg or centpkg CLI commands via subprocesses. As part of this change, the PrepSourcesTool has been removed, and the DownloadSourcesTool and UploadSourcesTool have been updated to utilize pyrpkg APIs for managing sources and updating .gitignore files. Additionally, path traversal checks have been introduced to prevent unauthorized file access, and unit tests have been thoroughly updated to cover the new logic. I have no further feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/agentic_review |
Code Review by Qodo
Context used✅ Compliance rules (platform):
7 rules 1. Unhandled executor exceptions
|
34fcd41 to
2d95670
Compare
Signed-off-by: Nikola Forró <nforro@redhat.com> Assisted-by: Claude Opus 4.6 via Claude Code
Signed-off-by: Nikola Forró <nforro@redhat.com> Assisted-by: Claude Opus 4.6 via Claude Code
No description provided.