# Changelog

## [2.14.0] - 2026-06-05

### Added

#### Antagonist Agent
- New meta-analysis agent that runs after all other agents complete
- **Synthesis mode**: Chains findings into attack narratives mapped to MITRE ATT&CK kill chain
- **Challenger mode**: Internal critic that flags false positives, coverage gaps, and inconsistencies
- Prioritized remediation recommendations based on attack surface reduction
- New `antagonist_synthesize` tool - full analysis with narratives, challenges, and prioritization
- New `antagonist_challenge` tool - manually challenge specific findings

#### Attack Narrative Features
- Builds attack graphs from findings and exploit chains
- Maps vulnerabilities to 14 MITRE ATT&CK kill chain phases
- Identifies bottleneck findings that block multiple attack paths
- Generates human-readable attack stories with difficulty/likelihood ratings

#### Challenger Features
- Detects potential false positives (test files, low confidence, generic descriptions)
- Identifies untested attack vectors (17 categories tracked)
- Flags agents with zero findings as potentially incomplete
- Calculates coverage score across attack surface

### Fixed
- Empty catch blocks in `store.ts` and `signing.ts` now log errors
- Antagonist agent integration test types corrected

### Changed
- MCP tools increased from 108 to 110
- New agent type `antagonist` with weight 0.15 (informs but doesn't dominate consensus)
- Added to AGENT_VERIFICATION_MAP (verified by security, adversary, redteam)

## [2.13.0] - 2026-06-04

### Added

#### False Positive Feedback System
- New `feedback_submit` tool to mark findings as true/false positives
- New `feedback_report` tool to view FP rates by scanner and rule
- New `feedback_suppressions` tool to get rule suppression suggestions based on feedback
- Feedback stored in `.vaspera/fp-feedback.json` with full audit trail

#### Diff-Aware CI Scanning
- New `certification_scan_diff` tool scans only changed files (git diff)
- Estimates scan time savings vs full scan
- Auto-detects security-critical files that always get scanned

#### Standalone Autofix Preview
- `autofix_preview` now works without certification_id
- Provide file + pattern_id to preview fixes directly
- Use `autofix_list_patterns` to see available fix patterns

### Fixed

#### Persistence DB Fallback
- Added JSON file fallback when SQLite is unavailable
- New `src/persistence/json-fallback.ts` with atomic writes
- Graceful degradation: warns but continues operating

#### scale_bottlenecks False Positives
- Added semantic analysis for workflow/pipeline patterns
- Confidence scoring (60-100) based on context
- Sequential workflows no longer flagged as N+1 queries

#### ai_code_verify Diagnostics
- Returns detailed diagnostics when 0 files found
- Shows which extensions were searched
- Reports which exclude patterns matched
- Suggests alternative file extensions

#### Scanner Error Messages
- Added `ScannerErrorDetails` with actionable suggestions
- tsc/eslint now report phase (init/scan/parse) and fix steps
- Full error output available for debugging

### Changed
- MCP tools increased from 103 to 108

## 2.10.0

### Minor Changes

- [#37](https://github.com/RCOLKITT/hardening-mcp/pull/37) [`f9b8a59`](https://github.com/RCOLKITT/hardening-mcp/commit/f9b8a59f7af6470f90a16c96aa9c6e5e845e2476) Thanks [@RCOLKITT](https://github.com/RCOLKITT)! - ## Property-Based Testing

  - Added `fast-check` dependency for scanner robustness testing
  - 52 new property tests for `extractPathParams`, `inferResourceType`, `analyzeFilePath`

  ## Expanded Eval Fixtures

  - 9 new fixtures across 5 categories (22 total, up from 13)
  - command-injection (CWE-78), ssrf (CWE-918), xxe (CWE-611), insecure-deserialization (CWE-502), rls-bypass (CWE-639)

  ## Constitution for Autofix Governance

  - Risk tolerance levels: conservative | moderate | aggressive
  - Pattern-specific approvals with conditions
  - Directory restrictions (neverAutofix, requireReview)
  - Safety constraints (dryRunDefault, maxFilesPerRun, runTestsAfterFix)
  - 33 new tests for constitution validation

## [2.10.0] - 2026-05-26

### Added

#### Property-Based Testing

- Added `fast-check` dependency for property-based tests
- New `src/__tests__/property-test-helpers.ts` with shared generators
- PBT for `extractPathParams()` - tests all 4 framework styles (Express, Next.js, Flask, Spring)
- PBT for `inferResourceType()` - tests singularization invariants
- PBT for `analyzeFilePath()` - tests file classification rules
- 52 new property tests ensuring scanner robustness

#### Expanded Eval Fixtures

- 9 new test fixtures across 5 vulnerability categories (22 total, up from 13)
- `command-injection` (2 fixtures): CWE-78 - exec/spawn with user input
- `ssrf` (2 fixtures): CWE-918 - fetch/axios with user-controlled URLs
- `xxe` (1 fixture): CWE-611 - XML parser without entity restrictions
- `insecure-deserialization` (2 fixtures): CWE-502 - eval/yaml.load vulnerabilities
- `rls-bypass` (2 fixtures): CWE-639 - missing ownership filters, service role bypass

#### Constitution for Autofix Governance

- Added `yaml` dependency for constitution file parsing
- New `src/autofix/constitution.schema.ts` with Zod validation
- New `src/autofix/constitution.ts` loader with evaluation logic
- Constitution integration with PR generator
- 33 new tests for constitution validation and enforcement
- Example constitution file in `examples/constitution.yaml`

**Constitution Features:**

- Risk tolerance levels: `conservative` | `moderate` | `aggressive`
- Pattern-specific approvals with conditions (path, lines changed, severity)
- Directory restrictions: `neverAutofix`, `requireReview`
- Safety constraints: `dryRunDefault`, `maxFilesPerRun`, `runTestsAfterFix`
- PR rules: required labels, commit prefix, max PRs per run

### Changed

- Test count increased from 2772 to 2942 (170 new tests)
- MCP tools increased from 68 to 78

---

## 2.9.2

### Patch Changes

- [#30](https://github.com/RCOLKITT/hardening-mcp/pull/30) [`8110af7`](https://github.com/RCOLKITT/hardening-mcp/commit/8110af76da720332e43f296b7357987e7edec533) Thanks [@RCOLKITT](https://github.com/RCOLKITT)! - ## Telemetry Integration

  - Wired up telemetry tracking to certification tools (`certification_scan`, `agent_cert_scan`, `certification_finalize`)
  - Added scan registry for persistent analytics storage
  - Telemetry is opt-in via `VASPERA_TELEMETRY_ENABLED` environment variable
  - Privacy-respecting: repo URL, org name, and email require explicit opt-in
  - Backend API endpoint for receiving telemetry events with rate limiting

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.9.0] - 2026-05-01

### Added

#### Optimization Plan Modules

##### Corpus Expansion (P0)

- 7 new payload categories bringing total from 220 to 430+ payloads
- `multi-turn.json` - 30 payloads for context-building attacks across turns
- `context-manipulation.json` - 30 payloads for conversation history attacks
- `output-redirection.json` - 30 payloads for forcing specific outputs
- `token-smuggling.json` - 30 payloads exploiting tokenization boundaries
- `mcp-attacks.json` - 30 payloads for MCP protocol-specific vectors
- `tool-chaining.json` - 30 payloads for tool composition exploits
- `privilege-escalation.json` - 30 payloads for read→write escalation
- Updated corpus sizes: quick=100, standard=400, thorough=800, exhaustive=1500

##### Usage Telemetry (P0)

- `src/telemetry/usage.ts` - Event tracking with privacy controls
- `src/telemetry/registry.ts` - Persistent scan registry for analytics
- Opt-in telemetry for repo URL, org name, user email
- Analytics methods for dashboard and case study candidates

##### Badge Service (P0)

- `src/badge-service/index.ts` - HTTP handlers for badge serving
- Badge verification endpoint with Sigstore bundle support
- `generateBadgeEmbedCode()` for markdown/HTML embedding
- CertificationStorage interface with memory implementation

##### Frontier Model Interface (P1)

- `src/frontier/types.ts` - Interfaces for Mythos/GPT-5.5-Cyber integration
- `src/frontier/orchestrator.ts` - Multi-model orchestration with consensus
- `src/frontier/providers/stub.ts` - Test provider placeholder
- FrontierModelProvider interface with capabilities, cost estimation
- ExploitChain and ConsensusResult types

##### Data Flow Analysis (P1)

- `src/analysis/data-flow.ts` - Source→sink tracking for JS/TS/Python
- Pattern-based detection of user input sources (req.body, event.body, etc.)
- Dangerous sink detection (SQL, command exec, eval, file write)
- Risky flow identification (untrusted source → sensitive sink without sanitizer)
- LLM context formatting for focused analysis

##### Agent Chain Analysis (P2)

- `src/scanners/agent/agent-chain-analysis.ts` - Multi-hop attack paths
- Trust boundary modeling between agents and MCP servers
- AgentGraph construction from MCP server configs
- Attack path detection with severity calculation
- Mermaid diagram generation for visualization

### Changed

- Extended PayloadCategory type with 7 new categories
- Updated FuzzerOptions corpus type to include "exhaustive"
- Increased test count from 2,332 to 2,484 across 104 test files

## [2.8.0] - 2026-04-29

### Added

#### Agent Batch Submit Tool

- New `agent_batch_submit` tool for submitting findings from subagent JSON output
- Solves MCP permission issues when certification agents run as subagents
- Accepts array of findings and optional summary in one call
- Updated certification command docs to recommend batch submit

### Fixed

#### CI/CD Improvements

- Lazy Stripe initialization to allow builds without `STRIPE_SECRET_KEY`
- Fixed TypeScript test timeout for CI environments
- Synced package-lock.json for CI compatibility

## [2.7.0] - 2026-04-26

### Added

#### Plan Enforcement

- New plan-limits system for free/pro/enterprise tiers
- Certification monthly limits enforced at API level
- Agent count limits based on subscription plan
- Compliance framework access gating (SOC2 free, HIPAA/NIST pro+)
- 403 responses with `PLAN_LIMIT_EXCEEDED` code and upgrade prompts

#### Plan Limits

| Limit                | Free | Pro               | Enterprise |
| -------------------- | ---- | ----------------- | ---------- |
| Certifications/month | 3    | 50                | Unlimited  |
| Projects             | 2    | 20                | Unlimited  |
| Agents               | 3    | 7                 | All        |
| Frameworks           | SOC2 | SOC2, HIPAA, NIST | All        |
| Red team             | ❌   | ❌                | ✓          |

## [2.6.0] - 2026-04-26

### Added

#### Test Coverage

- 147 new tests across 5 test files
- `agent-integrity.test.ts` - Consensus analysis and outlier detection
- `agent-privacy.test.ts` - PII detection with Luhn validation
- `otel.test.ts` - OpenTelemetry metrics and tracing
- `loader.test.ts` - Plugin registry and sandboxed execution
- `flags.test.ts` - Feature flags and config loading

#### Feature Flags System

- New `.vaspera/config.yaml` configuration format
- Per-agent weights and model selection
- Per-scanner timeouts and custom rules
- Feature toggles for multiModel, costTracking, autofix, etc.

#### Plugin System

- Scanner plugin architecture with manifest schema
- Local plugins from `.vaspera/plugins/`
- npm plugins from `vaspera-scanner-*` packages
- Sandboxed execution in child processes

## [2.5.0] - 2026-04-24

### Added

#### Mythos-Class Security Scanners

- New `binary-analysis` scanner for native module security
  - Detects Node.js native addons, shared libraries, Rust FFI, Go CGO
  - Checks RELRO, NX, PIE, CANARY protections via checksec
  - Scans for dangerous imports and hardcoded paths
- New `memory-safety` scanner for memory corruption vulnerabilities
  - Integrates with cppcheck for C/C++ analysis
  - Detects buffer overflows (CWE-120, CWE-787)
  - Detects use-after-free (CWE-416) and double-free (CWE-415)
  - Pattern-based detection for dangerous C functions (strcpy, sprintf, gets)
  - Rust unsafe code detection via cargo-geiger
- New `race-condition` scanner for concurrency bugs
  - Go: goroutine data race detection via go vet
  - Node.js: async/await shared state patterns
  - Python: threading and multiprocessing issues
  - Java: check-then-act and synchronized patterns

#### Semantic AI Agents

- New `zero-day-hunter` agent for novel vulnerability discovery
  - AI-powered semantic code analysis beyond pattern matching
  - Discovers logic flaws, auth bypasses, cryptographic weaknesses
  - Confidence scoring with evidence extraction
  - CWE mapping for compliance alignment
- New `logic-flaw-detector` agent for business logic bugs
  - Detects state inconsistencies and race conditions
  - Identifies boundary condition issues and error handling gaps
  - Analyzes trust boundaries and client-side data usage
- New `exploit-chain` analyzer for attack path mapping
  - Automatically chains multiple vulnerabilities into attack paths
  - Maps SSRF → internal API, XSS → session hijacking paths
  - MITRE ATT&CK technique mapping for each chain
  - Severity escalation calculation (medium + medium = critical)

#### New MCP Tools

- `certification_scan_binary` - Scan compiled code and native modules
- `certification_analyze_chains` - Analyze findings for exploitable chains
- `certification_semantic_analysis` - Run AI-powered semantic analysis

#### Compliance Enhancements

- Added MITRE ATT&CK technique mapping for AI/ML systems
- New CWE mappings for memory safety vulnerabilities
- New CWE mappings for race condition vulnerabilities
- OWASP LLM Top 10 integration

### Changed

- Updated scanner count from 9 to 13+ scanners
- Updated agent count from 4 to 7+ agents
- Updated frontend marketing pages with Mythos-class capabilities
- Demo page now reflects new scanner and agent counts

## [2.0.0] - 2024-01-15

### Added

#### Cost Tracking

- New `cost_track` tool to start tracking costs for a certification
- New `cost_estimate` tool to estimate costs before running
- New `cost_status` tool to get current cost status
- New `cost_report` tool to generate detailed cost reports
- New `cost_budget` tool to set/update budget limits
- New `cost_models` tool to list supported models and pricing
- Support for 13 LLM models: Claude (4), GPT (5), Gemini (3), O1 (3)
- Budget limits with automatic warnings and abort capability

#### Multi-Model Consensus

- New `multimodel_record` tool to record findings from model runs
- New `multimodel_consensus` tool to calculate inter-model agreement
- New `multimodel_disagreements` tool to identify model disagreements
- New `multimodel_merged` tool to get deduplicated findings
- New `multimodel_summary` tool to generate multi-model summaries
- New `multimodel_models` tool to list/configure available models
- New `multimodel_clear` tool to clear results
- Fleiss' kappa calculation for inter-rater reliability
- Finding similarity matching across models
- Disagreement detection by type (existence, severity, location, description)

#### Compliance Mapping

- New `compliance_report` tool for single-framework reports
- New `compliance_multi_report` tool for multi-framework reports
- New `compliance_controls` tool to list framework controls
- SOC 2 Type II mapping (17 controls)
- ISO 27001 Annex A mapping (14 categories)
- Control status assessment (Compliant/At-Risk/Non-Compliant)
- Finding-to-control mapping by category

#### SBOM & Provenance

- New `sbom_generate` tool for CycloneDX SBOM generation
- New `sbom_provenance` tool for SLSA provenance attestation
- New `sbom_sign` tool for Sigstore signing
- New `sbom_verify_provenance` tool for provenance verification
- Dependency inventory generation
- Build attestation with SLSA Level 2 support

#### Documentation

- New `docs/` folder with feature documentation
- Cost tracking guide (`docs/cost-tracking.md`)
- Multi-model consensus guide (`docs/multi-model.md`)
- Compliance mapping guide (`docs/compliance.md`)
- Complete MCP tools reference (`docs/mcp-tools.md`)
- Example workflows (`docs/examples/`)

### Changed

- Updated MCP tool count from 36 to 52
- Updated package description to highlight enterprise features
- README now includes v2.0.0 features section

### Fixed

- Finding type now uses `description` consistently (removed legacy `title`)
- Multi-model consensus correctly handles partial model agreement
- Cost calculation uses accurate per-model pricing

## [1.1.0] - 2024-01-01

### Added

#### Deterministic Scanners

- Semgrep integration for OWASP Top 10
- gitleaks integration for secrets detection
- npm audit integration for CVE detection
- TypeScript analysis for type safety

#### GitHub Action

- `action.yml` for CI/CD integration
- Diff-mode scanning for PRs
- PR comment formatting
- SARIF upload to GitHub Code Scanning

#### Evaluation Harness

- Test fixtures for scanner accuracy
- Precision, recall, F1 metrics
- Stability testing across runs
- Target thresholds for publication

#### Custom Rules

- `rules_load` for custom rule loading
- `rules_templates` for built-in templates
- `rules_generate_config` for config generation
- `rules_check_file` for file checking

### Changed

- Scanner findings now have confidence: 100
- LLM agents reference scanner findings by ID

## [1.0.2] - 2023-12-15

### Added

- Cross-verification system between agents
- Consensus scoring with certification levels
- SARIF export for GitHub integration

### Fixed

- Evidence validation for LLM findings
- Finding deduplication logic

## [1.0.1] - 2023-12-01

### Added

- File hash-based caching
- Agent finding submission tools
- Basic certification workflow

### Fixed

- Project discovery on macOS
- Command installation paths

## [1.0.0] - 2023-11-15

### Added

- Initial release
- 6 certification agents (security, reliability, typesafety, performance, quality, redteam)
- Hardening command installation
- Portfolio dashboard
- AUDIT.md and HARDENING-REPORT.md generation
