hashicorp / hashicorp/vault-action

[BUG] Unable to receive secret if the name contains digits

Open
#581 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.9.4

## vault-action version
v3.3.0

## Describe the bug
Receiving error message `Syntax Error: "digits"` when trying to receive secret with digits. See yaml below.

## To Reproduce
```yaml
- name: Retrieve Technical User from Vault
id: retrieve-technical-user
uses: hashicorp/vault-action@v3.3.0
with:
url: ${{ env.VAULT_ADDR }}
tlsSkipVerify: true
method: approle
roleId: ${{ env.VAULT_ROLE_ID }}
secretId: ${{ env.VAULT_SECRET_ID }}
secrets: |
some-secret-with-123digits | TECHNICAL_USER ;
```

## Expected behavior
Successfully receive the secret of the technical user.

## Log Output
Note: We are not able to set the `ACTIONS_STEP_DEBUG` secret due to missing permissions. But we can provide the log below:

> Run hashicorp/vault-action@v3.3.0
> with:
> url: ***
> tlsSkipVerify: true
> method: approle
> roleId: ***
> secretId: ***
> secrets: some-secret-with-123digits | TECHNICAL_USER ;
>
> kubernetesTokenPath: /var/run/secrets/kubernetes.io/serviceaccount/token
> exportEnv: true
> exportToken: false
> outputToken: false
> jwtTtl: 3600
> ignoreNotFound: false
> env:
> VAULT_ADDR: ***
> VAULT_ROLE_ID: ***
> VAULT_SECRET_ID: ***
> Get Vault Secrets
> Error: Syntax error: "digits"

## Additional context
We are able to successfully retrieve other secrets that do not contain digits. Therefore, we assume that the setup is generally working. We also found that the same error occurs regardless of the existence of the secret.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the supplied GitHub Actions example with the v3.3.0 secrets expression and inspect the action's parsing path for secret names containing digits. Done means the technical-user secret is retrieved successfully, including when the secret does not exist during reproduction, without the syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.