ft/address security review issues - #17
Open
bolorundurowb wants to merge 6 commits into
Open
Conversation
… roots - Introduced `InstallPathPolicy` to prevent unsafe directory usage during install/uninstall operations. - Added `RelativePathGuard` to enforce strict validation for filenames and relative paths in manifests. - Developed `RuntimeManifestGuard` for runtime validation of manifest tasks and services to ensure security. - Implemented `WindowsServiceOwnership` to verify service binaries are confined to the install root. - Added `InstallPayloadLimits` to enforce resource limits for decompression and zip extraction.
- Introduced comprehensive regression tests covering edge cases related to shell injection, path validation, PID re-validation, payload limits, and runtime manifest safeguards. - Verified proper behavior of security mechanisms like `PosixPathPal`, `RelativePathGuard`, `InstallPathPolicy`, and more. - Ensured adherence to stricter handling of invalid inputs in installation and uninstallation processes.
- Improved input validation for `create_shortcut` and `create_desktop_entry` tasks to restrict filenames to simple names without path traversals or separators. - Replaced string-based validation with `RelativePathGuard`/`RuntimeManifestGuard` for stricter checks across manifests, service management, and file paths. - Enhanced `InstallProcessGuard` and related methods to revalidate process paths and enforce directory constraints. - Introduced stricter handling for payload extraction to prevent traversal exploits using `InstallPayloadLimits` and comprehensive directory validation. - Updated uninstall logic to ensure proper ownership verification for system services, registry keys, and environment variables, avoiding unauthorized modifications. - Added detailed logging and tests for all key changes to improve maintainability and security coverage.
- Provided XML summaries for public classes, methods, and properties, enhancing clarity and maintainability. - Updated `ManifestYaml`, `UninstallRunner`, `FeatureDefinition`, and other modules with detailed descriptions. - Improved tooltips and API references for IDE integrations by including `<summary>`, `<param>`, and `<returns>` tags. - Ensured alignment with existing security and process management updates.
- Added descriptions to schema elements for improved clarity and developer guidance. - Updated key properties like `metadata`, `build`, `ui`, `files`, `tasks`, and others with explanatory details. - Enhanced understanding of configuration options across platforms: Windows, Linux, and macOS. - Clarified optional fields, default values, and feature gating mechanisms.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 50.40% 52.24% +1.83%
==========================================
Files 79 84 +5
Lines 3718 3968 +250
Branches 810 867 +57
==========================================
+ Hits 1874 2073 +199
- Misses 1641 1660 +19
- Partials 203 235 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.