r/ProgrammerHumor • • 10d ago • Regret 1 Bravo 1

Meme inANutShell

Post image
7.1k Upvotes

134 comments sorted by

View all comments

191

u/JoshDM 10d ago

You know what's worse?

The CVE is fixed by deprecating the class or method, but the developers keep it in for backwards compatibility.

However because it still exists, Sonatype flags it with their own custom HIGH or CRITICAL and even though you can attest you don't use it, because it's still "reachable" your app sec team who isn't smart enough to know how to program or how programs work and are managed by idiots still flag it so you have to somehow either entirely eliminate the dependency or resolve the vulnerability yourself.

Which I do by building my own copy of the library from the code sans deprecated items licensing be damned because the dev team maintaining the library can't be fucking bothered.

And yeah I have to vuln scan that code too, which is itself a bitch.

79

u/bwmat 10d ago

Yeah this can be infuriating

We've spent so much time lately doing releases just to update a third party dependency w/ a CVE that doesn't actually affect us due to the way we use the dependency. 

Of course nobody trusts us devs when we say that. 

25

u/bwmat 10d ago

Actually, the worst instance of this crap is probably that one of our largest customers (who you would recognize) has a large list of 'banned' functions, which includes ones like memcpy (just use memcpy_s...), getenv, vfprintf, etc

It's actually insulting IMO.

27

u/Experiment59 10d ago

good lord if they’re gonna get that granular why not just handle the development themselves

3

u/Tucancancan 9d ago

Is that in aerospace? 

8

u/bwmat 9d ago

No

It's nothing which should be used in any life critical system... 

0

u/Shlkt 8d ago

What OS are you running this code on, that doesn't use memcpy? Like, there's gotta be a memcpy somewhere on the stack. Why should those devs get special permissions?

19

u/WernerderChamp 10d ago

"Can't you just remove <name of core framework> from your code?"

7

u/No-Article-Particle 10d ago

Same. The cve never hits our codepath, but our changelog must show it fixed, so... Let's patch it I guess.

5

u/cc413 9d ago

At this point we should just make every function its own package

27

u/Happy-Sleep-6512 10d ago

I am convinced most of these recent vulns have like zero reachability, or zero likelihood of being triggered in the wild

13

u/JoshDM 10d ago

The Critical Sonatype one is incredibly implausible and even says so. It's only Critical because of the potential damage it imposes. And because it's Critical, the AppSec team is fearing doing any further analysis on it, forcing us all to find workarounds for an implausible scenario.

15

u/fearless-fossa 10d ago

forcing us all to find workarounds for an implausible scenario.

I mean, this has been the issue with the majority of the super-hyper-mega-urgent-critical CVEs this year. Yes, they're serious and should be fixed, but nobody bothers to evaluate the actual scenario that is required for it to happen. People are panicking over the most unlikely edge cases, and SOCs are the worst offenders in this because it would involve more than just looking at their checklists or dashboards.

5

u/jrobbio 10d ago

I used to feel this way but the new tactic is to use composite medium or lower security issues that drastically increase the reachability because most organisations target critical and highs. Then if you're on a version of something that has these risky calls and the exploit is able to call them, you're in for a world of pain.

5

u/c1e2477816dee6b5c882 9d ago

Honestly it feels like the best thing to do is rewrite/fork all of your dependencies so the scan tools can't see anything at all

Trivy is easy to defeat by just manually copying the .so files instead of actually installing the libraries.

These tools are so dumb and easy to defeat.

4

u/d3lt4papa 10d ago

Vibe code the dependency 😎

6

u/SignoreBanana 10d ago

OFC companies pretend to care about security by hiring the least qualified folks to run their security checks.

2

u/WernerderChamp 10d ago

We have that for a log4j vuln. At least there was so much fuzz that they globally whitelisted it for now.

5

u/JoshDM 10d ago

We have that for a log4j vuln

Which one do you think I'm referring to? :-)

Also it's only a possibility if you include both core AND api, but because the code is distributed between both, Sonatyoe flags both dependencies equally.