CONFIDENTIAL — internal use only. Do not share outside your organization.
Indicative analysis — not auditor-grade evidence. Spectra runs 8 LLM agents over your code; findings are heuristic and require human verification before being treated as compliance evidence, audit input, or pass/fail signal in regulated workflows. Learn more
SpectraB+ 86/100

SPECTRA

> analyzing spectra
the full spectrum of your codebase
Architecture 80 B
Security 73 C+
Quality 94 A
Documentation 92 A
Maintainability 93 A
Performance 94 A
Your codebase scores B+ (86/100) — strong quality with security gaps

Top Strengths

Quality A (95)
Performance A (94)
Maintainability A (94)

Key Concerns

Security C+ (74)
Architecture B (81)
Documentation A (92)
Severity Distribution
high (1) medium (12) low (21)
34 findings · 6 agents · 244s · ~74h tech debt
  1. 01> high Layer violation: cli_controller imports infrastructure exception type src/spectra/adapters/cli_controller.py:540

    Move PolicyGateError into src/spectra/entities/errors.py (or a new use_cases module). Both infrastructure/main.py and adapters/cli_controller.py should import the single canonical class. This eliminates the duplicate-class hazard and keeps the adapter layer free of infrastructure coupling.

  2. 02> medium Composition root function exceeds reasonable size and orchestrates too many concerns src/spectra/infrastructure/main.py:130

    Extract the pipeline stages currently inlined in _run_analysis (INGEST, PREFLIGHT, REPORT, policy gate, receipt attachment) into the use_cases layer so analyze_repository owns all 6 stages. Keep _run_analysis as pure DI wiring + delegation. This restores the Clean Architecture invariant that orchestration lives in use_cases and infrastructure only provides adapters.

  3. 03> medium Adapter layer imports from infrastructure via deferred imports src/spectra/adapters/waiver_cli.py:130

    Define a WaiverSigner Protocol in use_cases/interfaces.py and inject the YamlWaiverAdapter implementation via a setter (mirroring set_analyzer_factory / set_cache_provider in cli_controller.py). The composition root wires the concrete signer; waiver_cli depends only on the Protocol. This eliminates both the deferred imports and the cryptography coupling.

  4. 04> medium Composition root uses 'object' typing for ports, defeating Protocol enforcement src/spectra/infrastructure/main.py:119

    Import the Protocol types (LLMGateway, AuditPort, MetaPrompterPort, SpecialistPort, CritiquePort) from use_cases/interfaces and type the parameters/returns precisely. Drop the 'type: ignore[arg-type]' once the types align. This restores the dependency-inversion contract the architecture promises.

  5. 05> medium Cache key composition logic in composition root reaches into agent prompt internals src/spectra/infrastructure/main.py:335

    Each agent module should expose a public prompt_version() function returning its hash contribution. The composition root composes the per-agent versions without touching private attributes. This makes the cache-version contract explicit and refactor-safe.

B+ 0 / 100
Industry median: 65 · Well above industry median for all projects B grades represent well-maintained codebases with room for improvement
Architecture81
Security74
Quality95
Documentation92
Maintainability94
Performance94
Architecture
0 B
Security
0 C+
Quality
0 A
Documentation
0 A
Maintainability
0 A
Performance
0 A
0
Findings
0
Critical
0
Duration
$0
Cost
0
Agents
6
Agents
544K
Tokens Used
4m 4s
Duration
$5.99
API Cost
1
Hallucinations Removed
Agents Used
Architecture Security Quality Documentation Dependency Performance
1 finding removed (referenced non-existent files)
Filter

CritiqueAgent validated findings using extended thinking. 3 of 34 findings were individually confirmed.

Architecture (7)

estimated effort: ~18h

Security (9)

estimated effort: ~26h

Quality (2)

estimated effort: ~8h

Documentation (5)

estimated effort: ~8h

Maintainability (6)

estimated effort: ~10h

Performance (5)

estimated effort: ~3h

Patterns identified by CritiqueAgent that span multiple dimensions

arch-005 and qual-001 are the same finding seen through architecture and quality lenses — the duplicated exception ladder in cli_controller.py. Consolidate into a single tracked issue.
arch-000 and qual-003 both target _run_analysis size/responsibility; resolving one resolves the other. Single refactor PR.
sec-006 and dep-002 both flag pysqlcipher3 maintenance from security and dependency angles; making it optional addresses both simultaneously.
arch-001, arch-002, and arch-007 form a coherent cluster: PolicyGateError, WaiverSigner protocol, and ReportError all involve types defined in the wrong layer. A single 'errors and ports cleanup' PR could move them to entities/use_cases and define the missing Protocol seam.
sec-011 (silent MAC degradation) and sec-007 (TOFU pubkey) both involve security-critical fallbacks that emit no user-visible warning — adding a unified 'security posture' line to CLI output would mitigate both with shared infrastructure.
arch-006 (private attribute reach) and perf-003 (recomputed cache versions) touch the same _composite_*_versions functions; a single refactor exposing public prompt_version() with lru_cache resolves both concerns.
0 estimated hours to remediate
cost to remediate: ~$13,038 at $150/hr avg dev rate
By Dimension
Security 26.5h
Architecture 18.5h
Maintainability 10.5h
Documentation 8.5h
Quality 7.5h
Performance 3.0h
By Severity
high 1.0h
medium 40.5h
low 33.0h
Debt Distribution
medi
low
OWASP Top 10 (2021) Coverage
0 of 10 categories checked

OWASP mapping requires security findings with explicit category references. Run with full code content to populate this section.

A01:2021 Broken Access Control
A02:2021 Cryptographic Failures
A03:2021 Injection
A04:2021 Insecure Design
A05:2021 Security Misconfiguration
A06:2021 Vulnerable and Outdated Components
A07:2021 Identification and Auth Failures
A08:2021 Software and Data Integrity Failures
A09:2021 Security Logging and Monitoring Failures
A10:2021 Server-Side Request Forgery
OWASP Top 10 (2025) Coverage
0 of 10 categories checked
A01:2025 Broken Access Control
A02:2025 Security Misconfiguration
A03:2025 Software Supply Chain Failures
A04:2025 Cryptographic Failures
A05:2025 Injection
A06:2025 Insecure Design
A07:2025 Authentication Failures
A08:2025 Software or Data Integrity Failures
A09:2025 Logging and Alerting Failures
A10:2025 Mishandling of Exceptional Conditions
CWE References Found
CWE-20 CWE-59 CWE-295 CWE-312 CWE-322 CWE-345 CWE-367 CWE-522 CWE-601 CWE-639 CWE-703 CWE-755 CWE-1104 CWE-1395

AI-assisted screening based on finding text. Not a substitute for professional penetration testing.

Automated heuristic — not a substitute for formal due diligence or financial advisory. Score is derived from code-quality signals, not business fundamentals.
0 / 100
near ready

Solid foundation with minor gaps. Address key issues before due diligence.

Component Breakdown
Overall Score
86 25%
Security Posture
74 20%
Issue Concentration
49 10%
Dependency Health
55 10%
Code Complexity
50 10%
License Compliance
95 10%
SOC 2 Readiness
46 10%
Critical Findings
100 5%

AI-estimated composite score. Consult qualified advisors for investment decisions.

