Skip to content

Conversation

@agateau-gg
Copy link
Collaborator

Context

ggshield 1.44 introduced the --insecure option to replace the ambiguous --allow-self-signed. This PR makes similar changes to the VSCode extension.

What has been done

  • Introduce a new setting: insecure.
  • Mark the allowSelfSigned setting as deprecated.
  • Call ggshield with --insecure instead of --allow-self-signed.

PR check list

  • As much as possible, the changes include tests
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry.

@agateau-gg agateau-gg requested a review from a team as a code owner October 28, 2025 15:19
Copy link
Contributor

@sevbch sevbch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple comments

Also, adding @GabrielCousin as reviewer as he's a typescript expert

): Promise<GGShieldConfiguration> {
const config = workspace.getConfiguration("gitguardian");

const ggshieldPath: string | undefined = config.get("GGShieldPath");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's worth keeping for local debugging

"type": "boolean",
"default": false,
"markdownDescription": "Allow Self Signed Certificates"
"markdownDescription": "Allow Self Signed Certificates",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the option still showing on the extension settings? Can you share a screenshot?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not a title, I'd suggest Allow self-signed certificates without capitalization.

@sevbch sevbch requested a review from GabrielCousin October 29, 2025 09:15
const insecure: boolean = config.get(
"insecure",
// Read allowSelfSigned for backward compatibility
config.get("allowSelfSigned", false),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if it could make sense to use a notification if the deprecated setting is still present? https://code.visualstudio.com/api/ux-guidelines/notifications
On one hand, it's seemless for the user but on the other hand, you can't know about the deprecation very easily, right?

});

const testCasesAllowSelfSigned = [
const testCasesInsecure = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe consider temporarily keeping a test that asserts the --insecure flag is forced if providing allowSelfSigned?

Copy link

@6d7a 6d7a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some orthography suggestions.

"type": "string",
"default": "",
"markdownDescription": "You can override the value here for On Premise installations"
"markdownDescription": "You can override the value here for On Premise installations",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change On Premise to on-premises?

"type": "boolean",
"default": false,
"markdownDescription": "Allow Self Signed Certificates"
"markdownDescription": "Allow Self Signed Certificates",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not a title, I'd suggest Allow self-signed certificates without capitalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants