Skip to content

perf(rules): reduce malicious-file scan CPU and redundant filesystem work - #215

Open
swarit-stepsecurity wants to merge 1 commit into
step-security:mainfrom
swarit-stepsecurity:swarit/fix/wt/suspicious-file-perf
Open

perf(rules): reduce malicious-file scan CPU and redundant filesystem work#215
swarit-stepsecurity wants to merge 1 commit into
step-security:mainfrom
swarit-stepsecurity:swarit/fix/wt/suspicious-file-perf

Conversation

@swarit-stepsecurity

@swarit-stepsecurity swarit-stepsecurity commented Sep 10, 2026

Copy link
Copy Markdown
Member

Reduce malicious-file scan CPU by checking mandatory conditions before optional evidence and avoiding path allocations for irrelevant files. Retains the earlier wildcard, prefix, and bounded-cache optimizations; detection evidence and coverage stay unchanged.

On Fedora with the actual four-rule bundle, eight full-agent runs showed 35% lower scan-phase CPU, 36% less phase time, and 6% less total time, with identical findings. Peak RAM was unchanged; separate profiles showed 37% fewer allocated bytes. Benchmark details.

Validated: race tests, lint, vet, tidy, 45 smoke checks, and Linux/macOS/Windows builds. Gosec found no issues in changed code. Native macOS/Windows performance remains untested. No version change or secrets included.

@swarit-stepsecurity swarit-stepsecurity changed the title Reduce malicious-file scan CPU and redundant filesystem work perf(rules): reduce malicious-file scan CPU and redundant filesystem work Sep 10, 2026
@swarit-stepsecurity
swarit-stepsecurity force-pushed the swarit/fix/wt/suspicious-file-perf branch from 27d1e79 to b13a37d Compare September 10, 2026 09:09
…work

Signed-off-by: Swarit Pandey <swarit@stepsecurity.io>
@swarit-stepsecurity
swarit-stepsecurity force-pushed the swarit/fix/wt/suspicious-file-perf branch from b13a37d to ccb5711 Compare September 11, 2026 10:14
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.

1 participant