Repository navigation
fix: wire up or remove orphaned modules (Fixes #19) - #187
Merged
Merged
Conversation
- ServerCollector detects the TARGET host's OS over the existing SSH/local path (uname + /etc/os-release, ver for Windows) and adds RHEL (SELinux, firewalld, security updates), Debian (upgrades, reboot-required, AppArmor) and Windows Server (CIM, Get-WinEvent, services, firewall, IIS) checks. Result gains an os_family key. Replaces collectors/server_enhanced.py, which detected the agent's own OS and never used SSH. - Remove tools/safe_executor_enhanced.py: never imported; the never-delete blocklist and email alert live in tools/executor.py (#186). - documentation_generator renders postmortem/runbook/KB markdown in memory from the real run; the API stores them with the incident's logs (PII-scrubbed, same retention) behind AUTO_DOCUMENTATION (default true). Code-review runs are skipped; documents are never written to org docs. - Update README and docs that referenced the removed files. Fixes #19 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 25, 2026
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.
Fixes #19. Three modules were never imported by the running agent. Each is now either wired in or removed.
collectors/server_enhanced.py→ merged intoServerCollector, file removedThe old module used
platform.system(), so it detected the agent's own OS and never ran over SSH. Its OS-specific checks are now incollectors/server.py, which detects the target host's OS over the same SSH or local path it already uses:uname -s+/etc/os-releaseID/ID_LIKEverThe PowerShell commands are sent with
-EncodedCommand, so SSH and cmd.exe quoting can't mangle them. They useGet-CimInstanceinstead of the deprecatedwmic. The result gains anos_familykey. Linux keys are unchanged, and the existing SSH hardening tests still pass.tools/safe_executor_enhanced.py→ removedIt was never imported. Its never-delete blocklist and email alert are implemented properly in
tools/executor.pyby #186, which also fixes two broken SQL regexes the old file had. Merge #186 first, since docs/FEATURES_SUMMARY.md now points totools/executor.pyfor this.tools/documentation_generator.py→ rewritten and wired inrender_incident_docs(incident_id, context, result)renderspostmortem.md,runbook.mdandkb.mdin memory from the real run: the diagnosis, threat findings, tools used, commands that actually executed (blocked ones are excluded), suggested fixes, verification result and a rollback hint. It no longer writes to./documentationor creates directories on import.api/server.pystores the three files with the incident's logs (<org>/logs/<year>/<month>/<incident_id>/) through the newIncidentStore.save_document: PII-scrubbed,text/markdown, and subject to the sameAUDIT_RETENTION_DAYS.AUTO_DOCUMENTATION=trueby default (documented in.env.example). Code-review runs are skipped, and a storage failure only logsincident_docs_failed.Docs
README, PLATFORM_SUPPORT, FEATURES_SUMMARY, ORGANIZATIONAL_GUIDE, START_HERE, QUESTIONS_ANSWERED, the status docs and SUMMARY_OF_CHANGES are updated to match.
Tests
tests/test_server_collector_os.py: OS detection for each family runs on the target host, plus a round-trip check of the encoded PowerShell.tests/test_incident_docs.py: rendering, the security section, scrubbed storage, the flag, the code-review skip, and storage failures not breaking the incident.-llare clean.🤖 Generated with Claude Code