-
Notifications
You must be signed in to change notification settings - Fork 660
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
Issue since v6.6.0 with a warning "Attempting to decrypt but no vault secrets found" for all group_vars files with vault variables #2506
Comments
It’s not clear to me what action I’m expected to take to resolve this. Expose secrets to a linter? |
@AndrewKvalheim Yes, good question, and thinking: May I suggest regarding your comment and question? The linter should know about the " For this, exposing the secrets to the linter does not look necessary to me. More the contrary, as the current diagnostic message suggests to me, not only should the secrets not be exposed to the linter, but, the linter should not expose the parsing of the encrypted value/s at and after the point the linter starts to require secrets to do its job. To resolve this, I'd suggest to build-back the parsing of In my opinion, the linter not being able to transform a secret into a plain is not an error or a warning, not even something to inform about or to offer diagnostics for. The current messages' only reason to exist - as I understand it - is to inform any user of the utility 3 about its limitations and the flaw to process Ansible documents containing Rationale is that this is a linter, not a decrypter. 4 From your perspective, would you consider such another reduced approach more feasible than the proposed disclosing publishing of ansible vault password stores to the linter? Or would what I've outlined actually break the overall linting infrastructure of the current design?
/EE: typo, better archived version. |
We updated Ansible to current stable recently and it needed changes for the remote CI pipeline we have for
With the verbatim fake data " DetailsIn use in this scenario was the Microsoft Github Action The error message with the missing file:
Ansible configuration in project: $ ansible-lint --version
ansible-lint 6.14.4 using ansible 2.14.4
$ ansible-vault --version
ansible-vault [core 2.14.4]
config file = /home/user/workspace/group/project/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/workspace/group/project/.direnv/python-venv-3.10.6/lib/python3.10/site-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /home/user/workspace/group/project/.direnv/python-venv-3.10.6/bin/ansible-vault
python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] (/home/user/workspace/group/project/.direnv/python-venv-3.10.6/bin/python)
jinja version = 3.1.2
libyaml = True It is a bit early, but it looks to me that it is already possible with ansible-lint 6.14.4 using ansible 2.14.4 to not provide real credentials without any further errors, which is good in my eyes. The Ansible Vault configuration still leaks through though. @alice-rc Maybe you want to try the current version with a setup that is using the environment parameter |
Summary
All versions since 6.6.0 (6.6.1, 6.7.0) now report the following for all group_vars files with vaulted variables.
NOTE: the environment variable ANSIBLE_VAULT_PASSWORD_FILE is set.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
STEPS TO REPRODUCE
Can't provide you with the ACTUAL group_vars files, but they are standard vault encrypted variables. One example is below.
Desired Behavior
I want to understand what this error actually means, since it is clearly NOT an error or warning coming from yamllint. And it also didn't happen in any of the versions of ansible-lint that I tried that were lower than v6.6.0.
Actual Behavior
The text was updated successfully, but these errors were encountered: