TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to mitigate risk from secrets leaks

91 pointsby vmatsiiakoalmost 2 years ago

8 comments

alexkalmost 2 years ago
You can&#x27;t leak API keys if there are no API keys to leak! The article recommends OIDC for apps, which is a step up, especially if you rotate the bearer token, however there is another option - use short-lived certs.<p>Our project Machine ID is replacing API keys with short-lived certificates:<p><a href="https:&#x2F;&#x2F;goteleport.com&#x2F;docs&#x2F;machine-id&#x2F;introduction&#x2F;" rel="nofollow">https:&#x2F;&#x2F;goteleport.com&#x2F;docs&#x2F;machine-id&#x2F;introduction&#x2F;</a><p>Another great option is SPIFFEE <a href="https:&#x2F;&#x2F;spiffe.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;spiffe.io&#x2F;</a><p>The adoption is slower than we wanted, because it&#x27;s not trivial to replace API keys, but we see more and more companies using mTLS + short lived certs as alternative to shared secrets.
评论 #36099208 未加载
评论 #36099314 未加载
评论 #36100861 未加载
ed25519FUUUalmost 2 years ago
Even if you try and use best practices, the whole ship is just LEAKY!<p>For example you store your secrets in the env. Well your program crashes and the log capture software dumps the entire env, or it’s included in some crash report.<p>Leaks from every corner.
评论 #36099375 未加载
Machaalmost 2 years ago
This seems implausibly high. Is it including stuff like putting password=replaceme in an example config file?
评论 #36099260 未加载
评论 #36112256 未加载
londons_explorealmost 2 years ago
Does this include deliberately sharing an API key, but in a &#x27;not best practices&#x27; way?<p>ie. &quot;Here, just run document.cookie=&#x27;SID=EB73542386AF235&#x27; &quot; Then you&#x27;ll be logged in as an account that can do what you&#x27;re trying to do.
评论 #36099096 未加载
bigmattystylesalmost 2 years ago
It’s way higher than that if you mean just leaving it in an MR or even checking it in. Or even a relatively open internal file system. It’s not if, it’s about the plan when you do.
hanyiwangalmost 2 years ago
and that&#x27;s why you use secret managers like infisical
评论 #36099408 未加载
评论 #36099288 未加载
评论 #36099278 未加载
评论 #36099222 未加载
suddenclarityalmost 2 years ago
I skimmed the report pdf and saw no mention of validating the data. So I assume pushing an example env file would be flagged as a leak? I understand that it&#x27;s tricky to validate and even more so when having millions of data points but the method seems shaky. It&#x27;s like all those automatic error analysers that repo authors tend to hate due to all false positives.
评论 #36102024 未加载
revskillalmost 2 years ago
100% developers leaked JWT token .
评论 #36098917 未加载