Github should not elide simple secret values like "1", "0" or "yes", "no" etc. (and maybe it shouldn't do it at all for short strings!) #48231
Unanswered
demerphq
asked this question in
Code Security
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
Github elides secrets from the output of CI runs, such as tests and what not. This includes very simple values like '1' and '0' and short sequences of numeric and alphabetic data.
This is actually problematic from a security point of view, given sufficient time the secret values can be exposed by having test output produce large numbers of strings with different permutations of characters, if the output is elided you know the value is in the secrets. Agreed you can argue that doing so for a non-trivial length value would be prohibitively time consuming and would require many fetches that might constitute a different class of attack, but the fact remains that eliding the values provides an attacker proof that they have found a secret. Consider if i want to check if a word in a dictionary is a value in the secrets then all i have to is get a test to output the contents fo the dictionary and then check to see which words are elided.
Regardless of your position on this above issue, I think that the eliding of very simple values, such as "1", "0", (and likely "yes", "no" or similar), is very unhelpful to development and does not improve security at all. Consider the CI run here:
https://github.com/Perl/perl5/actions/runs/4238660267/jobs/7365962545#step:10:2648
The output looks like this:
I happen to know that the rightmost elided value in '# Failed test 'expecting $count < (***0_000 * ***)'' is 1. Eliding a value like 1 is very unhelpful. What exactly were all the numbers in the above data? Likely the output should have read:
I do not see how eliding '1' helps secure anything, but it definitely does make it harder to understand the CI output.
Also, short values are especially vulnerable to the dictionary attack I mentioned above. Eliding anything with a modest number of digits is not securing anything, it actually helps leak the secure data. For instance, if I want to find out what (if any) 3 digits values are stored in the secret file all i have to do is write a test that outputs
Details
and then check to see which digits were elided. Same concept for 4 digits, etc.
Eliding values like this is an example of "security theater", it does not secure the data, and in fact is worse than "security theater" as it makes the secrets less secure by providing an oracle that supports bulk validation checks that I doubt github is in the position to monitor for. All it does is make development more difficult.
Please stop eliding short digit strings, especially single digit or character digit strings.
Beta Was this translation helpful? Give feedback.
All reactions