SpectraB+ 85/100

SPECTRA

> analyzing spectra
the full spectrum of your codebase
Architecture 84 B+
Security 89 A-
Quality 82 B
Documentation 85 B+
Maintainability 83 B+
Performance 83 B+
Your codebase scores B+ (85/100) — strong security with quality gaps

Top Strengths

Security A- (89)
Documentation B+ (86)
Architecture B+ (85)

Key Concerns

Quality B (82)
Performance B+ (83)
Maintainability B+ (84)
Severity Distribution
medium (14) low (20) info (4)
38 findings · 6 agents · 257s · ~62h tech debt
  1. 01> medium Composition root has grown beyond pure DI wiring (mixed responsibilities) src/spectra/infrastructure/main.py:280

    Extract `_build_sarif` into a dedicated `SarifAdapter` (or extend `ReportAdapter`) implementing a `ReportPort.render(report, format, path)` contract. Move `_read_key_source_files`/`_prioritize_source_files` into a `SourceFileSelector` adapter or a use-case helper. Keep main.py focused on construction.

  2. 02> medium Module-level mutable globals for DI in CLI controller src/spectra/adapters/cli_controller.py:110

    Encapsulate the injected dependencies in a `CliContext` dataclass stored on the Typer app's `obj` (via `ctx.obj`), or build the Typer app inside a factory function `build_cli(analyzer_factory, cache_provider) -> Typer` so dependencies flow in via closure rather than module globals.

  3. 03> medium BaseAgent.parse_output / format_result violate Liskov for non-finding agents src/spectra/infrastructure/agents/base_agent.py:55

    Generalize `BaseAgent` to be parametric in output type (e.g., `BaseAgent[T]` with abstract `parse_result(parsed) -> T`) or split into two ABCs: `FindingProducingAgent` for specialists and `StructuredOutputAgent` for MetaPrompter/CritiqueAgent. This avoids the double-parse and the empty-tuple workaround.

  4. 04> medium Composition root performs use-case-level orchestration (Stage 1 INGEST and Stage 6 REPORT) src/spectra/infrastructure/main.py:145

    Move INGEST and REPORT stages into `analyze_repository` (or a top-level `run_pipeline` use case) so main.py only constructs ports and calls a single use-case entry point. The use case should accept a `ReportPort` and call it for rendering, keeping format-branching out of the composition root.

  5. 05> medium CritiqueAgent.validate_output silently discards parsed structure and returns empty tuple src/spectra/infrastructure/agents/critique_agent.py:155

    Either store the parsed critique result on the instance during validate_output (so get_critique_result returns it without re-parsing), or extend AgentOutput with an optional critique_payload field so the contract is honored without dual entry points.

B+ 0 / 100
Industry median: 65 · Well above industry median for all projects B grades represent well-maintained codebases with room for improvement
Architecture85
Security89
Quality82
Documentation86
Maintainability84
Performance83
Architecture
0 B+
Security
0 A-
Quality
0 B
Documentation
0 B+
Maintainability
0 B+
Performance
0 B+
0
Findings
0
Critical
0
Duration
$0
Cost
0
Agents
6
Agents
463K
Tokens Used
4m 16s
Duration
$5.09
API Cost
3
Hallucinations Removed
Agents Used
Architecture Security Quality Documentation Dependency Performance
3 findings removed (referenced non-existent files)
Filter

CritiqueAgent validated findings using extended thinking. 5 of 38 findings were individually confirmed.

Architecture (8)

estimated effort: ~23h

Security (6)

estimated effort: ~11h

Quality (7)

estimated effort: ~10h

Documentation (6)

estimated effort: ~6h

Maintainability (3)

estimated effort: ~3h

Performance (6)

estimated effort: ~9h

Patterns identified by CritiqueAgent that span multiple dimensions

arch-000, arch-004, arch-008, qual-005, qual-011 all describe the same root cause: model/prompt/role identifiers duplicated across multiple modules with no single source of truth. Fixing once (canonical constants module) addresses architecture, quality, and DRY concerns simultaneously.
doc-001, doc-002, doc-003 all stem from a model rename (Sonnet→Opus) that updated code but missed documentation strings. A single sweep of model references across docstrings/banners resolves all three.
arch-002, arch-007, qual-004 converge on main.py being overloaded with non-DI orchestration. Extracting Stage 1/Stage 6 into use cases solves all three.
arch-003 and qual-008 are duplicate findings about CLI module globals from architecture vs quality lenses — single fix (CliContext) addresses both.
arch-006 and qual-001 both describe the BaseAgent contract mismatch for non-finding agents — single refactor (parametric BaseAgent[T] or split ABCs) resolves both.
sec-002, sec-007, qual-002 share the pattern of bare except-and-swallow without scrubbing/logging; a unified error-handling policy with redaction and DEBUG logging addresses all three.
perf-002, perf-003 together describe synchronized rate-limit thundering herd; concurrency cap + jitter must ship together for either to be effective.
Several doc-* and dep-* findings (doc-004/005/007/008/009, dep-002/003) admit source material was not provided — these reflect audit scope gaps rather than code defects and should be reframed as 'audit completion items' not 'findings.'
0 estimated hours to remediate
cost to remediate: ~$10,894 at $150/hr avg dev rate
By Dimension
Architecture 22.8h
Security 11.0h
Quality 10.0h
Performance 9.0h
Documentation 6.5h
Maintainability 3.0h
By Severity
medium 33.0h
low 26.2h
info 3.0h
Debt Distribution
medi
low
OWASP Top 10 (2021) Coverage
2 of 10 categories checked
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
2 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-22 CWE-79 CWE-117 CWE-209 CWE-367 CWE-459 CWE-532 CWE-755

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
needs work

Moderate technical risk. Several areas need attention before fundraising.

Component Breakdown
Overall Score
85 25%
Security Posture
89 20%
Issue Concentration
48 10%
Dependency Health
10 10%
Code Complexity
50 10%
License Compliance
95 10%
SOC 2 Readiness
48 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.
48.5% control coverage
16 of 33 controls addressed
17 gaps · 26 findings mapped
CC1: Control Environment 1/5
CC1.1 Integrity and ethical values
CC1.2 Board independence and oversight
CC1.3 Management structure and reporting 2
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 2
CC2.3 External communication
CC3: Risk Assessment 3/4
CC3.1 Specification of suitable objectives 4
CC3.2 Risk identification and analysis 2
CC3.3 Consideration of fraud risk 4
CC3.4 Identification of significant changes
CC4: Monitoring Activities 1/2
CC4.1 Ongoing and separate evaluations
CC4.2 Communication of deficiencies 1
CC5: Control Activities 2/3
CC5.1 Selection of control activities 2
CC5.2 Technology general controls
CC5.3 Deployment through policies 1
CC6: Logical and Physical Access Controls 3/8
CC6.1 Logical access security software
CC6.2 Credential and secret management 3
CC6.3 Role-based access authorization 1
CC6.4 Access removal and session management
CC6.5 Physical access restrictions
CC6.6 System boundary protection
CC6.7 Data transmission security 1
CC6.8 Prevention of unauthorized software
CC7: System Operations 2/5
CC7.1 Infrastructure and availability monitoring
CC7.2 Security event detection
CC7.3 Security event evaluation 1
CC7.4 Incident response procedures 1
CC7.5 Recovery and resilience
CC8: Change Management 0/1
CC8.1 Change control processes
CC9: Risk Mitigation 2/2
CC9.1 Risk mitigation for business disruptions 1
CC9.2 Third-party and vendor risk management 2

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.
36.4% control coverage
4 of 11 controls addressed
7 gaps · 7 findings mapped
R6.2: Secure Software Development 1/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 3
R6.3: Security Vulnerabilities Identified and Addressed 2/3
6.3.1 Known vulnerabilities identified 2
6.3.2 Software inventory maintained 3
6.3.3 Patches applied timely
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 1
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.
58.3% function coverage
7 of 12 categories addressed
5 gaps · 14 findings mapped
GV: Govern 1/2
GV.OC-01 Organizational context understood 1
GV.RM-01 Risk management objectives established
ID: Identify 2/2
ID.AM-01 Asset inventory maintained 6
ID.RA-01 Risk assessment performed 2
PR: Protect 1/3
PR.AA-01 Access control enforced
PR.DS-01 Data security ensured 3
PR.PS-01 Platform security maintained
DE: Detect 1/2
DE.CM-01 Continuous monitoring implemented 2
DE.AE-01 Adverse event analysis performed
RS: Respond 1/2
RS.AN-01 Incident analysis conducted 1
RS.MI-01 Incident mitigation applied
RC: Recover 1/1
RC.RP-01 Recovery execution planned and tested 1

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

0
distribution score
concerning
0.523
Gini Coefficient
14
Unique Files
38
Total Issues
Top 10 Hotspot Files

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

0 risk
critical risk
3 dependency findings analyzed · +10 severity penalty
Risk Signals Detected
3 unique licenses detected · 14 total mentions
MIT×11 ISC×2 PROPRIETARY×1
1 file flagged for complexity by specialists. No numeric complexity scores were extracted from finding text.
Files flagged for complexity by specialists
This analysis cost
$5.09
Manual equivalent ($175/hr × 6h)
$1015
Spectra saved you
$1010 (99%)
Cost per finding
$0.13

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