-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added verification of GPG key URIs against a list of trusted repositories for enhanced security #460
Conversation
57b03f7
to
267600d
Compare
/review |
Code Review Analysis(review updated until commit bb48264)
Code Review Feedback💡 General suggestions: The PR is well-intentioned with a focus on security, which is commendable. However, it's important to ensure that the error handling is consistent and that the tests cover both success and failure scenarios adequately. Additionally, the PR should maintain the codebase's readability and follow the established coding conventions, such as consistent commenting and documentation. ✨ Usage tips:
|
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
267600d
to
284eb10
Compare
/review |
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
Persistent review updated to latest commit 284eb10 |
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
284eb10
to
68853ee
Compare
/Review |
Persistent review updated to latest commit 68853ee |
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
68853ee
to
4078406
Compare
/Review |
Persistent review updated to latest commit 4078406 |
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Outdated
Show resolved
Hide resolved
e5a087d
to
bb48264
Compare
/Review |
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.
just one comment
/describe |
PR Description updated to latest commit (45068f9) |
/describe |
PR Description updated to latest commit (45068f9) |
Code Review Cost Analysis
|
Suggested PR Title - Implement GPG key URI verification against trusted repositories for enhanced security
RTC 537769check if sourceApplication Gpg key URL is in trusted repo
The PR review is to check for sustainability and correctness. Sustainability is actually more business critical as correctness is largely tested into the code over time. Its useful to keep in mind that SW often outlives the HW it was written for and engineers move from job to job so it is critical that code developed for Intel be supportable across many years. It is up to the submitter and reviewer to look at the code from a perspective of what if we have to debug this 3 years from now after the author is no longer available and defect databases have been lost. Yes, that happens all the time when we are working with time scales of more than 2 years. When reviewing your code it is important to look at it from this perspective.
Author Mandatory (to be filled by PR Author/Submitter)
PULL DESCRIPTION
Provide a 1-2 line brief overview of the changes submitted through the Pull Request...
REFERENCES
Reference URL for issue tracking (JIRA/HSD/Github): <URL to be filled>
Note-1: Depending on complexity of code changes, use the suitable word for complexity: Low/Medium/High
Example: PR for Slim boot loader project with medium complexity can have the label as: ISDM_Medium
CODE MAINTAINABILITY
APPLICATION SPECIFIC
Maintainer Mandatory (to be filled by PR Reviewer/Approving Maintainer)
QUALITY CHECKS
CODE REVIEW IMPACT
Note P1/P2/P3/P4 denotes severity of defects found (Showstopper/High/Medium/Low) and xx denotes number of defects found
SECURITY CHECKS
Please check if your PR fulfills the following requirements:
Code must act as a teacher for future developers
Types of major changes in the pull request
enhancement, bug_fix
Pull request change summary
Details of Pull Request changes by File
4 files
dispatcher_class.py
inbm/dispatcher-agent/dispatcher/dispatcher_class.py
Added an additional parameter dispatcher_broker to the
do_source_command function call within the do_install method
to pass the MQTT broker instance.
source_command.py
inbm/dispatcher-agent/dispatcher/source/source_command.py
Modified do_source_command and _handle_app_source_command to
accept a dispatcher_broker parameter and pass it to the
application source manager creation function.
source_manager_factory.py
inbm/dispatcher-agent/dispatcher/source/source_manager_factory.py
Updated create_application_source_manager to accept a
dispatcher_broker parameter and pass it to the
UbuntuApplicationSourceManager constructor.
ubuntu_source_manager.py
inbm/dispatcher-agent/dispatcher/source/ubuntu_source_manager.py
Enhanced the UbuntuApplicationSourceManager class to include
GPG key URI verification against a list of trusted
repositories. Added dispatcher_broker to the constructor and
used it for the verification process.
4 files
test_source_cmd_factory.py
inbm/dispatcher-agent/tests/unit/source/test_source_cmd_factory.py
Updated unit tests to create application source managers
with a mock dispatcher broker.
test_source_command.py
inbm/dispatcher-agent/tests/unit/source/test_source_command.py
Updated unit tests for source commands to include the mock
dispatcher broker as a parameter.
test_ubuntu_source_cmd.py
inbm/dispatcher-agent/tests/unit/source/test_ubuntu_source_cmd.py
Updated unit tests for the UbuntuApplicationSourceManager
class to include the mock dispatcher broker. Added tests for
the new GPG key URI verification feature.
SOURCE.sh
inbm/integration-reloaded/test/source/SOURCE.sh
Added a test step to append a trusted repository before
performing OS source tests.
2 files
README.md
inbc-program/README.md
Updated the README to include a note on adding the GPG key
URI to the list of trusted repositories before using the
source application add command.
Changelog.md
inbm/Changelog.md
Updated the Changelog to reflect the addition of GPG key URI
verification against a list of trusted repositories.