Skip to content
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

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

oussamaessaji
Copy link
Member

This pull request adds the package version, which is necessary for https://github.com/Ostorlab/agent_osv to construct the vulnerability location for fingerprint.

@oussamaessaji oussamaessaji requested a review from a team as a code owner February 26, 2025 18:22
@oussamaessaji oussamaessaji marked this pull request as draft February 26, 2025 18:23
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.88%. Comparing base (1d47c64) to head (2500076).
Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@oussamaessaji oussamaessaji marked this pull request as ready for review February 26, 2025 18:28
Copy link

@ostorlab-ai-pr-review ostorlab-ai-pr-review bot left a 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.

Zakaria-Latif
Zakaria-Latif previously approved these changes Feb 26, 2025
adnaneserrar
adnaneserrar previously approved these changes Feb 26, 2025
@oussamaessaji oussamaessaji merged commit c3b1eda into main Feb 27, 2025
12 checks passed
@oussamaessaji oussamaessaji deleted the feature/add-package-version-to-medatatype branch February 27, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants