·
74 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
v1.2.24
CytoScnPy 1.2.24 improves analyzer correctness, dependency-rule precision, CI failure gates, VS Code diagnostics, MCP compatibility, and long-term maintainability of several high-complexity Rust analysis paths.
Highlights
- Fixed method/function classification for nested Python definitions so local functions inside methods are no longer mistaken for class methods when unused-code analysis builds the function graph.
- Refactored major analyzer hotspots into focused modules for linter traversal, call graph traversal, complexity traversal, LCOM4, clone grouping, whitelist generation, GitHub report output, confidence penalties, entropy recognition, and XML danger analysis.
- Added the
--fail-on-anyconvenience flag for CI/CD workflows and broadened failure-gate handling so strict scans can be enabled from one preset. - Improved VS Code integration so the extension respects project configuration for scan enablement and thresholds, and surfaces more result categories as editor diagnostics.
- Reworked dependency analysis around CytoScnPy rule IDs
CSP-R001throughCSP-R005, including transitive dependencies, stdlib declarations, and dev dependencies used from production code. - Reduced dependency false positives for dev/test support files such as
conftest.pyandnoxfile.py, while keeping production dependency misuse detectable. - Upgraded
pyo3to0.29.0and refreshed Python package build validation for the optional Python bindings path. - Updated the VS Code extension lockfile dependency
shell-quotefrom1.8.3to1.8.4.
Analyzer Correctness
- Fixed nested-function handling in the visitor metadata path by checking the current syntactic scope instead of treating every definition under an outer class as a method.
- Added regression coverage proving local functions inside methods are classified and reported based on their actual usage.
- Preserved method detection for real class-body functions while avoiding false unused-code behavior for local helper functions nested inside methods.
Analyzer Maintainability
- Split linter statement and expression traversal out of the large linter visitor implementation.
- Split taint call graph traversal into statement, expression, and pattern traversal modules.
- Split block-complexity traversal, LCOM4 graph/visitor logic, clone grouping, clone suggestions, entropy statement/block traversal, and XML danger analysis into focused files.
- Moved analyzer confidence penalty scoring into a dedicated
confidence_penaltiesmodule. - Simplified pyproject dependency parsing and fix-plan statistics handling.
- Updated MCP server metadata construction for the newer
rmcpAPI and bumped workspace/tool metadata for the 1.2.24 line.
CLI And Failure Gates
- Added
--fail-on-anyfor the main analysis command as a CI-friendly preset for supported failure gates. - Extended gate context handling so fail gates can enable the scan categories they depend on.
- Improved dependency-subcommand failure behavior so root-level
--fail-on-any deps ...reaches dependency gates. - Added regression coverage for fail-gate behavior in main analysis and dependency analysis paths.
- Documented the new gate behavior in the CLI and pre-commit documentation.
VS Code Integration
- Updated the VS Code client to honor
.cytoscnpy.tomlandpyproject.tomlscan enablement and threshold settings. - Kept explicit VS Code settings as overrides when a user sets extension-level flags.
- Expanded VS Code result parsing so Problems can surface unused/dead code, secrets, danger, quality, taint, clone, parse-error, and dependency findings.
- Fixed dependency diagnostic anchors so findings point at files such as
pyproject.tomlinstead of directory paths that cannot be opened as diagnostics. - Added TypeScript regression coverage for the expanded result transformation behavior.
Dependency Analysis
- Introduced CytoScnPy dependency rule IDs:
CSP-R001for unused declared dependencies.CSP-R002for missing declared dependencies.CSP-R003for transitive dependency imports.CSP-R004for dev dependencies imported from production code.CSP-R005for stdlib modules declared as dependencies.
- Changed dev dependencies so they are not reported as unused by default;
--include-dev-unusedrestores stricter dev-unused reporting when desired. - Added dependency output categories for dev dependencies used in production, stdlib dependency declarations, and transitive dependencies.
- Improved dependency discovery and reporting through the main analysis path,
cytoscnpy deps, JSON snapshots, and report-format tests. - Added documentation pages for the new dependency rule IDs and linked them through MkDocs.
False-Positive And Regression Coverage
- Added dependency regressions for dev dependency imports in
conftest.pyandnoxfile.py. - Aligned dependency import classification with shared test/dev path handling so dev-support files are not treated as production usage for
CSP-R004. - Added quality and danger regression coverage showing path-aware danger rules suppress expected test/dev-support cases while always-on danger rules and quality rules keep their intended behavior.
- Added mitigation-aware danger-rule examples for unsafe versus validated/sanitized code paths, covering rules such as SSRF, SQL injection, command injection, path traversal, XML parsing, and unsafe deserialization patterns.
- Fixed dependency review feedback so a dependency declared in both production and dev groups does not trigger a production false positive solely because the duplicate dev declaration exists.
Security And Dependency Updates
- Upgraded optional Python-binding dependency
pyo3to0.29.0. - Added a narrow Dependency Review license override for
pyo3after Cargo metadata reportedMIT OR Apache-2.0while GitHub dependency review still treated the direct manifest dependency as unknown-license noise. - Updated
shell-quotein the VS Code extension lockfile from1.8.3to1.8.4, including the upstream object-token validation fix. - Refreshed
requirements-dev.txtanduv.lockto address dependency-audit findings and keep the repo hooks aligned with the lockfile.
Merged Changes
- #97
fix(visitor): correctly identify methods using scope stackby @djinn-soul- Fixed nested local-function classification inside methods.
- Added unused-code regression coverage for the corrected scope behavior.
- #98
Fix/crapthingby @djinn-soul- Refactored high-complexity analyzer, visitor, linter, clone, taint, metrics, and reporting paths.
- Updated
rmcpintegration and bumped version metadata for the 1.2.24 release line.
- #102
feat(cli): add --fail-on-any flag and improve VS Code integrationby @djinn-soul- Added the CI-friendly
--fail-on-anypreset and related gate behavior. - Improved VS Code config handling and diagnostic parsing.
- Upgraded
pyo3and expanded validation around failure gates and editor behavior.
- Added the CI-friendly
- #99
chore(deps-dev): bump shell-quote from 1.8.3 to 1.8.4by @dependabot[bot]- Updated the VS Code extension lockfile dependency.
- #104
Fix/dep messay thing rewriteby @djinn-soul- Reworked dependency analysis into explicit
CSP-R001throughCSP-R005categories. - Added dependency rule documentation, JSON/report output coverage, false-positive regressions, and dependency-review fixes.
- Reworked dependency analysis into explicit
Full Changelog: v1.2.23...v1.2.24