Skip to content

Conversation

@wata727
Copy link
Member

@wata727 wata727 commented Apr 23, 2025

Potential fix for https://github.com/terraform-linters/tflint-ruleset-google/security/code-scanning/5

To fix the issue, the dot (.) in the regular expression should be escaped to ensure it matches a literal dot rather than any character. This can be done by replacing . with \.. Additionally, using a raw string literal (enclosed in backticks) avoids the need to double-escape the backslash, making the regular expression more readable. The corrected regular expression will be:

`github\.com/terraform-linters/tflint-plugin-sdk v(.+)`

This change ensures that the regular expression matches only the intended domain github.com and not any other unintended strings.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ssion for hostnames

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@wata727 wata727 marked this pull request as ready for review April 23, 2025 05:17
@wata727 wata727 enabled auto-merge (squash) April 23, 2025 05:18
@wata727 wata727 merged commit 7b166f2 into master Apr 23, 2025
11 checks passed
@wata727 wata727 deleted the alert-autofix-5 branch April 23, 2025 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants