Sicurezza applicativa: analisi statica del codice sorgente di software FOSS
Gary McGrew: On Open Source
Michael Howard: "Open-source projects certified as secure" – huh?(...)
Firstly, I am a big fan of code scanning and believe that use of static
analysis tools should always be one of the basic security steps integrated into
every SDLC.
However, there are huge problems with declaring security after passing a
code scan with an arbitrary tool and a random set of rules.
The most obvious issue is that security defects come in two flavors—bugs
and flaws—each accounting for roughly 50% of defects in practice.
Code scanning tools can only find bugs. Here are two stupid examples for
effect: can a code scanning tool determine that no user authentication was
performed? How about whether or not a playback attack will work?
(...)
(...)
So we finally have the security silver bullet!
Run this tool on your
code, fix the bugs, and you’re secure (and maybe unbreakable?!) I don’t think
so.
There are three big problems with this line of thought:First, the security bugs found are only the security bugs found by the tool,
and that list is always smaller than the list of all bugs.Second, it assumes that any new code or code changes are bug free. Which may
or may not be true. In my experience, it is rarely true that new code is utterly
bug free if you don’t take a holistic, process-oriented view to security.Third, and this is probably the most important, at best the tool understands
a subset of today’s vulnerabilities; that could all change tomorrow when a new
class of vulnerability or a subtle variant is found.(...)
Non si possono che ricordare, ancora una volta, le argomentazioni di Steve Lipner (http://www.securityfocus.com/news/191), citate anche in "The Security Development LifeCycle" (http://www.microsoft.com/MSPress/books/8753.aspx).
RispondiEliminaIn particolare, quella dei "molti occhi": tutti possono vedere il codice?
1) dell'Open Source si ricorda sempre il "libero", ma in realtà quello che interessa è il "gratuito" (il TCO non lo calcola mai nessuno). Il codice sarà anche lì, ma quanti lo "vedono"?
2) quanti di quelli che "vedono" il codice, sono in grado di effettuare una review di sicurezza? Verrebbe da rispondere "quasi nessuno", se pensiamo a Eric Raymond, quello della cattedrale e del bazaar, molto bravo a scrivere pamphlet virulenti, un pò meno a scrivere codice: un bug nel suo FetchMail è rimasto lì per cinque anni e passa.
3) è una questione di "occhi"? Chiunque metta su due righe sul "sourceforge" (che sta lì da anni, e fra un pò ha meno progetti di CodePlex, e meno iscritti di Connect) va dicendo in giro che "tutto il mondo può partecipare al suo progetto"? Ma quante persone lavorano REALMENTE ai progetti "open source"? Quanti di questi sono in grado di competere con i 60.000 dipendenti, più i milioni dell'ecosistema, di Microsoft?
1) e 3), ad onor del vero, sono farina del mio sacco.... ;)
Sarebbe un pò ora di finirla con questa storiella, che un modello di sviluppo (perchè, tolti i fronzoli, questo "open source" altro non è) crea "codice inerentemente sicuro". Non ha questa pretesa nemmeno l'SDL, che conta sulle risorse tecnico-economiche di Microsoft, non sul "postiamo su sourceforge e vediamo che succede"...