ETR01SDK-466: Refactor model#404
Conversation
|
Test Coverage Report ResultsGCC Code Coverage Report📂 Overall coverage
📄 File coverage
|
b476970 to
04db0ab
Compare
b31a3c9 to
1e5484f
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the model implementation by restructuring the project layout. The main changes involve moving model-related files from tropic01_model/ to more appropriate locations and introducing a new example structure.
Key Changes:
- Removed the standalone
tropic01_model/directory with its CMakeLists and main.c - Added structured model tests under
tests/functional/model/with new CMake configuration - Created a new Hello World example under
examples/model/hello_world/ - Moved model scripts and provisioning data to
scripts/tropic01_model/ - Updated documentation to reflect the new structure
- Modified CI/CD workflows to work with the new layout
Reviewed changes
Copilot reviewed 26 out of 41 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| tropic01_model/main.c | Removed standalone model main, replaced with structured test and example mains |
| tropic01_model/CMakeLists.txt | Removed monolithic CMake config, split into separate test and example configurations |
| tests/functional/model/main.c | New dedicated entrypoint for functional tests against model |
| tests/functional/model/CMakeLists.txt | New CMake configuration for model functional tests |
| tests/functional/model/download_deps.sh | New script to download external dependencies |
| examples/model/hello_world/main.c | New Hello World example for model |
| examples/model/hello_world/CMakeLists.txt | CMake config for Hello World example |
| scripts/tropic01_model/* | Model scripts and provisioning data moved to scripts directory |
| docs/* | Documentation updated to reflect new structure |
| .github/workflows/* | CI/CD workflows updated for new directory structure |
| tests/functional/src/CMakeLists.txt | Moved ASAN configuration to correct location |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| git clone https://github.com/orlp/ed25519.git "$SCRIPT_DIR/_deps/ed25519" | ||
|
|
||
| echo "Downloading Micro ECC..." | ||
| curl -L -o "$SCRIPT_DIR/_deps/micro-ecc.zip" "https://github.com/kmackay/micro-ecc/archive/refs/tags/v1.1.zip" | ||
| unzip "$SCRIPT_DIR/_deps/micro-ecc.zip" -d "$SCRIPT_DIR/_deps" | ||
| mv "$SCRIPT_DIR/_deps/micro-ecc-1.1" "$SCRIPT_DIR/_deps/micro-ecc" | ||
| rm "$SCRIPT_DIR/_deps/micro-ecc.zip" | ||
|
|
||
| echo "Downloading MbedTLSv4..." | ||
| curl -L -o "$SCRIPT_DIR/_deps/mbedtls.tar.bz2" "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-4.0.0/mbedtls-4.0.0.tar.bz2" | ||
| tar -xjf "$SCRIPT_DIR/_deps/mbedtls.tar.bz2" -C "$SCRIPT_DIR/_deps" |
There was a problem hiding this comment.
The download_deps.sh script fetches and builds third-party code (ed25519, micro-ecc, and mbedtls) directly from GitHub using git clone and curl without pinning to immutable commit hashes or verifying archive checksums. If any of these upstream repositories or release assets are compromised, an attacker can inject arbitrary code into your test binaries and gain code execution in developer or CI environments that run this script. To harden the supply chain, pin each dependency to a specific commit or content hash and verify archive integrity (e.g., via checksums or signatures) before building and executing the downloaded code.
There was a problem hiding this comment.
For some reason, comment originally for #408 was pulished here. Moved.
…c instructions, added first tutorial.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f133b68 to
a8d6e07
Compare
5087adf
into
ETR01SDK-466-New-example-structure-proposal
Description
This PR refactors model examples + tests.
Type of Change
Select the type(s) that best describe your change:
Checklist
Before submitting, please confirm that you have completed the following:
Optional Checks
You can enable optional CI jobs by checking following boxes. For example, coverage job is useful when modifying or implementing new tests.