center-for-threat-informed-defense / attack-workbench-rest-api

An application allowing users to explore, create, annotate, and share extensions of the MITRE ATT&CK® knowledge base. This repository contains the REST API service for storing, querying, and editing ATT&CK objects.
https://ctid.mitre-engenuity.org/
Apache License 2.0
40 stars 22 forks source link

308 refactor assets service for improved structure and asychronicity #309

Closed seansica closed 11 months ago

seansica commented 11 months ago

Closes #308

ElJocko commented 11 months ago

The assets controller also needs to be modified to use the new exceptions. Running the api tests causes a timeout when trying to add an asset with duplicate stix.id and stix.modified (I think the timeout is caused by the controller throwing when trying to reference assetsService.errors and the exception isn't caught)

codecov[bot] commented 11 months ago

Codecov Report

Attention: 55 lines in your changes are missing coverage. Please review.

Files Coverage Δ
app/lib/model-names.js 100.00% <100.00%> (ø)
app/models/asset-model.js 100.00% <100.00%> (ø)
app/models/campaign-model.js 100.00% <100.00%> (ø)
app/models/collection-model.js 100.00% <100.00%> (ø)
app/models/data-component-model.js 100.00% <100.00%> (ø)
app/models/data-source-model.js 100.00% <100.00%> (ø)
app/models/group-model.js 100.00% <100.00%> (ø)
app/models/identity-model.js 100.00% <100.00%> (ø)
app/models/marking-definition-model.js 100.00% <100.00%> (ø)
app/models/matrix-model.js 100.00% <100.00%> (ø)
... and 26 more

:loudspeaker: Thoughts on this report? Let us know!.

sonarcloud[bot] commented 11 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
8.3% 8.3% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint