Live data from Hacker News

Software Engineering Institute Makes CERT C++ Coding Standard Freely Available

sei.cmu.edu

1–10 of 27 posts

Re: Software Engineering Institute Makes CERT C++ Coding Standard Freely Available

#3
To anyone experienced with CERT C++: are there rules in the standard that are critical for secure code, but not easy to discover without extensive experience?

For instance, I went through the I/O section, and most of the rules seem quite intuitive even to a novice C++ programmer like myself.

Re: Software Engineering Institute Makes CERT C++ Coding Standard Freely Available

#5
post #3

To anyone experienced with CERT C++: are there rules in the standard that are critical for secure code, but not easy to discover without extensive experience? For instance, I went through the I/O section, and most of the rules seem quite intuitive even to a novice C++ programmer like myself.

I've not got experience w/CERT C++, so caveats. IMO, the major utility in releasing these guidelines publicly is that developers of clang-tidy and other open source static checkers can freely access the guides that will allow them to check for compliance.

Kudos to the SEI.

Re: Software Engineering Institute Makes CERT C++ Coding Standard Freely Available

#6
post #3

To anyone experienced with CERT C++: are there rules in the standard that are critical for secure code, but not easy to discover without extensive experience? For instance, I went through the I/O section, and most of the rules seem quite intuitive even to a novice C++ programmer like myself.

What's considered critical or difficult to discover is a bit subjective, but:

It's easy to forget that alignment is important on some architectures (other than for performance reasons), so be careful when using placement new: https://www.securecoding.cert.org/confluence/display/cpluspl...

This may seem obvious, but even the C++ committee got this one wrong when they created auto_ptr (which has since been removed from the standard): https://www.securecoding.cert.org/confluence/display/cpluspl...

This one is totally obvious but has a stunning number of ways you can fail to adhere to it, some of which look reasonable at first blush: https://www.securecoding.cert.org/confluence/display/cpluspl...

Post reply on HN