TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why arent developers interested in secure coding?

32 点作者 arunsivadasan超过 2 年前
As someone who works in compliance, I have observed that many developers do not have a strong interest in secure coding. While Agile and DevOps have become widely adopted, security has not yet gained the attention of many developers. For instance, I learned about the OWASP project from security professionals rather than from developers. It appears to me that the development of secure software is primarily led by cybersecurity folks rather than developers themselves. Whats HN's view on this?

48 条评论

msla超过 2 年前
Because security without a threat model is an endless well of paranoia that leads to mere paralysis, an inability to change because of some infinitesimal chance that someone with unguessed capabilities and unclear goals might subvert a fundamental part of the system.<p>In short: Give me a threat model, by which I mean realistic groups with goals and capabilities, and we can mitigate the risks. Just talking about &quot;security&quot; in a void is pointless at best and harmful at worst, since ill-considered security measures have a habit of leading to even worse insecurity.
评论 #34379526 未加载
评论 #34379366 未加载
评论 #34379824 未加载
评论 #34379582 未加载
评论 #34380063 未加载
评论 #34379692 未加载
bob1029超过 2 年前
What is your definition of &quot;secure&quot;? Ticks all of your audit checkboxes, or can actually resist nation state tampering?<p>Depending on how you define this word (actual vs perceptual security) we would adjust the type of conversation accordingly.<p>A lot of &quot;security&quot; is theatrical crap that skilled developers don&#x27;t have patience for.
评论 #34379609 未加载
评论 #34380479 未加载
评论 #34379274 未加载
locallost超过 2 年前
That&#x27;s a loaded question if I&#x27;ve ever seen one. Developers care about a lot of things, including security. Most of them care way too much. Sometimes they even deliver things that are crappy to use because it was a challenge to get it done at all. Doesn&#x27;t mean they don&#x27;t care about users either.<p>Security is important but for most things it&#x27;s not the most important thing. Useful but insecure can be used for something. Useless but secure can&#x27;t.
评论 #34379880 未加载
di4na超过 2 年前
A few things.<p>First of all, you see how things <i>disappear</i> from the list or go down?<p>Yeah that is because a frigton of opensource maintainers, usually unpaid devs just so you know, spend a lot of time making sure these attacks are impossible.<p>Like i am sorry but the whole software world is in love with Rust and spitting on C for a reason. We care a lot about security.<p>What we do not care about is something unactionable or unrealistic. And that? That is what security bring to the table.<p>Put it otherwise. Being big on the infosec workd buzzwords does not pay devs bills and do not generate money. So we solve the problem <i>in our tools</i>.<p>It just happens that this work is invisible to you and society in general.<p>Put otherwise. If we did not care about it, the list would be far far worse. Like we would not have TLS. Think about this a minute.
bell-cot超过 2 年前
In a &quot;fake it until you make it&quot; world, where being first to ship seems to have huge upsides, and massive security breaches seem to have minimal downsides - why would a rational developer, manager, or organization actually care about security?
评论 #34380538 未加载
crosser超过 2 年前
Because of delayed gratification.<p>People are mostly motivated by gratification. You&#x27;ve written _functioning_ code - you can instantly see how it solves the problem at hand. You&#x27;ve written _beautiful_ code - you can stare in satisfaction at the negative total in `git diff --stat`.<p>You&#x27;ve written secure code - you reward comes in the form of nobody talking about your code for the next twenty years ;)
评论 #34379476 未加载
评论 #34379941 未加载
DyslexicAtheist超过 2 年前
Been working in IoT and industrial IoT for over a decade. My job title always had security in it.<p>The security in our domain is so bad[1] that I think the only way to improve is via regulation. I can&#x27;t for the RedDirective to be in force in 2024 and many products becoming illegal in EU. And I can&#x27;t wait for the cybersec resiliance act to come into force to expand the RED directive to backend systems, and I can&#x27;t wait for the Data Act to stop our incompetent middle managers saying &quot;Data is the new oil&quot; ...<p>While &quot;compliance != security&quot;, the industry has done an abysmal job in coming up with better guard rails itself, so at this stage even a poorly written law is better than nothing. Most of my colleagues (who are still there) are so pissed with the internal attitude of companies that they openly joke that they hope the company get&#x27;s breached because it&#x27;s the only way management will learn.<p>firefighters and arson:<p>Until working in IoT I thought it&#x27;s a strange coincidence that some fire-fighters are suddenly becoming arsonists.<p>The Blairwitch Project:<p>The behavior of the protagonists in that movie made me so upset that after the first 15 minutes I couldn&#x27;t wait for the witch to arrive to kill them all. My job the bast 15 years was not unlike the first 15 mins of that film.<p>While I would never do anything to hurt these companies nor defend anyone who does, I do understand now a lot better why somebody is rooting for the witch to come or why a firefighter would set fire to a place.<p>The worst of it is that while 3 of us in a company of 80K employees are in charge of securing the product we will likely get hacked in the next 12-16 months. And even we informed management and continue to be gaslit by middle managers for &quot;stopping progress&quot; it will also be us who get blamed for not having done enough once the witch comes knocking.<p>That said the situation is even worse for players in the US who have great frameworks and standards but lack of regulation and binding laws.<p>[1] yes I&#x27;m speaking for the entire industry since I&#x27;m also chairing several industry alliances with a strong security track and have good insight over the attitude of most companies
fian超过 2 年前
In my current role I work as a developer in the finance sector. We are interested in secure coding. Every year we have to complete a secure coding course and pass an assessment.<p>We have a team dedicated to performing security reviews for most code changes. Your change can&#x27;t go to Production until it has been assessed by someone from the secure code team. They can request rework if they think you have introduced a vulnerability.<p>We have regular pen-testing performed.<p>There are various vulnerability scanners running against the code repos and blocking builds if a dependency is identified to contain a new CVE.<p>The project I mainly work on has been in active development for decades. It has well defined frameworks for many common actions. Most of the time we are working within those frameworks, which have been already been vetted thoroughly. Ironically, it is rare that we would need to touch code in a way that could introduce a vulnerability.<p>In a previous role I worked on desktop applications for engineering simulation. There was no requirement for secure coding for those projects as there was no central database. All the models were file based.<p>So it depends on the project and the risk and consequence of an malicious actor finding a vulnerability and exploiting it. The health and finance sectors have to take secure coding seriously. From experience, many Oil and Gas companies are also super strict on controlling data access and will often request proof that a software application has been security reviewed and pen-tested.
goalieca超过 2 年前
I’ve been a developer in a security champion like role for many years now. I’d first like to say that developers are casually interested in security and will try to do the best they can. I’d say the interest in security is about the same as in technical debt. The same kind of risks are assumed and the same difficulty in saying no to product owners also exist.
errantmind超过 2 年前
Simple answer: There aren&#x27;t any incentives in place to reward it in most professional contexts.
评论 #34379624 未加载
mkl95超过 2 年前
None of the companies I have worked for encouraged secure coding. At most places you won&#x27;t get any recognition for going the extra mile to write secure code, and in fact you will usually be encouraged to cut corners at the expense of security to deliver stuff faster.
ghstcode超过 2 年前
The question should be: why aren’t project managers and product owners making security implementation and review part of the sprints as a priority item?
indymike超过 2 年前
&gt; As someone who works in compliance, I have observed that many developers do not have a strong interest in secure coding.<p>This is just selection bias. Your job is to make people comply, most likely with something that hasn&#x27;t been a priority until something happened to make it a priority. If you have a team built around shipping lots of functionality quickly, well, you are going to get a lot of blank stares when you start slowing things down. So, compliance is a hard job. And people who haven&#x27;t made security a priority over time are not going to have much awareness of best practices, or OWASP.<p>&gt; It appears to me that the development of secure software is primarily led by cybersecurity folks rather than developers themselves. Whats HN&#x27;s view on this?<p>If you want to shift from &quot;move fast and break things&quot; to quality + security (which are peas in the same pod), it will often take new leadership. The processes, people, systems, and culture will need to change a lot. An observation: being good at finding problems is not the same as being good at fixing and preventing problems, and this where you have to be careful when you are changing leadership. It&#x27;s not as simple as hiring a certification. It&#x27;s actually a big organizational challenge.
Brian_K_White超过 2 年前
Because it&#x27;s uninteresting except to some small subset who just happens to find that an interesting problem they happen to like to work on.<p>Everyone has their own particular things they happen to become interested in, so some few people are into security, just like some few are into stamps.<p>But outside of that, security is merely important, not useful or interesting or productive or functional or cool or fun.<p>Fundamentally the useful function of any machine is to do something. The problem that is interesting and fun and gratifying to solve is how to get that something done at all.<p>Other considerations like optimizing the design for some parameter like manufacturing cost or materials availability or reliability or field repairability, or writing the documentation, are all secondary puzzles that <i>can</i> be gratifying but are far less so than the initial creation. It&#x27;s gruntwork and &#x27;mere engineering&#x27;.<p>Figuring out how to ensure that the machine can only be used by approved people in approved ways at approved times and log all activity for auditing... that is even less interesting than optimizing or documenting, unless that just happens to be your kink.<p>It&#x27;s hardly a boggling mystery. It&#x27;s like asking why developers don&#x27;t seem to like meetings and 7 bosses.
kkfx超过 2 年前
When you develop in a rush, SCRUM style, perhaps in the stereotypical silicon valley mode, you can only spit out code, your goal is just to be quick and achieve some apparent level of usability.<p>If you can calmly think about something to automate, made good scenario, do some mental experiments etc than you can craft good code, witch happen to be also secure in general. But such model is long lost.
评论 #34381754 未加载
评论 #34379806 未加载
layer8超过 2 年前
I&#x27;d already be happy if all developers would be interested in well-behaved code that covers all possible edge cases, and not just the expected input&#x2F;states, and would think in terms of well-defined software contracts between modules, objects and functions. Coincidentally, that would also take care of certain classes of security issues.
defrost超过 2 年前
Those who write 24&#x2F;7 continuous pipelined processing numerical code for signal process and instrument monitoring are very interested in <i>robust</i> code.<p>This is almost but not quite <i>secure</i> code - the thread in common is that secure and robust code both have to sensibly handle and happily continue in a known state no matter what the input.<p>Hackers use fuzzers to concoct evil input that forces exploitable states.<p>The real world applies sod&#x27;s law to any input that comes from sats, planes, instruments, etc.<p>Power flucuations, lightening strikes, disconnected wires left dangling and sparking, N+10 hard resets where N is a number so ridiculous nobody would ever turn it on and then off again quickly that often, ... etc.<p>When you circle back on any such signal collation for analysis, image generation, cross reference poor handling of unexpected input will cause such a mess that inevitably the habit develops to code excessively defensively, as too much paranoia is rarely enough.
LudwigNagasena超过 2 年前
Developers write code to meet requirements. People like product owners, cybersecurity specialists and technical analysts provide those requirements.<p>DevOps is just a fancy word to signify that modern system administration requires coding proficiency.<p>Agile is a project management framework useful for IT projects.<p>I don’t see how those three phenomena are related?
christkv超过 2 年前
I’m going though the performative bs of providing documentation for this to a tender and it’s all about the documentation not about the actual handling of security. They just want a set of documents so they can blame somebody else. Thankfully we use azure so we point the finger at them for most of it lol.
gonzo41超过 2 年前
I get work from IT security. I don&#x27;t have IT security create less work for me. And the benefit they create in my work is .... lots of sonarcube scans that create work items for me, that may more maynot be real.<p>And we don&#x27;t know who&#x27;s actually going to be attacking the internal software!
lovelearning超过 2 年前
During my formative years as a new SE, our focus - mine, the team&#x27;s, the managers&#x27; - was always on functionality and features. I was coding with C++, Java, and Python in those places. One of those companies sold (and still sells) critical equipment that&#x27;s quite close to all of us :). Security was either a secondary concern or the responsibility of a dedicated team who were part of deployment.<p>It&#x27;s only gradually, over many years, that I built up my knowledge of secure coding, especially after I started dabbling in front-end web development.<p>I&#x27;d have thought things have improved now because web and cloud are the first choices everywhere. But after seeing your post, I&#x27;m wondering if what I experienced is still the norm.
generalizations超过 2 年前
As someone who works adjacent to compliance, I have no interest in &quot;secure coding&quot; as you describe it because it&#x27;s bureaucratic security theater - better for avoiding liability than actually being practically useful.
mamcx超过 2 年前
You are thinking TOO high (OWASP, compliance, etc.).<p>This must start at the bottom: The language, the DB&#x2F;Store, Privacy, the management of secrets.<p>Only recently this more or less have start to get some traction (Rust, Apple insistence, etc).<p>But as long JS, C, Java, C++ rule and they don&#x27;t have &quot;secure code per default&quot; and &quot;the login sample use proper APIs&quot; everything else is impossible.
antifa超过 2 年前
We hire an external pentest firm once a year to tell us what to fix. Those changes are also inforced by updating our automated tests. I watch pull requests diligently to make sure juniors aren&#x27;t creating SQL injections or more obscure security smells, or things that might cause the pentest firm to doc us points.<p>I&#x27;m a regular dev. Anyways, what specifically are you suggesting?
pan69超过 2 年前
Your question statement is simply not true. Developers are interested in secure coding.<p>The problem is that you spend your days in a niche, a relatively well defined and limited scope, i.e. &quot;compliance&quot;.<p>Developers on the other hand are working in a much broader context, i.e, working through the requirements, architecture and design, project management (who&#x27;s doing what and when), the actual implementation, finding and fixing issues, etc, etc. And of course, compliance.<p>I totally agree, and I am pretty sure that any developer will agree that compliance and security should not be an afterthought but it just happens to be that in your world compliance is the most important thing. So, why is not not for everyone else in the world?<p>Maybe you should actually be working on projects with developers so that you can lead and help the team in this space? In any team you see that various individuals have slightly different specializations, yours could be compliance and security. This would help a team.
tomjen3超过 2 年前
We do: almost any framework will prevent sql injections automatically and the same for things like CSRF or HTML injection.<p>What we don&#x27;t do is have a checklist to go through. We haven&#x27;t considered these things, because we have _eliminated the posibility_ of that particular issue.<p>That doesn&#x27;t mean it is always safe: it just means that there new and exciting hacks to discover.
karmakaze超过 2 年前
Just because you have observed many without a strong interest in security, how would you know that there isn&#x27;t also many who do? I do, but I wouldn&#x27;t say strong interest because I don&#x27;t encounter it in my day to day.<p>As an implementer of APIs, most security concerns are done during auth. The only usual things are care in handing of externally supplied values (e.g. database ids or strings) and maybe redacting some parts in logs. Every now and then a new thing gets made that needs its own set of permission scopes and assignments to apps etc.<p>&gt; development of secure software is primarily led by cybersecurity folks rather than developers themselves<p>&quot;cybersecurity folks&quot; who develop secure software <i>are</i> &quot;developers&quot;. What you&#x27;re really saying is that app feature developers, etc don&#x27;t focus on security, which they should but only as much as they need to which isn&#x27;t very much.
flohofwoe超过 2 年前
Because &#x27;security&#x27; is fractal in nature and affects every little detail down to the hardware level (where even our lord and saviour Rust cannot help). No matter how secure your code or hardware is, there will always be an exploit waiting to be discovered. When this inevitably happens the security &#x27;extremists&#x27; come out of their holes and yell &#x27;I told you so&#x27;, which is not exactly helping the cause ;) Meanwhile devs need to prioritise time spent on security versus product features and actually getting shit done.<p>TL;DR: I bet most devs <i>do</i> care about security, but it&#x27;s just one aspect to prioritize against other goals, and it&#x27;s a task that can never be fully completed, not pro-actively without specific threats at least. You can never check that &quot;this project is now secure against random attacks&quot; checkbox.
mikewarot超过 2 年前
Securely multiplexing the hardware resources of a computer is the job of an Operating System, not applications. There is <i>no effective security</i> implemented in our operating systems as they are currently offered. There hasn&#x27;t been since IBM XT machines with dual floppy disks and MS-DOS.<p>I can hand a stranger $5 without having to trust them with access to my wallet.<p>I doubt anyone, other than Jart*, can show me how a user can hand a document to <i>a program they don&#x27;t trust</i>, without risking all of their stuff (and the OS) in Windows, Linux, Mac that is just as transparent and easy.<p>You want programmers to spend time and effort routing around missing security infrastructure, which is always going to be futile, and they know it instinctively.<p>*Because running a Linux executable in a browser offers a path towards LPE (Least Privilege Execution)
yellowapple超过 2 年前
I&#x27;d say quite a few (most?) of us do have an interest in the most secure form of coding there is: write as little of it as possible, and work with as little data as possible.<p>Unfortunately, we live in a real world with endless corner cases, so real-world software ends up having to address those corner cases - meaning more code, and more data to work with. Such software is also rarely unburdened by deadlines and prioritizations from management - meaning that as much as programmers would like to pursue security hardening, there&#x27;s rarely time to do so.<p>In other words: you&#x27;re barking up the wrong tree. Take it up with my manager&#x2F;customer&#x2F;etc. demanding I devote my time to new features instead of even so much as tech debt reduction (let alone actual security hardening).
deterministic超过 2 年前
Because 99% of “cybersecurity folks” that I have dealt with in the past were incompetent bureaucrats or (worse) consultants who had zero clue on how to actually make systems secure.<p>All they did was to email checklists full of demands for specific tech or protocols to be used that either was completely unnecessary, actually wouldn’t work for our project, had publicly known security issues, and&#x2F;or would not make the system more secure. They almost always had no clue when I asked them for the threat model they were basing their demands on.<p>Don’t get me wrong. I am sure that there are competent “cybersecurity folks” out there. I just haven’t met a single one in my 30+ years career. YMMV of course.
zabzonk超过 2 年前
the last major piece of software i worked on was a server that performed equity trades on some major european stock exchanges (london, paris, milan, frankfurt) and with some third-party brokers. the software ran on machines in the bank&#x27;s own datacenter and could not be accessed from outside (it didn&#x27;t take incoming requests from anything except the bank&#x27;s internal physical network, though it did take fills from an exchange in response to a trade). the server had to comply with the rules of the various exchanges, else the trades would not go through.<p>so, my question is, where do i need to consider &quot;security&quot; in this situation, which is common in all the banks i&#x27;ve worked for?
评论 #34379845 未加载
secondcoming超过 2 年前
I don&#x27;t think it&#x27;s fair to say people aren&#x27;t interested in it.<p>The real problem is that software development is an immature profession. It&#x27;s a Wild West, anybody can identify as a developer. There are no educational or professional hurdles to overcome before you get provide your services.<p>No developer has gone to jail, or had their licence revoked for well-intentioned, but bad code. Incompetence is largely consequence-free, so the incentive for thoroughness is only present in the mind of the individual developer.<p>That said, security is difficult, time consuming and expensive.
herghost超过 2 年前
We have devolved responsibility for secure code to the product owners.<p>Ultimately, meeting their compliance objectives and addressing the threats is their business.<p>We (infosec) can, and will help, but the outcome is their responsibility. We provide threat models, guidelines, patterns, and consultancy to the tribes if they need it (as well as SecOps, etc).<p>Ensuring the incentive model makes security part of the problem they need to solve we manage to avoid the constant fights - infosec is a &quot;pull&quot; service at the design stage rather than an endless, fruitless &quot;push&quot;.
rep_movsd超过 2 年前
We had our 7 year old platform audited by a security team. They found about 2 errors related to some APIs leaking some info - like whether a username existed They found 3 to 4 issues with the server config like using older SSL algorithms or exposing the servers identification (like nginx)<p>None of these could really be used to exploit anything.<p>If you just follow some common sense and start with a good architecture initially, security isnt something that needs extra particular attention.
bjornsing超过 2 年前
My background is in engineering physics and I like to think from first principles. I make a strong distinction between the possible and the impossible. In my experience the cybersecurity folks tend to think very differently, in a more fuzzy &#x2F; pragmatic way, and it’s very hard to translate their thinking into sound engineering. They are typically very focused on trivial aspects, which goes poorly together with good engineering culture.
groffee超过 2 年前
Sometimes there has to be a trade-off between user satisfaction and security.<p>If you make a process with too much friction, it might be secure but you&#x27;ll get user churn. Plus a lot of end users are straight up idiots, making something too secure means a lot of them won&#x27;t be able to use it.<p>But that said the only time I&#x27;ve seen insecure coding in the wild is the endless blog spam on sites like medium etc.
zabzonk超过 2 年前
Compliance with what? What do you mean by security?
waspight超过 2 年前
Because you never reach any goals that get verified if you develop for security. It is like you only getting punished if the security is weak (you get exploited), but you never know if the security you implemented actually prevented a threat. So there is no real rewards.<p>Would be interesting to know if there is some kind of reward model out there that solves this.
watwut超过 2 年前
OWASP in not really targeted at developers and a lot of in it is just not actionable or useful for Tommy implementing new basket. The parts useful for developers are known by developers<p>OWASP is for security professionals which is why you heard about it from them.
jongjong超过 2 年前
Because secure code means simple code. Most developers are interested in producing complex code because it&#x27;s easier to write (requires less thinking&#x2F;planning) and it makes them harder to replace within the organization.
trashface超过 2 年前
Why isn&#x27;t the C-suite interested in secure coding?
analognoise超过 2 年前
You can get a bunch of useful shit done while ignoring the people in flowing robes yelling about how you &quot;should&quot; be doing things.
Kinrany超过 2 年前
Surely it&#x27;s not a surprise that security specialists have more interest in security than other people.
bottled_poe超过 2 年前
perhaps the question should be: why don’t investors allocate funds for secure software?
yababa_y超过 2 年前
tell me about it. the digital supply chain is a travesty. everybody outside google just downloads brew.
draw_down超过 2 年前
Nobody gets promoted for writing the safest software. Safety is one of those concerns that has no real upside in an organizational context.
评论 #34379184 未加载
moloch-hai超过 2 年前
Generally it is management who are least interested in secure coding. It costs time, and they generally are unwilling to allow time to do any of it.