Skip to content

Tags: microsoft/DevSkim

Tags

VSCode_v1.0.65

Toggle VSCode_v1.0.65's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add release npmrc and update registry handling (#700)

* Add release npmrc and update registry handling

Renamed .npmrc to .npmrc.pr and added .npmrc.release for release builds. Updated package.json scripts to support separate registry URLs for pre-release and release, and modified updatePackageLock.js to accept registry URL as an argument for more flexible registry rewriting.

* Update Changelog.md

* Add restore-net-release script to package.json

Introduces a new npm script 'restore-net-release' for restoring .NET dependencies using the release configuration. Updates 'pipeline-pack-release' to use this new script for improved release build handling.

* Update devskim-vscode-release.yml

v1.0.63

Toggle v1.0.63's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bumps npm dependencies and DevSkim .NET dependencies, Fix #697 (#698)

* Bumps npm dependencies

* Update Changelog.md

* Fix #697

Populate the Description or Recommendation fields in the markdown description since that is what ends up rendered when used in github code scanning per report in #697 of inability to customize message with custom rules.

* Clean up and changelog update

* Add unit tests for SarifWriter help field logic

Introduces SarifWriterTests to verify SARIF help field population for rules with various combinations of recommendation, description, and rule info. Tests cover fallback logic, markdown formatting, and edge cases such as empty or whitespace recommendations.

* Update DevSkim-DotNet/Microsoft.DevSkim.CLI/Writers/SarifWriter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor SARIF rule markdown description logic

Extracted markdown description building into a new BuildMarkdownDescription method for improved readability and maintainability. The logic for constructing the SARIF rule's Help.Markdown field is now encapsulated in a dedicated helper function.

* Refactor SarifWriterTests to use local writers

Replaces class-level StringWriter and SarifWriter fields with local variables in each test method. This improves test isolation and resource management by using 'using' statements for disposable objects.

* Refactor SARIF output parsing in tests

Replaced calls to the ParseSarifOutput helper with direct usage of JObject.Parse in SarifWriterTests. Removed the now-unused ParseSarifOutput method for simplification.

* Rename SarifWriter test methods for clarity

Test method names in SarifWriterTests.cs were updated to use descriptive, behavior-driven naming. This improves readability and makes test purposes clearer for future maintenance.

* Remove unused Patterns property in SarifWriterTests

Eliminated the Patterns property from the test case object initialization in SarifWriterTests.cs, as it was not required for the test.

* Refactor SARIF rule text description logic

Moved the logic for building SARIF rule text descriptions into a dedicated BuildTextDescription method for improved readability and maintainability.

* Add test for empty markdown in SARIF rule help

Introduces a unit test to verify that when a rule has no recommendation and no rule info, the SARIF 'help.markdown' field is empty or null, while 'help.text' falls back to the rule description.

* Update changelog for v1.0.63 with fixes and tests

Added details for version 1.0.63 including a fix for Sarif Markdown recommendation value population (#697), new test cases for SarifWriter, and updated dependencies. Fixed some section header levels to improve formatting.

* Remove redundant test for SARIF markdown help content

Deleted the test 'When_rule_has_recommendation_and_rule_info_then_markdown_includes_both' from SarifWriterTests.cs as it was redundant with `When_rule_has_recommendation_and_rule_info_then_markdown_is_properly_formatted`

* Dependencies in checked in package-lock file should use npmjs repository

The internal repository is substituted during pipeline build to allow for external contributor use

* Refactor SARIF help URI construction and update tests

Introduced a CreateHelpUri method in SarifWriter to safely construct help URIs for DevSkim rules, handling null or empty RuleInfo values. Updated related unit tests to use the new baseHelpUri constant for consistency and maintainability.

* Update tests to use SarifWriter.CreateHelpUri

Replaces references to SarifWriter.baseHelpUri with SarifWriter.CreateHelpUri in SarifWriterTests to ensure help URIs are generated consistently. This improves test accuracy and future-proofs against changes in URI construction.

* Rename baseHelpUri to BaseHelpUri in SarifWriter

Updated the constant baseHelpUri to use PascalCase (BaseHelpUri) for consistency with naming conventions. Adjusted references to the constant accordingly.

* Update SarifWriterTests to use exact string assertions

Changed tests to use Assert.AreEqual with expected markdown and help text strings instead of Assert.IsTrue with Contains. This ensures stricter validation of the output format.

* Update Changelog.md

* Refactor SarifWriterTests to reuse helpUri variable

Replaces repeated calls to SarifWriter.CreateHelpUri with a local helpUri variable in test assertions for expectedMarkdown. This improves readability and reduces redundant method calls.

* Change BaseHelpUri to private constant

Updated the visibility of the BaseHelpUri constant from public to private in SarifWriter.cs to restrict its access within the class.

* Change CreateHelpUri to internal access modifier

The CreateHelpUri method in SarifWriter was changed from public to internal to restrict its visibility within the assembly. This helps encapsulate implementation details and limits external usage.

* Update SarifWriter.cs

* Expose internals to test project and update method visibility

Added InternalsVisibleTo for Microsoft.DevSkim.Tests in the CLI project file to allow unit testing of internal members. Changed CreateHelpUri from public to internal in SarifWriter to restrict its visibility to within the assembly.

* Remove unused variable in AnalyzeTest.cs

Deleted the unused 'oneUpPath' variable from the test setup to clean up the code.

* Remove unused variable in SuppressionsTest

Deleted the unused 'oneUpPath' variable from the test method to clean up the code.

* Remove unused exception variable in regex creation

Eliminated the unused exception variable in the catch block of the regex creation method. Added a TODO comment noting the need to refactor for logging since the logger is not accessible in the static context.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

VSCode_v1.0.60

Toggle VSCode_v1.0.60's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Move GitHub Release tasks to separate explicitly release jobs (#692)

* Move GitHub Release tasks to separate explicitly release jobs

VS_v1.0.60

Toggle VS_v1.0.60's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Move GitHub Release tasks to separate explicitly release jobs (#692)

* Move GitHub Release tasks to separate explicitly release jobs

v1.0.59

Toggle v1.0.59's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Removes non-functional doc publish workflow (#691)

* Removes non-functional doc publish workflow

* Update Changelog.md

VSCode_v1.0.57

Toggle VSCode_v1.0.57's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Try Fix Launching with non-Ascii characters in path to Language Server (

#688)

* Try to fix handling of non-ascii characters

Per report in #687, try to fix proper handling of non-ascii characters in path to server modules

* Fix capitalization in tsconfig* Refine pack-ext task definition

* Run Npm Audit fix

* Update Changelog.md

VS_v1.0.57

Toggle VS_v1.0.57's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Try Fix Launching with non-Ascii characters in path to Language Server (

#688)

* Try to fix handling of non-ascii characters

Per report in #687, try to fix proper handling of non-ascii characters in path to server modules

* Fix capitalization in tsconfig* Refine pack-ext task definition

* Run Npm Audit fix

* Update Changelog.md

v1.0.56

Toggle v1.0.56's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Migrate to MTP from VSTest (#679)

* Migrate to MTP from VSTest

* Update Changelog.md

---------

Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>

v1.0.54

Toggle v1.0.54's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update Dependencies (#683)

* Update DevSkim .NET Dependencies

* Update VS Code Extension Dependencies

* Update Changelog.md

VSCode_v1.0.54

Toggle VSCode_v1.0.54's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update Dependencies (#683)

* Update DevSkim .NET Dependencies

* Update VS Code Extension Dependencies

* Update Changelog.md