diff --git a/.github/workflows/lint_build_publish.yml b/.github/workflows/lint_build_publish.yml index 251a3d8..60741cd 100644 --- a/.github/workflows/lint_build_publish.yml +++ b/.github/workflows/lint_build_publish.yml @@ -17,6 +17,11 @@ jobs: with: vs-version: '[17.0, )' + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x # dotnet 9 breaks "dotnet format" command: https://github.com/dotnet/sdk/issues/43017 + - name: Format check run: dotnet format --verify-no-changes --verbosity diagnostic diff --git a/CHANGELOG.md b/CHANGELOG.md index 6928fe9..05d30a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ## [Unreleased] +## [1.7.0] - 2024-12-11 + +- Add AI remediations for IaC and SAST + ## [1.6.1] - 2024-10-31 - Code refactoring @@ -69,6 +73,8 @@ The first public release of the extension. +[1.7.0]: https://github.com/cycodehq/visual-studio-extension/releases/tag/v1.7.0 + [1.6.1]: https://github.com/cycodehq/visual-studio-extension/releases/tag/v1.6.1 [1.6.0]: https://github.com/cycodehq/visual-studio-extension/releases/tag/v1.6.0 @@ -97,4 +103,4 @@ The first public release of the extension. [1.0.0]: https://github.com/cycodehq/visual-studio-extension/releases/tag/v1.0.0 -[Unreleased]: https://github.com/cycodehq/visual-studio-extension/compare/v1.6.1...HEAD +[Unreleased]: https://github.com/cycodehq/visual-studio-extension/compare/v1.7.0...HEAD diff --git a/global.json b/global.json new file mode 100644 index 0000000..9cdb723 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "8.0.404", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/source.extension.vsixmanifest b/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/source.extension.vsixmanifest index e97798b..9d152c5 100644 --- a/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/source.extension.vsixmanifest +++ b/src/extension/Cycode.VisualStudio.Extension.14.0-16.0/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Cycode Cycode for Visual Studio IDE https://github.com/cycodehq/visual-studio-extension diff --git a/src/extension/Cycode.VisualStudio.Extension.17.0/source.extension.vsixmanifest b/src/extension/Cycode.VisualStudio.Extension.17.0/source.extension.vsixmanifest index d32cd0f..dd63434 100644 --- a/src/extension/Cycode.VisualStudio.Extension.17.0/source.extension.vsixmanifest +++ b/src/extension/Cycode.VisualStudio.Extension.17.0/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Cycode Cycode for Visual Studio IDE https://github.com/cycodehq/visual-studio-extension diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AuthCheckResult.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs similarity index 64% rename from src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AuthCheckResult.cs rename to src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs index 3292e88..b265dd4 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AuthCheckResult.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs @@ -1,10 +1,8 @@ -#nullable enable - using Newtonsoft.Json; namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO; -public class AuthCheckResult { +public class AiRemediationResult { [JsonProperty(Required = Required.Always)] public bool Result { get; set; } @@ -12,13 +10,13 @@ public class AuthCheckResult { public string? Message { get; set; } [JsonProperty(Required = Required.AllowNull)] - public AuthCheckResultData? Data { get; set; } + public AiRemediationResultData? Data { get; set; } } -public class AuthCheckResultData { +public class AiRemediationResultData { [JsonProperty(Required = Required.Always)] - public string? UserId { get; set; } + public string Remediation { get; set; } [JsonProperty(Required = Required.Always)] - public string? TenantId { get; set; } + public bool IsFixAvailable { get; set; } } \ No newline at end of file diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/ScanResult/DetectionBase.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/ScanResult/DetectionBase.cs index e7d67e0..42154a5 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/ScanResult/DetectionBase.cs +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/ScanResult/DetectionBase.cs @@ -1,6 +1,7 @@ namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO.ScanResult; public abstract class DetectionBase { + public string Id { get; set; } public string Severity { get; set; } public abstract DetectionDetailsBase GetDetectionDetails(); public abstract string GetFormattedMessage(); diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs new file mode 100644 index 0000000..5cf6741 --- /dev/null +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs @@ -0,0 +1,37 @@ +using Newtonsoft.Json; + +namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO; + +public class StatusResult { + [JsonProperty(Required = Required.Always)] + public string Program { get; set; } + + [JsonProperty(Required = Required.Always)] + public string Version { get; set; } + + [JsonProperty(Required = Required.Always)] + public bool IsAuthenticated { get; set; } + + [JsonProperty(Required = Required.AllowNull)] + public string? UserId { get; set; } + + [JsonProperty(Required = Required.AllowNull)] + public string? TenantId { get; set; } + + [JsonProperty(Required = Required.Always)] + public SupportedModulesStatus SupportedModules { get; set; } +} + +public class SupportedModulesStatus { + // TODO(MarshalX): respect enabled/disabled scanning modules + [JsonProperty(Required = Required.Always)] + public bool SecretScanning { get; set; } + [JsonProperty(Required = Required.Always)] + public bool ScaScanning { get; set; } + [JsonProperty(Required = Required.Always)] + public bool IacScanning { get; set; } + [JsonProperty(Required = Required.Always)] + public bool SastScanning { get; set; } + [JsonProperty(Required = Required.Always)] + public bool AiLargeLanguageModel { get; set; } +} \ No newline at end of file diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/VersionResult.cs b/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/VersionResult.cs deleted file mode 100644 index 2f118e5..0000000 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/VersionResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Newtonsoft.Json; - -namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO; - -public class VersionResult { - [JsonProperty(Required = Required.Always)] - public string Name { get; set; } - - [JsonProperty(Required = Required.Always)] - public string Version { get; set; } -} \ No newline at end of file diff --git a/src/extension/Cycode.VisualStudio.Extension.Shared/Components/ToolWindows/AuthControl.xaml b/src/extension/Cycode.VisualStudio.Extension.Shared/Components/ToolWindows/AuthControl.xaml index 794bdd6..5f67d8e 100644 --- a/src/extension/Cycode.VisualStudio.Extension.Shared/Components/ToolWindows/AuthControl.xaml +++ b/src/extension/Cycode.VisualStudio.Extension.Shared/Components/ToolWindows/AuthControl.xaml @@ -4,10 +4,6 @@ xmlns:toolWindows="clr-namespace:Cycode.VisualStudio.Extension.Shared.Components.ToolWindows"> - - Cycode extension requires pre-installed authentication to work. - -