Skip to content

feat(codeql): Add CPP analysis #11682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucasssvaz
Copy link
Collaborator

@lucasssvaz lucasssvaz commented Aug 1, 2025

Description of Change

This pull request introduces enhancements to the CodeQL workflow to support .ino and cpp files. It includes a new Python script for processing SARIF files and modifications to the workflow configuration to handle .ino files by converting them to .cpp files during analysis.

Workflow Enhancements for .ino File Support:

  • .github/workflows/codeql.yml: Added .ino files to the list of paths monitored by the pull_request trigger.
  • .github/workflows/codeql.yml: Updated the matrix to include cpp as a language and added steps to convert .ino files to .cpp files with an Arduino.h include, while maintaining a mapping of renamed files.

SARIF File Processing:

  • .github/scripts/process_sarif.py: Introduced a Python script to process SARIF files generated by CodeQL, renaming .cpp files back to .ino and adjusting line numbers to match the original .ino files.

Tests scenarios

Tested in fork

@lucasssvaz lucasssvaz requested a review from me-no-dev August 1, 2025 01:37
@lucasssvaz lucasssvaz self-assigned this Aug 1, 2025
@lucasssvaz lucasssvaz added the Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure. label Aug 1, 2025
Copy link
Contributor

github-actions bot commented Aug 1, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 3084758

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Contributor

github-actions bot commented Aug 1, 2025

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C5000.000.00000.000.00
ESP32P4000.000.00000.000.00
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP32000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
EEPROM/examples/eeprom_class00--00--00000000
EEPROM/examples/eeprom_extra00--00--00000000
EEPROM/examples/eeprom_write00--00--00000000
ESP32/examples/AnalogOut/LEDCFade00--00--00000000
ESP32/examples/AnalogOut/LEDCGammaFade00--------0000--
ESP32/examples/AnalogOut/LEDCSingleChannel00--00--00000000
ESP32/examples/AnalogOut/LEDCSoftwareFade00--00--00000000
ESP32/examples/AnalogOut/SigmaDelta000000--00000000
ESP32/examples/AnalogOut/ledcFrequency000000--00000000
ESP32/examples/AnalogOut/ledcWrite_RGB000000--00000000
ESP32/examples/AnalogRead000000--00000000
ESP32/examples/AnalogReadContinuous0000000000000000
ESP32/examples/ArduinoStackSize0000000000000000
ESP32/examples/CI/CIBoardsTest0000000000000000
ESP32/examples/ChipID/GetChipID0000000000000000
ESP32/examples/DeepSleep/TimerWakeUp000000000000--00
ESP32/examples/FreeRTOS/BasicMultiThreading0000000000000000
ESP32/examples/FreeRTOS/Mutex0000000000000000
ESP32/examples/FreeRTOS/Queue0000000000000000
ESP32/examples/FreeRTOS/Semaphore0000000000000000
ESP32/examples/GPIO/BlinkRGB0000000000000000
ESP32/examples/GPIO/FunctionalInterrupt0000000000000000
ESP32/examples/GPIO/FunctionalInterruptLambda0000000000000000
ESP32/examples/GPIO/FunctionalInterruptStruct0000000000000000
ESP32/examples/GPIO/GPIOInterrupt0000000000000000
ESP32/examples/HWCDC_Events000000--000000--
ESP32/examples/MacAddress/GetMacAddress0000000000000000
ESP32/examples/RMT/Legacy_RMT_Driver_Compatible0000000000000000
ESP32/examples/RMT/RMTCallback0000000000000000
ESP32/examples/RMT/RMTLoopback0000000000000000
ESP32/examples/RMT/RMTReadXJT0000000000000000
ESP32/examples/RMT/RMTWrite_RGB_LED0000000000000000
ESP32/examples/RMT/RMT_CPUFreq_Test0000000000000000
ESP32/examples/RMT/RMT_EndOfTransmissionState0000000000000000
ESP32/examples/RMT/RMT_LED_Blink0000000000000000
ESP32/examples/ResetReason/ResetReason0000000000000000
ESP32/examples/ResetReason/ResetReason20000000000000000
ESP32/examples/Serial/BaudRateDetect_Demo0000000000000000
ESP32/examples/Serial/OnReceiveError_BREAK_Demo0000000000000000
ESP32/examples/Serial/OnReceive_Demo0000000000000000
ESP32/examples/Serial/RS485_Echo_Demo000000000000--00
ESP32/examples/Serial/RxFIFOFull_Demo000000000000--00
ESP32/examples/Serial/RxTimeout_Demo000000000000--00
ESP32/examples/Serial/Serial_All_CPU_Freqs000000000000--00
ESP32/examples/Serial/Serial_STD_Func_OnReceive000000000000--00
ESP32/examples/Serial/onReceiveExample000000000000--00
ESP32/examples/Template/ExampleTemplate000000000000--00
ESP32/examples/Time/SimpleTime000000000000----
ESP32/examples/Timer/RepeatTimer000000000000----
ESP32/examples/Timer/WatchdogTimer000000000000----
ESP32/examples/Utilities/HEXBuilder00--00000000----
ESP32/examples/Utilities/MD5Builder00--00000000----
ESP32/examples/Utilities/SHA1Builder00--00000000----
ESP_I2S/examples/ES8388_loopback00--0000--00----
ESP_I2S/examples/Simple_tone00--0000--00----
ESP_NOW/examples/ESP_NOW_Broadcast_Master00--0000--00----
ESP_NOW/examples/ESP_NOW_Broadcast_Slave00--0000--00----
ESP_NOW/examples/ESP_NOW_Network00----00--00----
ESP_NOW/examples/ESP_NOW_Serial00----00--00----
ESPmDNS/examples/mDNS-SD_Extended00----00--00----
ESPmDNS/examples/mDNS_Web_Server00----00--00----
Ethernet/examples/ETH_W5500_Arduino_SPI00----00--00----
Ethernet/examples/ETH_W5500_IDF_SPI00----00--------
Ethernet/examples/ETH_WIFI_BRIDGE00----00--------
Zigbee/examples/Zigbee_Pressure_Flow_Sensor00--------00----
Zigbee/examples/Zigbee_Range_Extender00--00000000--00
Zigbee/examples/Zigbee_Scan_Networks00--------00----
Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy00--------00----
Zigbee/examples/Zigbee_Temperature_Sensor00--------00----
Zigbee/examples/Zigbee_Thermostat00--000000000000
Zigbee/examples/Zigbee_Vibration_Sensor00--------0000--
Zigbee/examples/Zigbee_Wind_Speed_Sensor00--------0000--
Zigbee/examples/Zigbee_Window_Covering00--------0000--
ESP32/examples/DeepSleep/TouchWakeUp--000000------00
ESP32/examples/TWAI/TWAIreceive--0000000000--00
ESP32/examples/TWAI/TWAItransmit--0000000000--00
ESP32/examples/Touch/TouchInterrupt--000000--------
ESP32/examples/Touch/TouchRead--000000--------
WiFi/examples/WiFiTelnetToSerial--00------------
WiFi/examples/WiFiUDPClient--00------------
Wire/examples/WireMaster--00------------
Wire/examples/WireScan--00------------
Wire/examples/WireSlave--00------------
Wire/examples/WireSlaveFunctionalCallback--00------------
ESP32/examples/Camera/CameraWebServer (1)----0000------00
ESP32/examples/Camera/CameraWebServer (2)----0000------00
ESP32/examples/Camera/CameraWebServer (3)----00----------
ESP32/examples/DeepSleep/ExternalWakeUp----0000------00
ESP_I2S/examples/Record_to_WAV----00----------
Zigbee/examples/Zigbee_Analog_Input_Output----00----------
Zigbee/examples/Zigbee_Color_Dimmer_Switch----00--------00
Zigbee/examples/Zigbee_Electrical_AC_Sensor----00--00----00
Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase----00--00----00
Zigbee/examples/Zigbee_Fan_Control----000000----00
Zigbee/examples/Zigbee_Gateway----000000----00
Zigbee/examples/Zigbee_On_Off_MultiSwitch----000000----00
Zigbee/examples/Zigbee_On_Off_Switch----000000----00
Zigbee/examples/Zigbee_Power_Outlet----00000000--00
FFat/examples/FFat_Test------00--------
BLE/examples/iBeacon--------00--00--
DNSServer/examples/CaptivePortal--------00----00
BluetoothSerial/examples/DiscoverConnect--------------00
BluetoothSerial/examples/GetLocalMAC--------------00
BluetoothSerial/examples/SerialToSerialBT--------------00
BluetoothSerial/examples/SerialToSerialBTM--------------00
BluetoothSerial/examples/SerialToSerialBT_Legacy--------------00
BluetoothSerial/examples/SerialToSerialBT_SSP--------------00
BluetoothSerial/examples/bt_classic_device_discovery--------------00
BluetoothSerial/examples/bt_remove_paired_devices--------------00
ESP32/examples/DeepSleep/SmoothBlink_ULP_Code--------------00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: CI & Testing Related to continuous integration, automated testing, or test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant