BED- 8759 - Include installed collector versions in logs - #74
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Walkthrough
ChangesExtension Version Logging
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR adds installed collector and OpenHound version context to collection lifecycle logs without any identified merge-blocking risk; it is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant ExtensionManager
participant OpenHound
participant CollectorSubprocess
participant Logger
ExtensionManager->>OpenHound: assign extension distribution version
CollectorSubprocess->>ExtensionManager: discover collector
CollectorSubprocess->>Logger: emit structured startup metadata
CollectorSubprocess->>Logger: emit structured completion metadata
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title clearly describes the main change: adding installed collector version information to logs. It is concise and directly related to the pull request, although it does not mention the added OpenHound version context.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Summary
Add collector and OpenHound version context to collection start and completion
logs.
Motivation
Resolved: https://specterops.atlassian.net/browse/BED-8759
Changes
collector_extension,collector_extension_version,openhound_version, andjob_idto collection lifecycle logs.extension.yamlwhen distribution metadata is unavailable.Why use the installed package version?
extension.yamlcan diverge from the release installed in a deployment. Forexample,
openhound-githubinstalled as0.6.4while its metadata reported0.1.0. Distribution metadata identifies the package that actually performedthe collection.
Testing
python -m pytest tests/test_bhe_job_scheduling.py -q— 33 passed0.6.4.Summary by CodeRabbit