-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Enforce policy checks for overridden apply reqs #3960
Merged
GenPage
merged 7 commits into
runatlantis:main
from
danielfm:enforce-policy-check-for-overriden-apply-reqs
Dec 12, 2023
Merged
fix: Enforce policy checks for overridden apply reqs #3960
GenPage
merged 7 commits into
runatlantis:main
from
danielfm:enforce-policy-check-for-overriden-apply-reqs
Dec 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danielfm
changed the title
Enforce policy checks for overriden apply reqs
fix: Enforce policy checks for overriden apply reqs
Nov 8, 2023
This new version only includes the 'policies_passed' req back if policy checks are enabled for the project.
danielfm
changed the title
fix: Enforce policy checks for overriden apply reqs
fix: Enforce policy checks for overridden apply reqs
Nov 9, 2023
@jamengual The spelling errors were corrected! 😄 |
jamengual
added
waiting-on-review
Waiting for a review from a maintainer
conftest-policy
labels
Nov 15, 2023
GenPage
approved these changes
Dec 12, 2023
GenPage
added
bug
Something isn't working
and removed
waiting-on-review
Waiting for a review from a maintainer
labels
Dec 12, 2023
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
* Enforce policy checks for overriden apply reqs * Another take on the fix This new version only includes the 'policies_passed' req back if policy checks are enabled for the project. * Fix test * Fix comment * Fix spelling --------- Co-authored-by: PePe Amengual <[email protected]>
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
* Enforce policy checks for overriden apply reqs * Another take on the fix This new version only includes the 'policies_passed' req back if policy checks are enabled for the project. * Fix test * Fix comment * Fix spelling --------- Co-authored-by: PePe Amengual <[email protected]>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
Keeps the
policies_passed
apply requirement for projects that override the apply requirements via the repo levelatlantis.yaml
file.why
Without this change, projects that override the apply requirements via the repo level
atlantis.yaml
file do not include thepolicies_passed
requirement even when policy checks is enabled, which ultimately allows bypassing policy checking approval when a policy fails and at least 1 approval is required.I believe this is a security issue, as many Atlantis installations use conftest policies to enforce security best practices or to protect against misuse, i.e. block the removal of critical resources, and it's expected that these policies are enforced when policy checks is enabled.
tests
Added two new unit tests, to ensure that:
apply_requirements
always includepolicies_passed
if policy checks are enabledapply_requirements
are kept as-is if policy checks are disabledreferences
policies_passed
requirement removed when overriden in repo level configuration #3908