4

I had a discussion with some security experts a few days ago and they said that some content on Stack Overflow is dangerous, because some provided code snippets by other developers will help to evade security mechanisms, such as weak cryptography keys or algorithms were used in the code snippets.

Is there any mechanism on Stack Overflow that identifies such posts and edits them for warning purposes?

I know that some security experts directly add a comment to warn other users, but as we discussed further those warnings are overseen. They had this insight because they analyzed developers who search for a solution, and these developers do not scroll to the comment section, they only look for code snippets.

4

1 Answer 1

7

The best way to deal with this is to provide your own, better/more secure/more up-to-date answer. Hopefully this will be seen by those seeking answers and used in preference to the existing, insecure, answer.

You can also leave a comment on the original answer pointing out it's flaws. I know not all people will read the comments, but it still benefits future readers who do, as they know to treat the answer with caution and it also alerts the OP so that they can improve their answer or at the very least insert a disclaimer from themselves that the answer ideal but can be used as the starting point for a good solution (or words to that effect).

You can also down-vote. This sends an clearer signal that the answer isn't up to scratch. Personally, I'd probably reserve my down-vote for particularly egregious cases, but you will probably have different standards to me.

What you shouldn't do is edit your solution into the existing answer or "fix" the code in the existing answer. The big danger here is that, especially for highly up-voted answers, people will think that your code will appear to be co-opting the existing votes. Your code should be peer reviewed on it's own merits.

Editing the warning into the answer is also probably a bad idea. The OP will get notified of the edit and is highly likely to roll it back. Then you get someone else rolling that back and before you know it you have a rollback war.

So, it all comes back to my first statement. The simplest, cleanest and safest solution is to provide your own answer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .