MAX_IMAGE_BYTES was 8 * 1024 * 1024 = 8,388,608, which is 388,608 bytes over the 8,000,000-byte ceiling the rule treats as safe — so the hotspot on the multer storage config survived the earlier limits fix. Now 8_000_000, with a comment on the MB-vs-MiB distinction so it doesn't get "tidied" back to a power of two.
typescript:S5689 — backend/src/app.ts
Express advertises its stack in X-Powered-By by default, which tells an attacker what to aim exploits at. Added app.disable('x-powered-by'). The rule also accepts helmet.hidePoweredBy(), but helmet isn't a dependency and adding one for a single header isn't worth it. Nothing in the repo reads or asserts that header.
Clears two SonarQube security hotspots.
**`typescript:S5693` — `backend/src/routes/admin.ts`**
`MAX_IMAGE_BYTES` was `8 * 1024 * 1024` = 8,388,608, which is 388,608 bytes over the 8,000,000-byte ceiling the rule treats as safe — so the hotspot on the multer storage config survived the earlier limits fix. Now `8_000_000`, with a comment on the MB-vs-MiB distinction so it doesn't get "tidied" back to a power of two.
**`typescript:S5689` — `backend/src/app.ts`**
Express advertises its stack in `X-Powered-By` by default, which tells an attacker what to aim exploits at. Added `app.disable('x-powered-by')`. The rule also accepts `helmet.hidePoweredBy()`, but helmet isn't a dependency and adding one for a single header isn't worth it. Nothing in the repo reads or asserts that header.
## Verification
- `npx tsc --noEmit` — clean
- Unit tests — 16/16
- Integration tests — 14/14
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- S5693: MAX_IMAGE_BYTES was 8 * 1024 * 1024 (8,388,608), just over the
8,000,000-byte ceiling the rule treats as safe, so the hotspot on the
multer storage config never cleared. Use 8_000_000.
- S5689: Express advertises its stack in X-Powered-By by default, which
tells an attacker what to aim exploits at. Disable the header.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Clears two SonarQube security hotspots.
typescript:S5693—backend/src/routes/admin.tsMAX_IMAGE_BYTESwas8 * 1024 * 1024= 8,388,608, which is 388,608 bytes over the 8,000,000-byte ceiling the rule treats as safe — so the hotspot on the multer storage config survived the earlier limits fix. Now8_000_000, with a comment on the MB-vs-MiB distinction so it doesn't get "tidied" back to a power of two.typescript:S5689—backend/src/app.tsExpress advertises its stack in
X-Powered-Byby default, which tells an attacker what to aim exploits at. Addedapp.disable('x-powered-by'). The rule also acceptshelmet.hidePoweredBy(), but helmet isn't a dependency and adding one for a single header isn't worth it. Nothing in the repo reads or asserts that header.Verification
npx tsc --noEmit— clean🤖 Generated with Claude Code