-
Notifications
You must be signed in to change notification settings - Fork 138
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
add support for cloudflare_web_analytics_site #632
base: master
Are you sure you want to change the base?
Conversation
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic High Entropy Secret | 8f31489 | testdata/cloudflare/cloudflare_web_analytics_site.yaml | View secret |
- | Generic High Entropy Secret | 8f31489 | testdata/cloudflare/cloudflare_web_analytics_site.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
6c2cc21
to
e90d773
Compare
8c40b32
to
8f31489
Compare
this trips a few people up. the tool requires an initiliased terraform installation to read the schema from so if you're not running it in the same directory, you need to provide that location. for local testing, i have a terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
}
}
}
provider "cloudflare" {} i run |
@@ -44,6 +44,7 @@ var resourceImportStringFormats = map[string]string{ | |||
"cloudflare_turnstile_widget": ":account_id/:id", | |||
"cloudflare_waf_override": ":zone_id/:id", | |||
"cloudflare_waiting_room": ":zone_id/:id", | |||
"cloudflare_web_analytics_site": ":account_id/:id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll have to manually test this; i'm unsure what id
you're using here. i think you may want site_tag
given that is what is used in the import command docs (https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/web_analytics_site#import)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...or are import docs wrong and you should use id
to import?
} | ||
|
||
for i := 0; i < resourceCount; i++ { | ||
jsonStructData[i].(map[string]interface{})["zone_tag"] = jsonStructData[i].(map[string]interface{})["ruleset"].(map[string]interface{})["zone_tag"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated this to include the remapping as site_tag
doesn't exist at the top level in the API response but it does in the resource.
I kept getting
time="2023-11-06T23:38:49-06:00" level=fatal msg="failed to detect provider installation"
even after initializing the provider so I couldn't test locally.