Lazy developers who copy solutions to tricky programming problems are creating apps that are vulnerable to attack, research suggests.
A team of computer scientists looked at more than 72,000 chunks of code found on the Stack Overflow website.
The site is popular with developers seeking advice on the best way to fix broken code.
But researchers found many of the most copied snippets lacked basic checks that would stop common attacks.
The dangerous code chunks often used obsolete functions, did little to check user responses and did not look for attempts to break the application, said the study.
Security risks
The researchers, also trawled through a website where many developers upload and share the code behind their apps and programmes. The most widely used insecure code blocks turned up in more than 2,800 separate projects on the Github website, they found. The research team, involving experts at Canadian and Iranian universities, focused on the C++ programming language, which is used in a huge variety of projects, from small programs to large distributed systems. The team informed those they found using the problematic code chunks on Github that they may have introduced security risks into their apps and programmes.The hard way
But only 13% of the developers contacted said they had fixed the code, the researchers said. A similar number declined to fix the bugs. Some 40% said the code was safe because users could not change it once an app was running. "The people who are using Stack Overflow, they shouldn't trust it fully," said Prof Ashkan Sami, a computer scientist at Shiraz University in Iran who co-wrote the study. "It's better for programmers to do it the hard way and learn secure coding," he told The Register tech news site. Prof Sami said the team had developed an extension for the Chrome browser that checks when code is copied from Stack Overflow and lets coders know if it is poorly written or insecure.DISCLAIMER: The Views, Comments, Opinions, Contributions and Statements made by Readers and Contributors on this platform do not necessarily represent the views or policy of Multimedia Group Limited.
Latest Stories
-
Expansion Drive: Takoradi Technical University increases faculties
2 hours -
SHS heads demand payment of outstanding funds before reopening of schools
3 hours -
We thank God for the 2024 general elections – Akufo-Addo
3 hours -
Coconut Grove Beach Resort marks 30 years of excellence with memorable 9 lessons & carols service
3 hours -
WAFU B U-17 Girls’ Cup: Black Maidens beat Nigeria on penalties to win inaugral tournament
4 hours -
Real Madrid beat Sevilla to keep pressure on leaders Atletico
5 hours -
Liverpool put six past Spurs to go four points clear
5 hours -
Manchester United lose 3-0 at home to Bournemouth yet again
5 hours -
CHAN 2024Q: ‘It’s still an open game’ – Didi on Ghana’s draw with Nigeria
5 hours -
CHAN 2024Q: Ghana’s Black Galaxies held by Nigeria in first-leg tie
6 hours -
Dr Nduom hopeful defunct GN bank will be restored under Mahama administration
7 hours -
Bridget Bonnie celebrates NDC Victory, champions hope for women and youth
7 hours -
Shamima Muslim urges youth to lead Ghana’s renewal at 18Plus4NDC anniversary
8 hours -
Akufo-Addo condemns post-election violence, blames NDC
8 hours -
DAMC, Free Food Company, to distribute 10,000 packs of food to street kids
9 hours