Pilot · Vendor-code filter recognises common embedded layouts (Middleware/, Middlewares/<lib>, HAL folders) #369

Closed
opened 2026-09-25 07:59:04 +00:00 by sharang · 0 comments
Owner

Part of #338.

Problem

Vendor code is kept out of SAST by a fixed list of directory patterns (compliance-agent/src/pipeline/vendor.rs). Common embedded layouts slip through, and SAST then reports thousands of findings inside ST, Mbed TLS or lwIP code:

  • Middleware/ (singular), as in FreeRTOS/iot-reference-stm32u5;
  • Middlewares/<lib> outside Third_Party, as in anon767/STM32F7HTTPS (Middlewares/mbedTLS/, about 89 DES/MD5/SHA-1 hits inside Mbed TLS);
  • HAL folders without the _HAL_Driver suffix (Drivers/STM32U5xx_HAL).

Done when

  • These layouts are recognised. Detection also uses the libraries' own marker files (for example mbedtls/version.h, lwip/init.h, FreeRTOS.h, stm32*_hal.h), not only directory names.
  • The excluded paths are still listed on the scan run and still go into the SBOM.
  • Tests for each layout above. Confirm with the customer's layout at the workshop (2026-09-30).
Part of #338. ## Problem Vendor code is kept out of SAST by a fixed list of directory patterns (`compliance-agent/src/pipeline/vendor.rs`). Common embedded layouts slip through, and SAST then reports thousands of findings inside ST, Mbed TLS or lwIP code: - `Middleware/` (singular), as in `FreeRTOS/iot-reference-stm32u5`; - `Middlewares/<lib>` outside `Third_Party`, as in `anon767/STM32F7HTTPS` (`Middlewares/mbedTLS/`, about 89 DES/MD5/SHA-1 hits inside Mbed TLS); - HAL folders without the `_HAL_Driver` suffix (`Drivers/STM32U5xx_HAL`). ## Done when - These layouts are recognised. Detection also uses the libraries' own marker files (for example `mbedtls/version.h`, `lwip/init.h`, `FreeRTOS.h`, `stm32*_hal.h`), not only directory names. - The excluded paths are still listed on the scan run and still go into the SBOM. - Tests for each layout above. Confirm with the customer's layout at the workshop (2026-09-30).
sharang added this to the Production MVP milestone 2026-09-25 07:59:04 +00:00
sharang added the bughigh labels 2026-09-25 07:59:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#369