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

Write log entry when Azure DevOps API Rate Limit is (nearly) reached #6285

Merged

Conversation

raherrebrugh
Copy link
Contributor

Azure Pipelines Scalar

  • Write log entry when Azure DevOps API Rate Limit is (nearly) reached

Checklist

Fixes #6284

Not related to other PRs

@raherrebrugh raherrebrugh requested a review from a team as a code owner October 30, 2024 13:25
Copy link

semgrep-app bot commented Oct 30, 2024

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.

Semgrep found 1 no-direct-write-to-responsewriter finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.

Ignore this finding from no-direct-write-to-responsewriter.

@raherrebrugh raherrebrugh force-pushed the feature/ado-ratelimit-warning branch from 95f03d4 to 37630d3 Compare October 30, 2024 14:49
@raherrebrugh
Copy link
Contributor Author

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context

Ignore this finding from context-todo.
Semgrep found 1 no-direct-write-to-responsewriter finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.

Ignore this finding from no-direct-write-to-responsewriter.

I haven't changed this code, how should I go about resolving these semgrep issues?

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

Nice improvement! Thanks 🙇

@JorTurFer
Copy link
Member

Semgrep found 1 context-todo finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Consider to use well-defined context
Ignore this finding from context-todo.
Semgrep found 1 no-direct-write-to-responsewriter finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.
Ignore this finding from no-direct-write-to-responsewriter.

I haven't changed this code, how should I go about resolving these semgrep issues?

Don't worry, I've ignored those findings for the PR and the check should pass now

@JorTurFer
Copy link
Member

JorTurFer commented Oct 30, 2024

/run-e2e pipeline
Update: You can check the progress here

@JorTurFer JorTurFer enabled auto-merge (squash) October 30, 2024 19:56
@JorTurFer JorTurFer disabled auto-merge November 3, 2024 11:56
@JorTurFer JorTurFer merged commit ea6adc4 into kedacore:main Nov 3, 2024
19 checks passed
mpechner-akasa pushed a commit to nrichardson-akasa/keda that referenced this pull request Nov 29, 2024
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.

[Azure Pipelines Scalar] Create log entry when Azure DevOps API rate limit is (nearly) reached
2 participants