Skip to content

Add validated SSH daemon option remediation - #225

Merged
Witold Krecicki (wupeka) merged 7 commits into
mainfrom
wupeka/pr207-sshd
Dec 3, 2026
Merged

Witold Krecicki (wupeka) merged 7 commits into
mainfrom
wupeka/pr207-sshd

Conversation

@wupeka

Copy link
Copy Markdown
Contributor

Validate explicit SSH option changes before reload and roll back failed changes. Refuse service startup arguments whose effective values cannot be verified. Includes remediation tests.

Split from #207. This branch targets main directly.

Validation: git diff --check passed. Regenerated the engine interface with no unstaged changes. Unit tests were not rerun on this standalone branch.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Test Results

    1 files   -     10     96 suites   - 949   20s ⏱️ - 2m 8s
1 813 tests +    44  1 811 ✅ +    43  2 💤 +1  0 ❌ ±0 
1 813 runs   - 17 646  1 811 ✅  - 17 637  2 💤  - 9  0 ❌ ±0 

Results for commit 9f6b6bf. ± Comparison against base commit 1e19b2a.

♻️ This comment has been updated with latest results.

@wupeka
Witold Krecicki (wupeka) marked this pull request as ready for review December 1, 2026 09:29
@wupeka
Witold Krecicki (wupeka) requested review from a team and a balanced review from Copilot December 1, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical issues remain: daemon argument checks can validate the wrong configuration, and file replacement races can overwrite concurrent administrator edits during remediation or rollback.

2 open issues
What changed in this PR

Adds explicit SSH daemon option remediation to the kompli engine, extending SshdOption with validated configuration changes, service reload, and rollback handling.

Changes:

  • Adds literal remediation targets for eight supported SSH options while preserving audit-only behavior when no target is supplied.
  • Adds configuration traversal, startup checks, validation before reload, and rollback on failure.
  • Updates generated interfaces, schemas, documentation, and remediation tests.
File Description
src/​engine/​tests/​procedures/​SshdOptionRemediationTest.cpp Tests remediation, refusal conditions, rollback, and concurrent edits.
src/​engine/​tests/​CMakeLists.txt Registers the remediation tests.
src/​engine/​procedures/​SshdOption.schema.json Adds the target parameter and remediation schema.
src/​engine/​procedures/​SshdOption.h Declares the target parameter and remediation handler.
src/​engine/​procedures/​SshdOption.cpp Implements validation, configuration updates, reload, and rollback.
src/​engine/​ProcedureMap.h Adds the generated target parameter binding.
src/​engine/​ProcedureMap.cpp Registers the remediation handler and parameter name.
docs/​architecture.md Documents supported targets and remediation safeguards.

Review effort: Balanced

Comment thread src/engine/procedures/SshdOption.cpp Resolved
Comment thread src/engine/procedures/SshdOption.cpp Resolved
@wupeka

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Resolved the conflict in docs/architecture.md, preserving both SSH and SysctlValue guidance. Commit: 0674ff0.

@pallakatos

Copy link
Copy Markdown
Collaborator

Witold Krecicki (@wupeka) - are we planning to add KexAlgorithmsremediation to this as well?

@wupeka

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

# Conflicts:
#	docs/architecture.md

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Resolved the latest conflict with main, preserving the existing SSH/SysctlValue guidance and main’s AuditdRules/AuditdWatch documentation. Merge commit: 9f6b6bf.

@wupeka
Witold Krecicki (wupeka) added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 22d3fa7 Dec 3, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants