SpectraB+ 85/100

SPECTRA

> analyzing spectra
the full spectrum of your codebase
Architecture 87 A-
Security 85 B+
Quality 80 B
Documentation 92 A
Maintainability 83 B+
Performance 76 C+
Your codebase scores B+ (85/100) — strong documentation with performance gaps

Top Strengths

Documentation A (92)
Architecture A- (88)
Security B+ (86)

Key Concerns

Performance C+ (76)
Quality B (80)
Maintainability B+ (84)
Severity Distribution
high (1) medium (18) low (21) info (21)
61 findings · 6 agents · 356s · ~74h tech debt
  1. 01> high BaseAgent._get_tokens_used relies on mutable gateway state (last_usage) src/spectra/infrastructure/agents/base_agent.py:95

    Return token usage directly from the execute_llm call (e.g., as part of the response tuple) rather than relying on shared mutable state on the gateway. Alternatively, use contextvars or make the gateway return usage per-call.

  2. 02> medium Global mutable state for analyzer factory injection in CLI controller src/spectra/adapters/cli_controller.py:68

    Consider using a lightweight dependency injection container or a dataclass-based AppContext that is passed through, rather than module-level global state. Alternatively, wrap the CLI app in a class that accepts the factory in __init__. This would make the dependency explicit and testable.

  3. 03> medium Dimension mismatch: dependency agent maps to 'maintainability' dimension src/spectra/infrastructure/agents/specialist_prompts.py

    Either rename the dimension to 'dependency' in the Literal type and update all references, or rename the agent role to 'maintainability'. The current hybrid creates confusion. If 'maintainability' is the intended dimension, update DIMENSION_LABELS and documentation to clarify that the 'dependency' agent covers the 'maintainability' dimension.

  4. 04> medium Heavy business logic in composition root (_run_analysis, _read_key_source_files, _build_sarif) src/spectra/infrastructure/main.py:130

    Extract _prioritize_source_files and _read_key_source_files into a use case (e.g., use_cases/prepare_codebase.py) or an adapter. Extract _build_sarif into a dedicated adapter (e.g., adapters/sarif_adapter.py). The composition root should only orchestrate, not implement business rules.

  5. 05> medium Prompt injection mitigation is present but incomplete across agent boundaries src/spectra/infrastructure/agents/specialist_agent.py:68

    Consider sanitizing or escaping closing XML tags (e.g., </analyzed_code>) within user-controlled content before embedding it in prompts. Additionally, consider using Anthropic's native tool-use or structured input features rather than string interpolation for data boundaries.

B+ 0 / 100
Architecture88
Security86
Quality80
Documentation92
Maintainability84
Performance76
Architecture
0 A-
Security
0 B+
Quality
0 B
Documentation
0 A
Maintainability
0 B+
Performance
0 C+
0
Findings
0
Critical
0
Duration
$0
Cost
0
Agents
Filter

CritiqueAgent validated findings using extended thinking. 7 of 61 findings were individually confirmed.

Architecture (8)

estimated effort: ~14h

Security (9)

estimated effort: ~12h

Quality (6)

estimated effort: ~12h

Documentation (7)

estimated effort: ~15h

Maintainability (10)

estimated effort: ~10h

Performance (10)

estimated effort: ~12h
0 estimated hours to remediate
cost to remediate: ~$12,862 at $150/hr avg dev rate
By Dimension
Documentation 15.0h
Architecture 14.0h
Performance 12.0h
Security 11.5h
Quality 11.5h
Maintainability 9.5h
By Severity
high 4.0h
medium 34.5h
low 23.0h
info 12.0h
Debt Distribution
medi
low
info
OWASP Top 10 (2021) Coverage
3 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
3 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-77 CWE-79 CWE-116 CWE-209 CWE-755 CWE-1395

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

0 / 100
needs work

Moderate technical risk. Several areas need attention before fundraising.

Component Breakdown
Overall Score
85 25%
Security Posture
86 20%
Issue Concentration
48 10%
Dependency Health
5 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.

48.5% control coverage
16 of 33 controls addressed
17 gaps · 45 findings mapped
CC1: Control Environment 0/5
CC1.1 Integrity and ethical values
CC1.2 Board independence and oversight
CC1.3 Management structure and reporting
CC1.4 Commitment to competence
CC1.5 Accountability for internal controls
CC2: Communication and Information 2/3
CC2.1 Information for internal control 9
CC2.2 Internal communication of objectives 2
CC2.3 External communication
CC3: Risk Assessment 3/4
CC3.1 Specification of suitable objectives 5
CC3.2 Risk identification and analysis 1
CC3.3 Consideration of fraud risk 4
CC3.4 Identification of significant changes
CC4: Monitoring Activities 1/2
CC4.1 Ongoing and separate evaluations 1
CC4.2 Communication of deficiencies
CC5: Control Activities 3/3
CC5.1 Selection of control activities 5
CC5.2 Technology general controls 1
CC5.3 Deployment through policies 2
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 2
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 1
CC7.2 Security event detection
CC7.3 Security event evaluation
CC7.4 Incident response procedures
CC7.5 Recovery and resilience 1
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 6

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

63.6% control coverage
7 of 11 controls addressed
4 gaps · 16 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 4
R6.3: Security Vulnerabilities Identified and Addressed 3/3
6.3.1 Known vulnerabilities identified 1
6.3.2 Software inventory maintained 7
6.3.3 Patches applied timely 3
R6.4: Public-Facing Web Applications Protected 1/2
6.4.1 Web application firewall or equivalent
6.4.2 Automated attack detection 1
R6.5: Changes Managed Securely 2/2
6.5.1 Change control procedures 3
6.5.2 Development/test/production separation 1

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

58.3% function coverage
7 of 12 categories addressed
5 gaps · 21 findings mapped
GV: Govern 0/2
GV.OC-01 Organizational context understood
GV.RM-01 Risk management objectives established
ID: Identify 2/2
ID.AM-01 Asset inventory maintained 13
ID.RA-01 Risk assessment performed 1
PR: Protect 2/3
PR.AA-01 Access control enforced
PR.DS-01 Data security ensured 1
PR.PS-01 Platform security maintained 3
DE: Detect 1/2
DE.CM-01 Continuous monitoring implemented 1
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 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.516
Gini Coefficient
20
Unique Files
61
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
10 dependency findings analyzed · +15 severity penalty
Risk Signals Detected
1 unique license detected · 17 total mentions
MIT×17
0
Max Complexity
0.0
Avg Complexity
0
High Complexity Files
unknown risk
No high complexity files detected
This analysis cost
$9.18
Manual equivalent ($175/hr × 4h)
$700
Spectra saved you
$691 (99%)
Cost per finding
$0.15

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