Release 1.2.0#4
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares the repository for the 1.2.0 release by bumping versions across the Python package and VS Code extension, and by improving handling of Windows-style C:\...:line locations in both the extension UI and SARIF generation.
Changes:
- Fix Windows drive-letter path parsing for finding display (tree) and SARIF artifact locations.
- Add/propagate a
risk_summaryfield in the VS Code extension’s recomputed score payload (aligned with the Python scorer messaging). - Bump project/extension versions to
1.2.0across Python + npm packaging metadata.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-src/findingsTree.ts | Improves basename extraction for location strings, including Windows C:\...:line formats. |
| vscode-src/extension.ts | Adds grade→risk summary mapping and adjusts recomputed score’s attack_surface + risk_summary. |
| tests/test_reporter.py | Adds SARIF regression coverage for Windows drive paths. |
| src/contractguard/reporter.py | Updates SARIF location parsing to preserve Windows drive paths; bumps SARIF tool version. |
| src/contractguard/init.py | Bumps Python package version to 1.2.0. |
| pyproject.toml | Bumps Python package version to 1.2.0. |
| package.json | Bumps VS Code extension version to 1.2.0 and updates vsix output name. |
| package-lock.json | Updates lockfile metadata to 1.2.0 and aligns package name metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+23
to
+31
| function locationBasename(location: string): string { | ||
| const separator = location.lastIndexOf(':'); | ||
| if (separator > 1) { | ||
| const suffix = location.slice(separator + 1); | ||
| if (/^\d+$/.test(suffix)) { | ||
| return path.basename(location.slice(0, separator)); | ||
| } | ||
| } | ||
| return path.basename(location); |
| .map((item) => item.attack_vector) | ||
| .filter((attackVector) => typeof attackVector === 'string' && attackVector.trim().length > 0) | ||
| ) | ||
| ]; |
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.
No description provided.