News for hackers. Stuff that matters.
Re:The Python Package Index is now a GitHub secret scanning ... by bombcar on Wednesday March 24, 2021 @08:41AM (#26566399)
The API keys I’ve used (admittedly not many) all seem to be long random text strings - how does GitHub detect them? By then being used (ie in api code) or do they actually have a known format?
Re:The Python Package Index is now a GitHub secret scanning ... by Deathmax on Wednesday March 24, 2021 @08:45AM (#26566437)
GitHub documents the process over at https://docs.github.com/en/developers/overview/secret-scanni.... You specify a regex, and you check if the secret is valid on your end.
Re:The Python Package Index is now a GitHub secret scanning ... by monkeybutton on Wednesday March 24, 2021 @09:37AM (#26567006)
There must be an astounding number of false positives for common patterns like N-length string of base64 chars. Could someone upload a malicious file with millions of matching strings and watch Github DDoS a company's verification endpoint?
Re:The Python Package Index is now a GitHub secret scanning ... by neurostimulant on Wednesday March 24, 2021 @09:47AM (#26567113)
I imagine the scanning would be rate-limited on per-repo basis.
Re:The Python Package Index is now a GitHub secret scanning ... by lostcolony on Wednesday March 24, 2021 @12:41PM (#26569580)
Probably also a max false positive rate; this isn't a guarantee, just a service, so if it detects X false positives it could just exclude the repo entirely as problematic.
Re:The Python Package Index is now a GitHub secret scanning ... by monkeybutton on Wednesday March 24, 2021 @10:10AM (#26567420)
Yeah, that would be reasonable.
Re:The Python Package Index is now a GitHub secret scanning ... by michaelcampbell on Wednesday March 24, 2021 @10:46AM (#26567874)
"Now you have 2 problems."
Re:The Python Package Index is now a GitHub secret scanning ... by MattConfluence on Wednesday March 24, 2021 @08:50AM (#26566481)
This is a difficult problem indeed, but thankfully it is just as difficult for the malicious actors as it is for the "good guys". Since various bad guys have presumably been scanning public repos for years already, Github and PyPa adding this feature is leveling the playing field, even if it is not a 100% accurate search algorithm.
Re:The Python Package Index is now a GitHub secret scanning ... by boarnoah on Wednesday March 24, 2021 @09:38AM (#26567009)
Not sure how these particular scanners do it, but during security assessments you sometimes use tools that will find all strings in an application package with high entropy.

Usually its junk, but occasionally you do get lucky and find tokens.

Re:The Python Package Index is now a GitHub secret scanning ... by di on Wednesday March 24, 2021 @09:31AM (#26566931)
PyPI API keys have a known format, they start with "pypi-".