vitorlfaria/rust_clean_api
37.9
Weak · 8 November 2026
283
lines of production code
Rust
primary language
7
measurements over time
What this system is
This system is a lightweight API service, currently named article\_api, that manages a core domain model with persistent storage via SurrealDB. Recent development has focused on structural refactoring and identity updates, particularly around the Todo API components. However, the system's current trajectory is marked by a regression in security posture, with five new vulnerabilities identified that require immediate remediation.
How it got here
2023 — Initial scaffolding and database migration
7 changes.
The project began by establishing a foundational structure with an in-memory data layer and distinct architectural layers. It then transitioned to a persistent storage solution by migrating to SurrealDB, which required updating entity types and API endpoints. This period solidified the core domain model and data persistence strategy for the application.
2024 — Project renaming and API refactoring
2 changes.
The project was renamed to article\_api, accompanied by updates to its dependencies. Concurrently, the team initiated a refactoring of the Todo API, which involved migrating the underlying data layer. This period focused on restructuring the core application components and updating the project's identity.
September 2026 — Security regression: 5 new security findings
1 change.
The security scan has regressed, introducing 5 new security findings. This indicates a decrease in the overall security posture of the application, requiring immediate investigation and remediation to address the newly identified vulnerabilities or policy violations.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 37 → 38 (+1.3)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 50 → 50 (+0.0)
- Readiness 17 → 17 (+0.0)
- Security 39 → 44 (+5.0)
- Performance 100 → 100 (+0.0)
Resolved (5)
- Duplication of intent between Repository and Query objects. The 'get_todo_by_id_query' appears to be a CQRS query handler that likely delegates to 'TodoRepository.get_by_id'. While CQRS separates commands and queries, the naming 'get_todo_by_id_query' is redundant if the underlying repository already has 'get_by_id'. The query object name should ideally reflect the use case or be generic (e.g., 'GetTodoByIdQuery'), but the method name 'get_todo_by_id_query' inside the module 'get_todo_by_id_query' is repetitive and confusing. It suggests the query object itself is named after the method.
- Inconsistent naming between 'create_todo' and 'update_todo'/'delete_todo'. The 'create' verb is distinct, whereas 'update' and 'delete' are standard CRUD verbs. However, looking at the Command layer: 'create_todo_command', 'delete_todo_command', 'update_todo_command'. The repository methods mirror the command names. The inconsistency lies in the fact that 'create' is often paired with 'save' or 'insert' in some ORMs, while 'update' is used here. This is actually consistent with the command layer, so this is NOT an inconsistency.
- Inconsistent naming convention for read operations. 'get_by_id' uses the 'get_by_' prefix, while 'get_all' (listed separately) uses 'get_all'. More critically, standard repository patterns usually favor 'find_by_' or 'get_' consistently. Here we have 'get_all', 'get_by_id', and 'get_by_title'. While 'get_by_' is common, the mix of 'get_all' (no 'by') and 'get_by_' creates a slight inconsistency in the verb structure for retrieval.
- Medium CVE: RUSTSEC-2024-0336 (Cargo.lock)
- Type mismatch in domain model. 'Todo.id' is defined as 'bool', which is highly unusual for an identifier (typically String, UUID, or Int). 'createdAt' and 'updatedAt' are also 'bool', which is semantically incorrect for timestamps (should be DateTime/Time). This is a severe type inconsistency that suggests a mapping error or placeholder code.
New (3)
- Medium advisory (unmaintained): RUSTSEC-2026-0441 (Cargo.lock)
- Medium advisory (unsound): RUSTSEC-2026-0386 (Cargo.lock)
- Medium vulnerability: [GHSA redacted] (Cargo.lock)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
vitorlfaria/rust_clean_api was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 04cb7dd6a8fa350ea1121f24534b8c3e2e66fa64 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.