operations capa

operations-assessments

_No description in Cargo.toml._

Tieroperations
Roleunclassified (baselined)
Pathcrates/operations/assessments
Edition2021
Targetsoperations_assessments
Public items0 across 0 modules
Tests34

What it is for

Library crates for audit/evaluation assessments.

This crate provides reusable types for storing and tracking assessments across different domains: security scans, compliance audits, performance checks, accessibility evaluations, and more.

# Features

# Example

use operations_assessments::{Assessment, Finding, Severity, AssessmentStatus, HasId};
use uuid::Uuid;

// Create and run an assessment
let entity_id = Uuid::new_v4();
let mut assessment = Assessment::new(
Uuid::new_v4(),
"website",
entity_id,
"security",
);

// Start the assessment
assessment.start().unwrap();
assert_eq!(assessment.status, AssessmentStatus::InProgress);

// Create findings
let finding = Finding::new(
Uuid::new_v4(),
assessment.id(),
Severity::High,
"ssl",
"Missing HSTS header",
"The server does not return a Strict-Transport-Security header",
)
.with_recommendation("Add HSTS header with max-age of at least 1 year");

// Complete the assessment with a score
assessment.complete(Some(75)).unwrap();
assert_eq!(assessment.status, AssessmentStatus::Completed);
assert_eq!(assessment.overall_score, Some(75));

# Database Schema

The migration in migrations/001_assessments_init.sql creates:

# Repository Pattern

Implement AssessmentRepository for your storage backend:

use operations_assessments::{AssessmentRepository, Assessment};

struct MyRepository { /* ... */ }

#async_trait
impl AssessmentRepository for MyRepository {
async fn create_assessment(&self, assessment: &Assessment) -> Result<()> {
// Your implementation
Ok(())
}
// ... other methods
}

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

use operations_assessments::{Assessment, Finding, Severity, AssessmentStatus, HasId};
use uuid::Uuid;

// Create and run an assessment
let entity_id = Uuid::new_v4();
let mut assessment = Assessment::new(
    Uuid::new_v4(),
    "website",
    entity_id,
    "security",
);

// Start the assessment
assessment.start().unwrap();
assert_eq!(assessment.status, AssessmentStatus::InProgress);

// Create findings
let finding = Finding::new(
    Uuid::new_v4(),
    assessment.id(),
    Severity::High,
    "ssl",
    "Missing HSTS header",
    "The server does not return a Strict-Transport-Security header",
)
.with_recommendation("Add HSTS header with max-age of at least 1 year");

// Complete the assessment with a score
assessment.complete(Some(75)).unwrap();
assert_eq!(assessment.status, AssessmentStatus::Completed);
assert_eq!(assessment.overall_score, Some(75));

From this crate's own rustdoc:

use operations_assessments::{AssessmentRepository, Assessment};

struct MyRepository { /* ... */ }

#[async_trait]
impl AssessmentRepository for MyRepository {
    async fn create_assessment(&self, assessment: &Assessment) -> Result<()> {
        // Your implementation
        Ok(())
    }
    // ... other methods
}

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
AssessmentEventevents::AssessmentEvent
Uuiduuid::Uuid
{Assessment,AssessmentListQuery,AssessmentStatus,AssessmentSummary,CreateAssessmentInput,CreateFindingInput,Finding,FindingStatus,Severity,}models::{Assessment,AssessmentListQuery,AssessmentStatus,AssessmentSummary,CreateAssessmentInput,CreateFindingInput,Finding,FindingStatus,Severity,}
{AssessmentError,Result}error::{AssessmentError,Result}
{AssessmentRepository,AssessmentRepositoryExt}repository::{AssessmentRepository,AssessmentRepositoryExt}
{HasId,SoftDeletable,Timestamped}foundation_basemodels::{HasId,SoftDeletable,Timestamped}

Boundary

Reaches into foundation.

Shares tier operations with 40 other crates: operations-approval-workflow, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-liveview, operations-camera-registry, operations-compliance, … (40 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)operations
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/operations/assessments
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_operations["operations"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1fullnoalways

Build. None.

Depended on by. 2 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_assessments["application-assessments"] -->|uses| SELF
  n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF
  SELF["operations-assessments"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
liboperations_assessments`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

2 workspace crates depend on this one: application-assessments, platform-privacy-scan-api.

Verification

KindCount
Unit tests34
Integration tests0
Examples0
Doctests2

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files5
Source lines2333
Code lines1672
Public API items0
Public modules0
Tests34
Examples0
Cargo features0
Direct runtime dependencies7
Workspace reverse dependencies2
pie showData
    title Rust source composition
    "Code" : 1672
    "Blank or comment" : 661

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las operations · Manual