Skip to content
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

Do not call setSecret on any unmasked secrets #17

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

jasonroelofs
Copy link
Contributor

Right now, every value that's pulled from Doppler is marked as a secret in GitHub Actions, which means any workflow using this action ends up with a ton of unnecessary redactions.

For example, if you have the following Doppler values:

NODE_ENV = test
WORKER_COUNT = 3

Then every output that includes test and the number 3 gets redacted, making the output rather difficult to read. Now I'm unable to tell the real difference between Listing and Downloading secrets, but from what I can tell from the api
docs
only List Secrets includes the visibility information, so I had to change how secrets are pulled.

Fixes #16

@jasonroelofs
Copy link
Contributor Author

I have not directly tested this logic yet, wanted to see what the GitHub action would say. I will look at trying to test this logic internally as well.

Right now, every value that's pulled from Doppler is marked as a secret
in GitHub Actions, which means any workflow using this action ends up
with a ton of unnecessary redactions.

For example, if you have the following Doppler values:

```
NODE_ENV = test
WORKER_COUNT = 3
```

Then *every* output that includes `test` and the number 3 gets redacted,
making the output rather difficult to read. Now I'm unable to tell the
real difference between Listing and Downloading secrets, but from what I
can tell from the [api
docs](https://docs.doppler.com/reference/secrets-list) only List Secrets
includes the visibility information, so I had to change how secrets are
pulled.

Fixes DopplerHQ#16
@jasonroelofs jasonroelofs force-pushed the do-not-redact-unmasked-secrets branch from 2c81a01 to 1e2a087 Compare March 8, 2024 20:34
@jasonroelofs jasonroelofs force-pushed the do-not-redact-unmasked-secrets branch from 7799d55 to 3d1469d Compare March 8, 2024 20:50
@jasonroelofs
Copy link
Contributor Author

Did some internal testing and got this to a state where it works!

Copy link
Contributor

@watsonian watsonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left feedback for one small change that I think should be made. Otherwise, this looks good! We should be able to get this merged and released once that change is made.

index.js Outdated Show resolved Hide resolved
@jasonroelofs
Copy link
Contributor Author

Anything I need to do about the test failures?

@jasonroelofs
Copy link
Contributor Author

Ping @watsonian

@watsonian watsonian merged commit bc453b9 into DopplerHQ:main Mar 21, 2024
0 of 2 checks passed
@jasonroelofs jasonroelofs deleted the do-not-redact-unmasked-secrets branch March 21, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Skip setSecret for unmasked values
2 participants