Skip to content

Match filescan health policies by process group and name - #1167

Merged
mmguero merged 1 commit into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/filescan-health-process-identity-20261006
Oct 7, 2026
Merged

mmguero merged 1 commit into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/filescan-health-process-identity-20261006

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Fixes #1164.

Look up each process's policy by (group, name) instead of zipping two independently sorted lists. Unloaded configurations and repeated names across groups can no longer assign another process's autostart/exit policy or silently drop extra processes.

Unmatched process identities use the existing error response. Output ordering, response schema and the health policy for correctly matched records are unchanged. This is independent of #1162's state/exit-code correction.

Testing

python -m pytest -q filescan/python-filescan/tests/test_health_process_identity.py

13 focused tests passed; eight fail on unchanged source. Real Flask requests cover both response orders, same-name processes in different groups, extra unloaded configurations, missing matches, unchanged inputs and normal/empty controls.

71 tests pass in an isolated combined check with the new worker/registry fixes and the earlier #1160 and #1162 changes. One earlier #1162 test fixture was separately corrected to include the group field that Supervisor actually returns; that fixture-only update keeps its 17 existing tests passing. No previous production changes are included here.

Supervisor RPC calls are stubbed before module import. No Supervisor daemon, scanner, listener or live service was started.

Tested on macOS with Python 3.12. New-test formatting, syntax checks, scoped lint with the Python 3.12 target, and git diff --check pass. Full Malcolm deployment testing was not run. No workflow or dependency changes.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mmguero mmguero self-assigned this Oct 7, 2026
@mmguero mmguero added bug Something isn't working pipeline Relating to carving (extraction) of files from traffic and the scanning of those files labels Oct 7, 2026
@mmguero mmguero added this to Malcolm Oct 7, 2026
@mmguero mmguero added this to the v26.10.0 milestone Oct 7, 2026
@mmguero
mmguero changed the base branch from main to sylvesterkaczmarek-merges October 7, 2026 15:35
@mmguero
mmguero merged commit 92d9c32 into cisagov:sylvesterkaczmarek-merges Oct 7, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks @mmguero — appreciate you merging both filescan health fixes (#1167 and #1162).

@mmguero mmguero moved this from Done to Released in Malcolm Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working pipeline Relating to carving (extraction) of files from traffic and the scanning of those files

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Filescan health pairs process policies by position instead of identity

2 participants