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

fix: add KMS policy statement only if key given #1258

Merged
merged 4 commits into from
Mar 3, 2025
Merged

Conversation

kayman-mk
Copy link
Collaborator

Description

As we assumed that the KMS key is always present (why isn't it?), the policy is created without any resource in case we don't have any key. This PR introduces a separate policy created only if the key is present.

Closes #1257

@kayman-mk kayman-mk requested a review from npalm as a code owner March 3, 2025 21:20
Copy link
Contributor

github-actions bot commented Mar 3, 2025

Hey @kayman-mk! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

  • the problem being solved
  • the best way a reviewer and you can test your changes

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

  • /help: notifies a maintainer to help you out

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

Copy link
Contributor

github-actions bot commented Mar 3, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ COPYPASTE jscpd yes no 1.4s
✅ REPOSITORY checkov yes no 18.1s
✅ REPOSITORY dustilock yes no 0.28s
✅ REPOSITORY gitleaks yes no 1.0s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY grype yes no 10.92s
✅ REPOSITORY secretlint yes no 0.68s
✅ REPOSITORY syft yes no 1.13s
✅ REPOSITORY trivy-sbom yes no 0.08s
✅ REPOSITORY trufflehog yes no 2.68s
✅ SPELL cspell 3 0 2.02s
✅ TERRAFORM terraform-fmt 2 0 0 0.1s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@kayman-mk kayman-mk merged commit 7635c21 into main Mar 3, 2025
18 checks passed
@kayman-mk kayman-mk deleted the kayma/kms-policy branch March 3, 2025 21:28
kayman-mk pushed a commit that referenced this pull request Mar 3, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.1.1](9.1.0...9.1.1)
(2025-03-03)


### Bug Fixes

* add KMS policy statement only if key given
([#1258](#1258))
([7635c21](7635c21)),
closes
[#1257](#1257)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: cattle-ops-releaser-2[bot] <134548870+cattle-ops-releaser-2[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

Version 9.1.0 tries to create a policy statement on empty resource
1 participant