Skip to content

Upgrade golangci lint to 2.10.1#787

Open
anthony-gomez-fastly wants to merge 6 commits intomainfrom
upgrade-golangci-lint-to-2.10.1
Open

Upgrade golangci lint to 2.10.1#787
anthony-gomez-fastly wants to merge 6 commits intomainfrom
upgrade-golangci-lint-to-2.10.1

Conversation

@anthony-gomez-fastly
Copy link
Contributor

Change summary

Upgrades to 2.10.1 golang-ci-lint, and adds comments for the false positives detected

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Copy link
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

I’m fine with the golangci-lint upgrade itself, but I think the new suppression comments should be more specific and consistent.

For the G117 suppressions, “this is a false positive” is too vague. Please document why each finding is safe to ignore (e.g., the field/tag mirrors the external Fastly API schema or required request payload, and this is not a hardcoded secret or an accidental serialization/leak).

For the G704 suppressions, some justifications are still weak. In particular, “URL is parsed and validated” / “properly formatted URL” doesn’t establish SSRF safety. If we’re going to suppress, the comment should state the invariant clearly (e.g., requests are constructed from the configured Fastly API endpoint plus validated/escaped path components, so caller input cannot change the outbound host/scheme).

Happy to keep the lint upgrade, but I’d like the suppressions updated with clearer rationale before merging.

@kpfleming
Copy link
Contributor

Somewhat random question: were there any cases where G117 reported an issue and we didn't suppress it? If the answer is no, then maybe we should just consider disabling G117 globally for the codebase instead of at each location where it would emit a warning.

@anthony-gomez-fastly
Copy link
Contributor Author

@kpfleming nope, all were suppressed. Will disable if @philippschulte agrees

@philippschulte
Copy link
Member

philippschulte commented Mar 11, 2026

I haven't even thought about disabling it globally. I think that is much better and I support that. Thanks!

@anthony-gomez-fastly anthony-gomez-fastly force-pushed the upgrade-golangci-lint-to-2.10.1 branch from e82529d to 15ce99e Compare March 11, 2026 15:35
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.

3 participants