fix(security): give MEDUSA every host worker, also for scans with few files
🧪 Test / 🧪 Lock + lint (push) Canceled after 0s

security.py capped --workers at the number of files scanned, so a scan of
three files used three cores. MEDUSA with scanner slices
(Pantheon-Security/medusa#21) splits each file's scanners across all
workers, so the cap now only idles cores; an unpatched MEDUSA starts
workers on demand and is not affected.

🎯 Fix: 92 %
💥 Break: 5 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 87
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-24 11:32:18 +00:00
1 parent edf53982c8
commit a667ac485a
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -222,7 +222,7 @@ class TestSecurity(unittest.TestCase):
argv = json.loads((self.bin / "argv.json").read_text(encoding="utf-8"))
self.assertEqual(
[argv[0], *argv[2:4], argv[4], *argv[6:]],
["scan", "--format", "json", "-o", "--no-cache", "--workers", str(min(2, security_module().host_workers()))],
["scan", "--format", "json", "-o", "--no-cache", "--workers", str(security_module().host_workers())],
)
result = self.scan("--json", env=self.env)
self.assertNotIn(PLACEHOLDER, result.stdout + result.stderr)