-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package version to the metadata type #872
Add package version to the metadata type #872
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #872 +/- ##
==========================================
+ Coverage 62.68% 62.88% +0.19%
==========================================
Files 342 342
Lines 14609 14687 +78
==========================================
+ Hits 9158 9236 +78
Misses 5451 5451 ☔ View full report in Codecov by Sentry. |
src/ostorlab/agent/message/proto/v3/report/vulnerability/vulnerability_pb2.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Summary
Total Issues Found: 2
Critical Issues: 1
Suggestions: 2
Key Findings:
The review identified two key issues. The first issue in the auto-generated file (vulnerability_pb2.py) is critical as it involves ensuring that updates to the MetadataTypeEnum (with the new PACKAGE_VERSION 9) are correctly applied only in the source .proto file. This check is vital for maintaining auto-generation integrity, proper header formatting, and backward compatibility. The second issue, found in the agent_report_vulnerability_mixin.py file, suggests that functions handling MetadataType (such as constructors, serializers, and loggers) must also be updated to include PACKAGE_VERSION, with corresponding updates to documentation and tests. Overall, the code quality appears solid with a clear separation between generated and manual code. However, strict adherence to auto-generation rules and consistent updates across documentation, tests, and client code are necessary to avoid potential integration issues.
src/ostorlab/agent/message/proto/v3/report/vulnerability/vulnerability_pb2.py
Show resolved
Hide resolved
src/ostorlab/agent/message/proto/v3/report/vulnerability/vulnerability.proto
Outdated
Show resolved
Hide resolved
2500076
This pull request adds the package version, which is necessary for https://github.com/Ostorlab/agent_osv to construct the vulnerability location for fingerprint.