-
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
[Bug] unable to unmarshal conftest output or Anyone able to approve Atlantis policy failures #4243
Comments
similar issuer reported here : #4308 |
I hope this issue is getting traction, our team really needs to upgrade Atlantis but we cant since custom policies were introduced, this policy approval bug has been an issue. Anyone can approve policies, so policy set approvers doesnt even matter. :/ |
We're running into this issue too. We might need a reproducible example here.
|
cc @bgalkows @pseudomorph if you folks have seen this in your environments |
I have not had any issues. I'm fairly confident that the issue lies in the conftest command. The policy check logic expects json output from conftest, and it's being set to table. Try changing I believe someone also introduced a flag which allows for custom policy commands to bypass this logic, if that's what's desired. I cannot find it at the moment though.. |
Oh apologies, I see that it was specified above -- So, my previous comment should address issue 2 (unmarshaling error). I'm not 100%, but I imagine issue 1 (anyone can approve) is likely due to bypassing the granular policy logic when |
Can you go into a bit more detail about the anyone can approve issue? Is the "anyone" a user who is explicitly listed or is a member of a listed team in your config? |
Wow, I'm glad you tagged me in this bug. The issue comes from defaulting all custom policy checks into an undefined policy set called "Custom", which as a result has no user approval restrictions. I spun up a PR with the fix: #5331 |
My company is using Atlantis in "maintenance mode" as we shift to another actuation tool so we don't pull new releases and use an internal fork. This bug was noticed a long time ago and a coworker implemented the fix - I wish we'd thought to contribute it here too |
Community Note
Overview of the Issue
Anyone ( non policy owners ) able to approve Atlantis policy failures ( seems major bug )
I am using below server config with
custom_policy_check: true
&policy_check: true
if I use
custom_policy_check: false
&policy_check: true
i get theunable to unmarshal conftest output
errorBut based on this documentation https://www.runatlantis.io/docs/policy-checking.html#step-2-define-the-policy-configuration we tried the config as i mentioned below
Reproduction Steps
Nothing special just used Alpine image and added the below server-side workflow and repo side workflow then triggered policy failure, if anyone comments the
atlantis approve_policies
policy failures are fixed with approvalLogs
Issue screen shot
Environment details
If not already included, please provide the following:
ECS environment variables
Atlantis server-side config file:
Repo
atlantis.yaml
file:Our Atlantis is deployed in ECS fargate with
ghcr.io/runatlantis/atlantis:v0.27-alpine
Additional Context
The text was updated successfully, but these errors were encountered: