Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supress gosec false positives #1228

Merged
merged 1 commit into from
Aug 22, 2023
Merged

supress gosec false positives #1228

merged 1 commit into from
Aug 22, 2023

Conversation

insumity
Copy link
Contributor

Description

gosec security scanner started failing recently with:

[x/ccv/types/events.go:38] - G101 (CWE-798): Potential hardcoded credentials (Confidence: LOW, Severity: HIGH)
    37: 	AttributeDistributionCurrentHeight = "current_distribution_height"
  > 38: 	AttributeDistributionNextHeight    = "next_distribution_height"

[x/ccv/consumer/types/keys.go:29] - G101 (CWE-798): Potential hardcoded credentials (Confidence: LOW, Severity: HIGH)
    28: 	// ConsumerToSendToProviderName is a "buffer" address for outgoing fees to be transferred to the provider chain
  > 29: 	ConsumerToSendToProviderName = "cons_to_send_to_provider"

Both are false positives because neither next_distribution_height or cons_to_send_to_provider are hardcoded credentials. This PR just adds annotations to suppress those 2 specific false positives.

Note, that we did not create an issue for this PR because this PR is rather minor.

@github-actions github-actions bot added C:x/consumer Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler labels Aug 22, 2023
@insumity insumity marked this pull request as ready for review August 22, 2023 09:53
@insumity insumity requested a review from a team as a code owner August 22, 2023 09:53
Copy link
Contributor

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

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

LGTM - the necessary (?) evil of having static analysis tools like this

@insumity insumity merged commit 4a7bd10 into main Aug 22, 2023
13 checks passed
@insumity insumity deleted the insumity/add-gosec-suppresion branch August 22, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/consumer Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants