stage_cra_rules wrote its temp file under the process id, which every scan
in an agent shares. With SCAN_CONCURRENCY above one, two scans wrote the
same temp file and one renamed it away from under the other, whose rename
then failed with "No such file or directory". Since #441 that fails the
SAST stage (before, it fell back to the registry rules), so the target got
no semgrep findings and its controls read "Nicht bewertet". Seen in the
local nightly; a burst of new targets (a Managed Git sync) triggers it.
The temp name is now unique per call. A multi-threaded test stages the
rules 32 times at once; it fails on the old code every time.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p