Automated heuristic — not a substitute for formal SOC 2 assessment. Findings are mapped by keyword analysis, not control evidence evaluation.
45.5% control coverage
15 of 33 controls addressed
18 gaps · 30 findings mapped
CC1: Control Environment 2/5
CC1.1 Integrity and ethical values
CC1.2 Board independence and oversight 1
CC1.3 Management structure and reporting 1
CC1.4 Commitment to competence
CC1.5 Accountability for internal controls
CC2: Communication and Information 2/3
CC2.1 Information for internal control 2
CC2.2 Internal communication of objectives 1
CC2.3 External communication
CC3: Risk Assessment 3/4
CC3.1 Specification of suitable objectives 4
CC3.2 Risk identification and analysis 3
CC3.3 Consideration of fraud risk 1
CC3.4 Identification of significant changes
CC4: Monitoring Activities 0/2
CC4.1 Ongoing and separate evaluations
CC4.2 Communication of deficiencies
CC5: Control Activities 2/3
CC5.1 Selection of control activities 2
CC5.2 Technology general controls
CC5.3 Deployment through policies 5
CC6: Logical and Physical Access Controls 4/8
CC6.1 Logical access security software 2
CC6.2 Credential and secret management 2
CC6.3 Role-based access authorization
CC6.4 Access removal and session management
CC6.5 Physical access restrictions
CC6.6 System boundary protection 2
CC6.7 Data transmission security 2
CC6.8 Prevention of unauthorized software
CC7: System Operations 1/5
CC7.1 Infrastructure and availability monitoring
CC7.2 Security event detection
CC7.3 Security event evaluation 1
CC7.4 Incident response procedures
CC7.5 Recovery and resilience
CC8: Change Management 0/1
CC8.1 Change control processes
CC9: Risk Mitigation 1/2
CC9.1 Risk mitigation for business disruptions
CC9.2 Third-party and vendor risk management 5

Keyword-based mapping to AICPA Common Criteria (CC1–CC9). Not a formal SOC 2 audit.

Automated heuristic — not a substitute for formal PCI DSS assessment. Findings are mapped by keyword analysis, not control evidence evaluation.
27.3% control coverage
3 of 11 controls addressed
8 gaps · 9 findings mapped
R6.2: Secure Software Development 0/4
6.2.1 Secure development processes defined
6.2.2 Software development personnel trained
6.2.3 Code reviewed before release
6.2.4 Protection against common vulnerabilities
R6.3: Security Vulnerabilities Identified and Addressed 2/3
6.3.1 Known vulnerabilities identified
6.3.2 Software inventory maintained 7
6.3.3 Patches applied timely 2
R6.4: Public-Facing Web Applications Protected 0/2
6.4.1 Web application firewall or equivalent
6.4.2 Automated attack detection
R6.5: Changes Managed Securely 1/2
6.5.1 Change control procedures 2
6.5.2 Development/test/production separation

Keyword-based mapping to PCI DSS 4.0 Requirement 6 (Secure Systems & Software). Not a formal PCI assessment.

Automated heuristic — not a substitute for formal NIST CSF assessment. Findings are mapped by keyword analysis, not control evidence evaluation.
41.7% function coverage
5 of 12 categories addressed
7 gaps · 24 findings mapped
GV: Govern 1/2
GV.OC-01 Organizational context understood 7
GV.RM-01 Risk management objectives established
ID: Identify 1/2
ID.AM-01 Asset inventory maintained 10
ID.RA-01 Risk assessment performed
PR: Protect 2/3
PR.AA-01 Access control enforced 2
PR.DS-01 Data security ensured 4
PR.PS-01 Platform security maintained
DE: Detect 0/2
DE.CM-01 Continuous monitoring implemented
DE.AE-01 Adverse event analysis performed
RS: Respond 1/2
RS.AN-01 Incident analysis conducted
RS.MI-01 Incident mitigation applied 2
RC: Recover 0/1
RC.RP-01 Recovery execution planned and tested

Keyword-based mapping to NIST Cybersecurity Framework 2.0 (6 Functions). Not a formal NIST assessment.

0
distribution score
concerning
0.507
Gini Coefficient
8
Unique Files
34
Total Issues
Top 10 Hotspot Files

Measures finding distribution across files. For contributor-based bus factor analysis, use git blame tools.

0 risk
elevated risk
6 dependency findings analyzed · +5 severity penalty
Risk Signals Detected
2 unique licenses detected · 11 total mentions
MIT×9 ISC×2
This analysis cost
$5.99
Manual equivalent ($175/hr × 5h)
$945
Spectra saved you
$939 (99%)
Cost per finding
$0.18

Based on $175/hr senior engineer rate and ~5 hours for equivalent manual review. Actual costs vary.