Skip to content

Conversation

harshdev93
Copy link

Description:

This PR adds source in the payload for creating an ignore request. The source can be IDE/CLI depending on where the request is from. The source is determined from RuntimeInfo.

Jira: https://snyksec.atlassian.net/browse/IGNR-1709

Copy link

snyk-io bot commented Oct 3, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

snyk-io bot commented Oct 3, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@harshdev93 harshdev93 marked this pull request as ready for review October 6, 2025 09:47
@harshdev93 harshdev93 requested review from a team as code owners October 6, 2025 09:47
runtimeInfo := invocationCtx.GetRuntimeInfo()
if runtimeInfo != nil {
runtimeName := runtimeInfo.GetName()
if runtimeName == "snyk-ls" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not just send up the runtimeName instead of having this hard-coded string switching here? As this will break if another GAF consumer is added. For instance if we allow the MCP server to send up ignore approval requests.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't be opposed to a runtimeInfo.GetUserFriendlyName() being added, but that would require further coordination and approval from others.

Copy link
Author

Choose a reason for hiding this comment

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

We only want to identify if the request is from cli/ide, any other request source will be defaulted to Source : api. As long as Runtime names for cli/ide don't change, I think it works for us.

@harshdev93 harshdev93 requested a review from rrama October 7, 2025 08:34
@harshdev93 harshdev93 closed this Oct 9, 2025
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.

2 participants