From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bb14f1c1986544fb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Does Ada need a 'secure coding standard' as well? Date: Sat, 28 May 2011 21:06:27 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: 0wEclEfVa5yTOGBZFIm9ZQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19541 Date: 2011-05-28T21:06:27+02:00 List-Id: Le Sat, 28 May 2011 20:53:25 +0200, Nasser M. Abbasi a = =C3=A9crit: > I saw that CMU makes now what is called CERT (secure coding standards)= > for different languages. They have Java, C, C++ in there. > > These are supposed to be rules that a programmer should adopt to > make the code written by that language more 'safe' and 'secure' > > Here is the one for C for example > > https://www.securecoding.cert.org/confluence/display/seccode/CERT+C+Se= cure+Coding+Standard You can guess these recommendations are all languages specific. Ex. the = = common recommendation to write if (condition) { do (); } instead of if (condition) do (); makes no sense for Ada, which has already handle this: you always write if Condition then do; end if; There is no other way to do, so no rules to have there. Well, this matters about how-to-write are mostly already embedded in the= = language rules (that is one of its target: readability, and principle of= = least-surprise). Except that, there already exist to some Ada subset, or profiles. One of= = the most common is the one which is required with SPARK. Here again, no = = need to setup some rules and ask the authors to follow these rules and = nothing else, as these are already checked by the SPARK Checker. But nothing is perfect, there may be some interested rules to be applied= = to Ada, just that there will be few, and there all should be mostly doma= in = specific, as the ones about the large principles, are already there (I = believe). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] =E2=80=9Cc++; /* this makes c bigger but returns the old value */=E2=80=9D= [Anonymous]