Skip to content

feat: scrub secrets containing whitespace - #4772

Merged
dolanor merged 9 commits into
dagger:mainfrom
dolanor:secret-whitespace-scrub
Mar 29, 2023
Merged

dolanor merged 9 commits into
dagger:mainfrom
dolanor:secret-whitespace-scrub

Conversation

@dolanor

@dolanor dolanor commented Mar 16, 2023 •

Copy link
Copy Markdown
Contributor

The implementation is simple.

It leaks some meta information: the number of lines contained in the secret. Each line of secret data will be replaced by ***.

@dolanor
dolanor marked this pull request as draft March 16, 2023 10:22
@dolanor
dolanor force-pushed the secret-whitespace-scrub branch from da3ed1a to 2289128 Compare March 16, 2023 15:46
@dolanor dolanor linked an issue Mar 21, 2023 that may be closed by this pull request
@dolanor
dolanor force-pushed the secret-whitespace-scrub branch 2 times, most recently from 7881422 to 9425b4f Compare March 27, 2023 13:39
@dolanor
dolanor requested review from jlongtine and vito March 27, 2023 13:39
@dolanor
dolanor marked this pull request as ready for review March 28, 2023 07:46
@dolanor
dolanor force-pushed the secret-whitespace-scrub branch 2 times, most recently from a9f8572 to 7a588ec Compare March 28, 2023 14:59

@jlongtine jlongtine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dolanor Looks good! I'm a bit worried about the performance of scrubSecretBytes, but I think we can improve that search + replace algorithm with something more performant when the time comes.

@dolanor
dolanor force-pushed the secret-whitespace-scrub branch 2 times, most recently from 1ea9823 to 0ce5c1d Compare March 29, 2023 14:49
dolanor added 9 commits March 29, 2023 23:06
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
@dolanor
dolanor force-pushed the secret-whitespace-scrub branch from 0ce5c1d to f15b065 Compare March 29, 2023 21:06
@dolanor
dolanor merged commit f736354 into dagger:main Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 secrets with whitespace are not scrubbed (yet)

2 participants