hashicorp / hashicorp/vault-action

[BUG] Unable to retreive secrets with dot(s) in the name

Open
#592 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
513
Forks
166
Avg merge
6d 4h
Merged PRs (30d)
1

Description

## Vault server version
v1.21.1

## vault-action version
v3.4.0

## Describe the bug
When you want to retrieve a secret with dots in the name (es: ansible.service.user.username), you will have:

`"Error: Unable to retrieve result for data.data.ansible.service.user.username. No match data was found. Double check your Key or Selector. "
`

## To Reproduce
Save a vault secret with dot(s) in the name and try to retrieve it with the hashicorp/vault-action.
Something like:

- name: Import secret from Vault
uses: hashicorp/vault-action@4c06c5ccf5c0761b6029f56cfb1dcf5565918a3b # v3.4.0
with:
url: ${{ vars.VAULT_URL }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
solution/project/kv2/data/path/${{ matrix.platform }} ansible.service.user.username | ANSIBLE_USER ;

## Expected behavior
Retrieve the secret with a dot in the name

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the vault-action secrets input shown in the report, using a Vault secret key containing dots such as ansible.service.user.username. Trace how that selector is parsed and matched, then verify that the action retrieves the dotted key without changing behavior for ordinary keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.