fix(flow-php/telemetry): harden GitDetector against hostile repositories#2474
Merged
Conversation
- bound git subprocess with a timeout, GIT_TERMINAL_PROMPT=0 and a stdout cap - strip query and fragment from remote URLs alongside credentials - extract git test fixture into GitContext + GitTestCase - wire explicit detectors in phpunit telemetry factory
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2474 +/- ##
============================================
- Coverage 85.18% 85.18% -0.01%
- Complexity 21395 21408 +13
============================================
Files 1620 1620
Lines 66049 66083 +34
============================================
+ Hits 56263 56291 +28
- Misses 9786 9792 +6 🚀 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.
Change Log
Added
Fixed
Changed
flow-php/telemetry- GitDetector reads git via a non-blocking, timeout-bounded subprocess.flow-php/phpunit-telemetry-bridge- resource detectors are now wired explicitly through resource_detector().Removed
Deprecated
Security
flow-php/telemetry- GitDetector kills hanging git commands and caps output to resist hostile repositories.flow-php/telemetry- remote URL sanitizer now strips query and fragment so embedded tokens are never reported.