Repository navigation
feat(core): implement ProofCode analysis engine, security risk detection, and VS Code integration - #59
Merged
Conversation
chore(git): configure project gitignore rules for node, coverage, and reports Automated merge by ProofCode delivery pipeline.
chore(lint): configure ESLint with TypeScript ESLint parser and strict rules Automated merge by ProofCode delivery pipeline.
chore(typescript): configure TypeScript compiler options with strict type checking Automated merge by ProofCode delivery pipeline.
feat(manifest): define extension and CLI package manifest with commands and configuration Automated merge by ProofCode delivery pipeline.
chore(deps): lock production and development dependency tree Automated merge by ProofCode delivery pipeline.
test(config): configure Vitest test runner with v8 coverage and module resolution Automated merge by ProofCode delivery pipeline.
build(esbuild): configure production bundler for VS Code extension and standalone CLI Automated merge by ProofCode delivery pipeline.
…ervices-orderService fixture(demo/orders): implement order service with user ownership lookup in demo app Automated merge by ProofCode delivery pipeline.
…ervices-paymentService fixture(demo/payments): implement payment processing service in demo app Automated merge by ProofCode delivery pipeline.
…omponents-Dashboard fixture(demo/dashboard): implement user dashboard component calling getUser in demo app Automated merge by ProofCode delivery pipeline.
…omponents-AdminPanel fixture(demo/admin): implement admin panel component calling getUser in demo app Automated merge by ProofCode delivery pipeline.
…pp-api-auth-login-route fixture(demo/login-route): implement login API route with vulnerable template literal and passwordHash leak Automated merge by ProofCode delivery pipeline.
…pp-api-orders-id-route fixture(demo/orders-route): implement orders API route missing ownership constraint Automated merge by ProofCode delivery pipeline.
…-auth-test fixture(demo/tests): implement regression tests covering auth service and dashboard in demo app Automated merge by ProofCode delivery pipeline.
… git diff is clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request establishes the core foundation of ProofCode, bringing together Git-based change analysis, TypeScript AST inspection, project dependency mapping, security and code-quality risk detection, automated verification, structured reporting, and Visual Studio Code integration.
The implementation is organized into modular components with dedicated responsibilities, including Git operations, source analysis, dependency graphs, risk rules, verification execution, report formatting, and the editor-facing interface.
Alongside the core functionality, this update establishes the project configuration, TypeScript compiler settings, linting rules, test infrastructure, build tooling, packaging configuration, and GitHub Actions workflow.
Scope
Base comparison:
master...workingCommits: 232
Files changed: 55
Included pull requests: chore(git): configure project gitignore rules for node, coverage, and reports #1–feat(ui/tree): implement ProofCodeTreeDataProvider for VS Code Activity Bar overview #25
Primary focus: Core engine, code analysis, security risk detection, verification, reporting, and developer tooling
Key Changes
1. Project Configuration and Development Foundation
Established the initial project infrastructure and standardized its development configuration.
Added the package manifest and npm scripts.
Configured TypeScript compiler options, module resolution, strict type-checking flags, include/exclude paths, and declaration outputs.
Added ESLint configuration with TypeScript ESLint parsing, recommended rules, custom constraints, and overrides.
Configured Vitest with test discovery patterns, execution environment, V8 coverage reporting, and coverage exclusions.
Added dependency lockfiles for the compiler, bundler, testing tools, and related packages.
Updated
.gitignoreto exclude standard Node.js artifacts, build output, coverage data, VSIX packages, operating-system metadata, and transient ProofCode reports.These changes provide a consistent baseline for development, static analysis, testing, and packaging.
2. Build System and Distribution Packaging
Introduced the esbuild-based build configuration and Visual Studio Code packaging rules.
Build configuration
Initialized the esbuild build script and its options.
Added a CLI executable target with a shebang banner.
Implemented production minification.
Added watch-mode build context support.
Packaging configuration
Introduced
.vscodeignore.Excluded development sources, tests, coverage artifacts, and unnecessary files from the VSIX package.
Refined inclusion rules to target a minimal extension bundle.
The build and packaging configuration separates development resources from distributable extension assets.
3. Visual Studio Code Extension Setup
Established the extension manifest and editor-development workflow.
Added extension metadata and npm scripts.
Declared the Activity Bar container, views, and commands.
Defined the extension configuration schema and CLI binary metadata.
Configured
launch.jsonfor extension-host debugging.Added extension-host launch options and pre-launch configuration.
Linked the demo application workspace for interactive F5 testing.
Created the initial SVG shield icon and refined its geometry, emerald brand palette, viewBox, and theme compatibility.
This lays the groundwork for developing and interacting with ProofCode inside Visual Studio Code.
4. Architectural Rules and Engineering Policies
Introduced an initial architectural policy template and a Markdown-based rules foundation.
The documented policies cover:
Authentication and authorization expectations.
Data privacy and sensitive information handling.
Resource ownership.
Idempotency guidelines.
Test requirements.
Additional engineering constraints represented by the project rules configuration.
The implementation also introduces a
ProjectRulesEngineand Markdown rules parser, with checks for authentication, sensitive-field leaks, resource ownership, testing requirements, and related policy violations.These rules provide a foundation for evaluating code changes against explicit project-level expectations.
5. Shared Type Definitions and Analysis Models
Added TypeScript interfaces and models to support communication between analysis components.
The declared types cover:
Git diff data.
AST symbol extraction.
Impact analysis.
Function callers and relationships.
Risk evidence traces.
Verification reports.
Verification scores.
Breakage risk models.
These contracts establish consistent data structures for collecting analysis results, tracing evidence, calculating impact, and generating reports.
6. Git Integration and Diff Parsing
Introduced the Git service and diff parser required to inspect repository changes.
Git service
Initialized the
GitServiceclass and shell execution helper.Implemented branch discovery.
Added parsing for Git porcelain status output.
Added synthetic diff generation for untracked files.
Diff parser
Added file-header matching.
Implemented hunk-header parsing.
Added line-number tracking.
Calculated exact modified line ranges.
Added handling for renamed files.
Together, these components establish the Git change-discovery layer used by the broader analysis pipeline.
7. TypeScript AST Analysis
Introduced the
ASTAnalyzerusing the TypeScript Compiler API.The analyzer work includes:
Initialization of the AST analysis component.
Inspection of symbols and declarations.
Visibility into import and export declarations.
Detection of endpoints in Next.js App Router and Pages Router structures.
This creates the source-analysis foundation for identifying relevant code constructs and connecting modified files to application-level behavior.
8. Project Dependency Graph and Change Impact Analysis
Introduced the
ProjectGraphcomponent for mapping project structure and relationships.Added file discovery and module resolution.
Built reverse dependency mappings.
Added function-call relationships.
Implemented
computeImpact.Added blast-radius analysis and associated test coverage.
The graph layer provides a way to reason about how a change in one part of a project may affect dependent modules and connected functions.
9. Security and Code Risk Detection
Introduced the
RiskEngine, using an AST visitor and evidence-trace foundation to evaluate potential code risks.Security-focused checks
SQL injection detection.
Missing authorization checks.
Hardcoded secret detection.
Server-Side Request Forgery (SSRF) detection.
Authentication-related policy checks.
Sensitive-field leak checks.
Resource ownership and related rule enforcement.
Reliability-focused checks
Unhandled null database-query results.
Unhandled asynchronous operations, including the
PC-REL-006detector.Test-fixture filtering.
Finding deduplication.
The risk engine also introduces the collection and representation of evidence associated with detected risks.
These capabilities establish the initial security and reliability analysis layer. The findings should be treated as automated detection results that require appropriate validation rather than as a guarantee that every vulnerability will be identified.
10. Verification and Test Execution
Added the
TestRunnercomponent and its command-execution helper.The runner includes:
Package-manager detection through lockfiles.
Type-check execution.
Lint execution.
Test execution.
Build execution.
This provides a unified execution layer for gathering verification results from the project's existing development tools.
11. ProofCode Engine Orchestration
Introduced the
ProofCodeEngineto coordinate the analysis workflow.The engine work includes:
Initializing the engine and verification options.
Orchestrating Git diff collection, AST parsing, and dependency-graph impact analysis.
Implementing transparent score deductions.
Adding verdict logic.
Defining the
BreakageRiskItemmodel and collection pipeline.Detecting downstream authentication and core-service breakage risks.
Mapping rule violations and untested dependents into breakage-risk results.
This orchestration layer connects the individual analysis components into a coordinated change-verification pipeline.
12. Reporting and Result Serialization
Introduced the
ReportFormatterfor transforming analysis results into consumable output formats.Markdown reporting
Added tables.
Included evidence traces.
Structured analysis findings for readable reports.
Additional output formats
Added terminal serialization through
toTerminal.Added JSON serialization through
toJson.The formatter provides a common reporting layer for presenting findings across different development and automation environments.
13. VS Code Analysis Tree and Evidence Navigation
Introduced the
ProofCodeTreeDataProviderand tree-item models.The editor-facing functionality includes:
Root category nodes.
Evidence-jump commands.
A What Could Break tree node.
Dynamic refresh event handling.
These additions establish a navigable representation of analysis findings inside the VS Code interface, with commands for jumping to supporting evidence.
14. GitHub Actions Continuous Integration
Added the initial GitHub Actions CI workflow structure.
The workflow configuration includes:
A Node.js version matrix.
Test execution steps.
Bundle verification.
CLI validation.
VSIX packaging checks.
This establishes an automated CI foundation for validating the project across configured Node.js versions and checking important build and distribution artifacts.
Technical Architecture
The components introduced in this pull request form the following high-level workflow:
The diagram represents the intended component responsibilities reflected in the commit history; it is a conceptual overview rather than a claim that every execution path has already been fully validated.
Pull Requests Included
This comparison incorporates the following pull requests:
PR | Area | Primary contribution -- | -- | -- #1 | Git configuration | Standard ignore rules #2 | Linting | ESLint and TypeScript ESLint setup #3 | TypeScript | Compiler configuration and strict checks #4 | Package manifest | Extension metadata, views, commands, and configuration schema #5 | Dependencies | Dependency lockfile #6 | Testing | Vitest configuration and coverage setup #7 | Build | esbuild configuration, CLI target, minification, and watch mode #8 | Packaging | VSIX inclusion and exclusion rules #9 | VS Code development | Extension-host launch and demo workspace configuration #10 | UI assets | SVG shield icon and theme compatibility #11 | Rules | Architectural policies and project rules #12 | CI | GitHub Actions workflow and validation steps #13 | Type definitions | Shared analysis, verification, and risk models #14 | Git parsing | Diff parsing and modified-line tracking #15 | Git service | Branch discovery, status parsing, and untracked-file handling #16 | AST analysis | TypeScript AST inspection and Next.js endpoint detection #17 | Dependency graph | Module relationships and change-impact analysis #18 | Risk analysis | SQL injection, authorization, secret, and SSRF detection #19 | Reliability analysis | Null-result and asynchronous-operation checks #20 | Rules engine | Authentication, sensitive-data, ownership, and testing policies #21 | Test runner | Package-manager detection and verification command execution #22 | Core engine | Analysis orchestration, scoring, and verdict logic #23 | Breakage analysis | Downstream service risks and untested dependents #24 | Reporting | Markdown, terminal, and JSON output #25 | VS Code interface | Analysis tree, evidence navigation, and dynamic refreshImpact
Developer Experience
Establishes the initial ProofCode development and extension workflow.
Provides structured commands and tree-based navigation for examining findings.
Adds consistent build, lint, test, and type-check configuration.
Change Analysis
Establishes Git diff parsing and exact modified-line tracking.
Introduces AST inspection and project dependency relationships.
Provides a foundation for evaluating the potential impact of code changes.
Security and Reliability
Introduces detection for several security and reliability risk categories.
Adds architectural rules and evidence-oriented findings.
Connects rule violations and untested dependencies to breakage-risk analysis.
Verification and Distribution
Establishes a unified verification runner and multi-format reporting.
Adds build optimization and VSIX packaging rules.
Introduces GitHub Actions checks for testing, bundle verification, CLI validation, and packaging.
Validation Notes
The comparison includes test configuration, impact-analysis test coverage, and CI workflow setup. However, the supplied commit listing also shows several entries with 0 / 2 checks OK.
Consequently, this pull request description does not claim that all tests or CI checks have passed. The current workflow results should be reviewed, and the relevant type-checking, linting, tests, build, CLI, and VSIX validation steps should be confirmed before merging.
Summary
This pull request establishes the foundational architecture of ProofCode, spanning repository change inspection, TypeScript AST analysis, dependency-graph impact assessment, security and reliability rules, verification execution, risk scoring, report serialization, and VS Code integration.
It also adds the supporting configuration, development tooling, packaging, and CI infrastructure needed to continue building and validating the project.
The result is a modular foundation for a code-change analysis and verification tool designed to help developers understand potential breakage, inspect evidence, and evaluate important risks before integrating changes.