Checkmarx / kics

Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle of your infrastructure-as-code with KICS by Checkmarx.
https://kics.io
Apache License 2.0
1.97k stars 295 forks source link

feat(query): add new query for tencentcloud TKE resource #7137

Closed SevenEarth closed 1 week ago

SevenEarth commented 1 week ago

Hello, There is something new query for TencentCloud TKE resource:

tke_cluster_has_public_access tke_cluster_log_disabled tke_cluster_encryption_protection_disabled

Please help review the PR Thanks

I submit this contribution under the Apache-2.0 license.

SevenEarth commented 1 week ago

This is my local test image

gitguardian[bot] commented 1 week ago

⚠️ GitGuardian has uncovered 16 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive2.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-50dc9786cd58a6826f3b71760508f8df3a699764e9da463ca30723f29e810c8bL74) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive1.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-b83710f1c2eeba94f4742babc175857ea5f9fbf311e665506e93de508f663996L99) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative1.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-bc4d0748558550cfaf39c525a1b995be2c8208e081f96d452c899befdf944bfcL72) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative1.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-bc4d0748558550cfaf39c525a1b995be2c8208e081f96d452c899befdf944bfcR72) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative1.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-bc4d0748558550cfaf39c525a1b995be2c8208e081f96d452c899befdf944bfcL93) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive2.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-50dc9786cd58a6826f3b71760508f8df3a699764e9da463ca30723f29e810c8bR74) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative2.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-063774bb4dfd099c243805b62d66fdc21e2732e7f419be9d8e89314a99b07dd8R73) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative2.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-063774bb4dfd099c243805b62d66fdc21e2732e7f419be9d8e89314a99b07dd8L73) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative2.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-063774bb4dfd099c243805b62d66fdc21e2732e7f419be9d8e89314a99b07dd8L95) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative2.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-063774bb4dfd099c243805b62d66fdc21e2732e7f419be9d8e89314a99b07dd8R95) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive1.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-b83710f1c2eeba94f4742babc175857ea5f9fbf311e665506e93de508f663996R99) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive1.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-b83710f1c2eeba94f4742babc175857ea5f9fbf311e665506e93de508f663996L75) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | a6d6119df1e1b37b83b5f7dcf25d75c354626f95 | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive2.tf | [View secret](https://github.com/Checkmarx/kics/commit/a6d6119df1e1b37b83b5f7dcf25d75c354626f95#diff-50dc9786cd58a6826f3b71760508f8df3a699764e9da463ca30723f29e810c8bL97) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive1.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-b83710f1c2eeba94f4742babc175857ea5f9fbf311e665506e93de508f663996R75) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/positive2.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-50dc9786cd58a6826f3b71760508f8df3a699764e9da463ca30723f29e810c8bR97) | | [-](https://dashboard.gitguardian.com/workspace/288351/incidents/secrets) | | Generic Password | c8ac2b104c4ce445394c5ba1bfba4581ae5208ab | assets/queries/terraform/tencentcloud/tke_cluster_has_public_access/test/negative1.tf | [View secret](https://github.com/Checkmarx/kics/commit/c8ac2b104c4ce445394c5ba1bfba4581ae5208ab#diff-bc4d0748558550cfaf39c525a1b995be2c8208e081f96d452c899befdf944bfcR93) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_password#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 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](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) 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.