Open Channels FM
Open Channels FM
You Don’t Have to Be an Expert to Build Secure Sites
Loading
/

In this show we go beyond the basics of website security with Rob Cairns and Robert Rowley, both veterans in the security space. Whether you build WooCommerce shops for clients or products for WooCommerce, these advanced tips will keep you on top of the game.

It’s not about being a security expert yourself. It’s understanding what to look for, how to prepare and educate your clients, and securing their sites for the long-haul.

  • Who do you trust or believe when in comes to security
  • The philosophy that bugs in open source are the problem and vulnerabilities come from code
  • Security, card readers and updated firmware
  • What developers should think about when they’re building a Woo site in terms of security to lock it down
  • The normal phase of bug reports
  • Credit card companies, more or less at risk
  • Moving the needle with major releases
  • Security firms running firewalls
  • Starting on your security journey as a developer

Our sponsors keeps our network independent and actively publishing.

Since 2005, Automattic has built tools for the open web including WordPress.com, WooCommerce, and Jetpack that are used by millions of people to create, sell, and publish online. They believe in ownership, flexibility, and open source and we’re grateful for their support. Learn more at automattic.com.


Logo of Omnisend featuring a stylized 'i' icon and the brand name in lowercase letters.

Omnisend gives brand owners, agencies and marketers powerful email and SMS automation, real human support 24/7, and AI connected via MCP to handle the heavy lifting. Pricing runs around 35% lower than comparable platforms, and we’re glad to have them backing the show. Use the code OpenChannels and get 30% off your first 3 months of any paid plan.

Episode Transcript

Rob: I’m Rob Cairns from Stunning Digital Marketing, and I’m here with Robert Rowley from Patchstack. How are you today, Robert?

Robert: Hello, I’m doing good. And yourself?

Rob: Not too bad. So, what do you do up a Patchstack?

Robert: I am Patchstack’s security advocate. I reach out to the community and talk with people about the topics of security as it pertains to open source and WordPress websites.

Rob: That’s really cool. I thought we’d jump into and start off with the community and security before we get in some nuts and bolts. And the community drives the security’s response, does it not?

Robert: The WordPress community as well as the more open community out there, yeah.

Who do you trust or believe when in comes to security

Rob: Part of the biggest issues, and you and I have been talking about recently about the security response, is trust. Who do you trust? Who do you believe and why do you believe?

Robert: That’s a deep question. Who I trust with anything is the person who’s doing the work or actually getting things done, and you can look into that to make sure that they’re actually putting in the effort and they’re communicating. That’s the way you can communicate to other people that you’re doing something, you’re familiar, you’re an expert in the field, and that’s how you build your trust with those people, is by informing them of the things they probably need to know that maybe they don’t need to know. And that’s how you build trust in the community. And so communication, I think, is a short air answer.

Rob: I think that’s key, is how you communicate in the community and how you respond to issues in the community. So we’ve seen several times, and I’ll use your own company as an example, where you posted a report, then there was a rebuttal on MasterWP and then you responded, and that went over really well in the community because it showed that you were trusted and willing to share with the community.

Robert: Yeah, for sure. That was a discourse, a discussion, that came out of us saying something a little loosely, using our communication a little bit lightly. Somebody called us out and we understood and accepted what they said and learned from the experience and became better.

The philosophy that bugs in open source are the problem and vulnerabilities come from code

Rob: A lot of people in the open source community have this philosophy that bugs in open source is the problem and vulnerabilities come from code. What is your feeling on that and why?

Robert: Vulnerability is coming from code, it’s an interesting one. Vulnerabilities, of course, exist in code, but at Patchstack we are focused on security bug patches, we’re trying to get more security bugs found and then patched in these codes. People confuse this because they conflate security bug being patched with a vulnerability being released in the wild. But again, that comes back down the point that we just made about communicating issues.

It’s a complicated structure that I don’t have the mental model in my mind right now, but it’s the idea is that the security bug exists, somebody, randomly, out there in the wild, may find that security bug in the code, and the next step that needs to happen is either that person communicating with the developer, and is the developer able to start patching and working on the problem, or is that person, the security researcher or whoever found the bug, just going to do whatever they want with it, perhaps release it openly to the wild, just to get their own notoriety or some other negative thing.

But what Patchstack is is we act like a mediator or a moderator in these cases. We try to engage with the security researchers so they can engage with the developers and together work together to apply a patch. Again, we’re facilitating communication.

On top of that, there’s another layer between the developers and the users of their code, where the developer needs to clearly communicate the importance of an update. They need to not hide in their change logs that this is just a simple bug fix if it’s a security bug fix. Because the users want to know that the developers of the programs that they use are on top of security bug patches. It’s actually a good thing to communicate, hey, this release is important. I patched a serious issue. Move on. As long as everybody’s updated, no sites get compromised.

Security, card readers and updated firmware

Rob: Because this is the show, Do The Woo, we should talk about a little bit about WooCommerce and the security there. We all know, most of us in the game, you got to do your software updates, you got to watch passwords, you got to watch your SSL certificate. Because if you’re doing eCommerce, that’s really important. What do you feel about devices like card readers that are attached to your WooCommerce website and taking payments?

Robert: I’m trying to think. So the card readers are actually nice because if we talk about PCI compliance, which is one of those requirements, the card reader is like a physical kiosk that can start accepting payments, gives a trusted device to handle your payments. And you’ll actually get a better rate sometimes by using a card reader instead of accepting the credit cards over your website.

Now, these card readers, they’re heavily scrutinized for security, or at least we so hope. They’re closed sourced, so we’re not quite sure. In turn, your website is kind of like a card reader. It exists online and it’s also basically a thing that accepts card payments. And PCI has its own separate entity or basically a category for websites that accept card payments, you fall under a different line. And PCI is nice because they tell you what you need to do to be a trusted website to accept card payments, card based payments.

I did PCI scanning and I wrote PCI scanning software for a number of years. I actually was a, for a short while, qualified security assessor for PCI needs, so I’ve been through it all. And what’s interesting is that the websites, to be honest, it’s pretty easy to get PCI compliant because mostly what you need to do is make sure your components are up to date. And like you said earlier, make sure everything’s up to date, make sure you’ve got your SSL certificate installed, make sure your passwords are good, no evidence of compromise, et cetera, so forth.

Rob: I was in a conversation the other day with somebody and somebody was saying, “Well, Shopify doesn’t have any bugs and Wix doesn’t have any bugs and Weebly doesn’t have any bugs,” and then the conversation went on to somebody else on Twitter and they turned around and said, “But are they really not having any bugs or,” back into the whole trust issue, “or are we actually reporting the bugs and are they being transparent with their community?” And my argument would be, they’re probably not being as transparent as WooCommerce and WordPress.

Robert: Yeah, for sure. The biggest difference, if they don’t report security bugs it definitely looks like they don’t have security or bugs, but that’s not the same thing. Not reporting your security bugs does not mean you’re free of security bugs.

I think I was quoted yesterday on Twitter where somebody asked about closed source versus open source, and I said, “I’d much rather you show your work.” By showing your work open source being transparent about their code, being transparent most of the times, especially the more serious plugins and the big, big names like the paid plugins, a lot of those times, they’re pretty honest about security updates, and they put in the work to pay for security audits. But not all plugins, of course, because that’s a big ecosystem.

Rob: The other thought I had and I was thinking about recently, was this whole thing around the devices, again, and come back there. So you go to a WooCommerce site, you grab a Square reader, for example, not to pick on Square, I love Square, and you interface that with Woo, because Square does have an interface with Woo. But the problem is, you show up at your local flea market, so you’re doing WooCommerce checkouts, and you have an issue that that firmware, which is the software in Square, that runs Square, hasn’t been updated in probably a year or two. And isn’t that a problem?

Robert: I can see what you’re getting at. The problem there would be the users who have the little device, the kiosk, that accepts the credit cards have not been informed of any potential importance of an update. It even goes beyond. For most average people out there, if you’re not going to farmer’s markets, I’m going to bet that your wifi router hasn’t gotten an update in a while, and that’s because the vendor isn’t communicating with you the importance of various updates and additions to their software code. More scarily, maybe there’s a security bug, we don’t know. Are they being open and honest about other security bugs right? Or transparent or communicating those things?

What developers should think about when they’re building a Woo site in terms of security to lock it down

Rob: That’s a big issue. If you’re WooCommerce dev, besides being really careful with your code, because that’s important, what would you suggest that developers should think about really hard when they’re building a Woo site in terms of security to lock it down?

Robert: Security for developers. The problem with security for developers is developers are focused on building new things, making new features, and that’s where they’re probably getting all their sense of accomplishment from. And that’s totally fine. But to add on top of that, hey, you need to learn all of these, every security vulnerability that’s ever existed, is probably a big ask for most developers. They may be familiar with some, probably the more popular ones, but it starts getting into this gray area where, after a while, how many times have you had to address PHP object injection? Or how many times do you know all the security headers are set exactly correct how these sites are needing it? And so on and so forth.

There’s basically an infinite amount of vulnerabilities that could potentially affect a website. There may be some that are undiscovered. So the idea there for them is to just keep an eye on these things. You don’t have to learn, and you shouldn’t be learning, security all in one day, you should learn it slowly over time.

Another great way to do that is to ask, kindly, people who are familiar with security bugs to review your code. If you have open source, if you’re following open source ideologies and you’re exposing your code, you can always say, “Hey, please, if you’re a security researcher, look through my code.” You can say you welcome it. Welcome and invite them in.

Patchstack can help with our bug bounty program called the Patchstack Alliance, but you don’t necessarily need us, you just need to communicate, “Hey, if you have a page up that says you’re a security researcher, here’s the process I would like you to follow,” and you’ll probably find out that some people will follow the process and might even report things to you.

Rob: Isn’t one of the biggest problems that a lot of developers don’t have a process in place, and that’s, I think, where they get into trouble?

Robert: Yeah, you’re you’re right. The devs, especially in the WordPress ecosystem, well, really, I should say all open source ecosystem. The big projects in open source, they’ve got these things, some have signed up for bug bounty programs and they pay out bounties. Others simply have a page that explains what to do. And I’m thinking Apache and Genex, big, big projects. But in the end of the day, if you’re even a small project, you can benefit. You don’t have to pay the bounty, you just clearly communicate, “Here is how I would like security vulnerabilities reported,” so you don’t get any accidental people going on your support forums and posting, “Here’s the full details about vulnerabilities in your plugin,” you don’t get the exposure or the headlines of your plugin is vulnerable because somebody decided to just go full disclosure. Again, you tell them, “Here’s how I would like you to report this,” and then it’s completely on the security researcher if they ignore everything you’ve asked them very kindly to do.

Thanks to our Pod Friends Wayflyer & Mode Effect

The normal phase of bug reports

Rob: What’s the normal phase? We’ve had a lot of discussions in the community that when we report bugs it should be 90 days. It should be 120 days. Do you have any feeling? And I know typically in other spaces out in the open source world, like Microsoft, it all depends on how dangerous the bug is. And I’ve seen bugs come out two years later. What is really the acceptable timeline to say to the community that we haven’t patched a bug and what should we go from there?

Robert: The timelines for disclosure is a big one, and that varies. I’m going to say it definitely depends on the project. A project that has dedicated developers, if you have a team of developers, you’re probably looking at one to two weeks for the patch, a standard release cycle, something like that. Again, this also depends how long are your sprints to the company, et cetera. But you’re looking at two weeks, probably on average. But that’s from report time to patch. Some I’ve seen will patch vulnerabilities the same day. Most of the time, coincidentally, this seems to be the places with just one developer, and that’s like the developer is the project so they’re very serious about patching it, they’re very honest about it, and they’ll get to those issues right away.

But really, if we’re going to be very broad, a 30 day timeline is pretty normal, it’s pretty sufficient to capture most places that are serious. But maybe a 60 day timeline if your project is something that you do just in the summer, like outside of a college time, you’re doing it in between a real job, maybe, and you need to schedule the time to do it, then that’s the point in time where, well, you communicate that. As the developer, you say, “My return timelines might be 60 or 90 or even 120 days.” Just let them know why. Security bugs might not get addressed right away because of restrictions that you have. And the sooner you communicate that sort of thing, the better.

Rob: I think a lot of it’s being consistent and communicating. I mean, I’ve seen it in this space way too many times where a bug is blown up. So, I’ll give an example. Recently, one of the big bugs at the time of this recording was the All-In-One Migration utility and it’s been everywhere. And I had a colleague call me and say, “Are you concerned about that?” And I said, “Truthfully, I’m not. Because I think they’ve handled it well.” If you looked at the bug, the patch is already out, so there’s the trust factor.

UpdraftPlus, one of the biggest backup programs in this space, a widely used one through that, where there was three or four updates in a row four weeks in a row and somebody said, “I’m concerned.” I said, “Why are you concerned? They’re actually doing the work and patching, so my trust level’s there.”

Robert: You should always highly trust every developer who releases security patches. And the exact opposite is true, you should never trust a developer who never releases security patches. Don’t be absolute there, but it’s definitely suspicious.

Rob: Yeah, it sure is. And to be fair, I don’t think in the last while we’ve seen any real bad bugs in the WooCommerce space, per se, we’ve seen a few, but we haven’t seen anything astronomical that I’ve seen. I think website developers at Woo stores are generally pretty careful because we’re dealing with people’s lives and money even more than on a regular website.

Robert: Exactly. Once you start dealing with a credit card it becomes a very serious issue, and I think most Woo commerce developers, it’s obvious. It’s Woo commerce. The commerce is in the name. You know this is a big issue.

Credit card companies, more or less at risk

Rob: Credit card processing, that’s really important too. I mean, we’re in an electronic age, we’ve gone on and on about the pandemic. Most people in North America for credit card processing I would think are running either Stripe or PayPal. Those are the two common ones, depending overseas what country. Are the credit card companies, like the processing companies, more at risk, in your opinion, or less at risk? Or is it just the volume of transactions that are going through?

Robert: From the credit card company’s perspective, I’ll try to put myself in that mindset. I think it’s gotten better for them. PCI is very old now, and I remember when it first came out people really seem to fear PCI. PCI auditing was… Companies, and don’t look into my history to try to figure out which company this is, but one company said, “What’s the easiest?” I had discussions where they’re like, “What’s the easiest PCI to pass.” And that discussion from me, my response back was, “They’re all easy to pass, you just have to do the basics.”

Nowadays, really most people see PCI passes are pretty easy to get through. It’s a big questionnaire, but the questionnaire is just to really isolate what technology you’re using so the PCI insurance board can put you in the right category as the types of risks that you’re going to be present. You run the scan, they’re not terribly expensive anymore, and you get the past report, you do it every quarter or every year, and you just keep yourself up to date.

Now, it works well enough. I think I mentioned right there one of the things I don’t like about it is only yearly, maybe quarterly, and really security is every week, every day. Any day a vulnerability could be released that could be affecting a component on your websites, so it’s important to stay up to date, and you should be staying up to date.

Moving the needle with major releases

Rob: Do you have any theory, Robert, about when major releases come out, should they… I know some people hold them back, because they’re afraid of problems. I always say to developers, if a major problem comes up, you should deal with it sooner than later. I always say to users, you should deal with it sooner than later. Website owners as well. Do you think major releases should be held back or do you think we should just move forward with them?

Robert: What I like is when major releases and feature releases are separate from security releases. The user needs to know what clicking this update button do? Is it going to give me a new feature, or is it going to protect me against attacks, or is it just this is the next iteration, the next new big thing? And in that case, yeah, if it’s just a major release and there’s no hidden security features or anything like that, then stay on your existing release, give it a couple of weeks, let the bugs get worked out, because we see that with major releases sometimes a bug is introduced. Not all the time, but sometimes. And when they are, it’s nice to be one behind and you just wait for that bug to get patched, and now you go to major release plus one, and now you’re on the latest and greatest.

Security firms running firewalls

Rob: How do you feel about security firms, and I’m not looking for anything controversial, that run firewalls on the front end to help you to avoid security problems, that stop some of the vulnerabilities. Are they worth running? Are they not worth running? Does the headache on the Woo side help or not help?

Robert: Well, firewalls and where they exist, there’s a complicated thing, because they could exist on a CDN, they could exist on your web application server itself, they could exist even within PHP, which gets really interesting. I think you should have a way to apply patches without affecting code and this is really valuable. This is what these firewalls do. Let’s say there’s a vulnerability that came out and it’s out now, and some security researcher or black hat hacker went out and just released full source code for, let me think way back, Tim Thumb is a good example. This is forever ago, and for those that don’t know, the vulnerability just allowed arbitrary file upload. So the attackers didn’t need authentication, they just needed to know the endpoint. Where is your Tim Thumb directory? Boom, they hit this upload file, upload program, and it uploads the files for them. Of course, the attackers will upload back doors and do further nefarious things from there.

In that case, many users couldn’t update their site’s code in the code, the vulnerable component in their code, fast enough. And this could have been for many reasons, mostly they weren’t aware that a vulnerability existed and they had the need to go in and start clicking update on. And for Tim Thumb this was themes. Themes are things that people don’t think about security so much and they’re a lot harder to update, so a lot of people were really slow on it and that resulted in a lot of people getting compromised in the end.

One of the things that could have helped, and did help with many hosting providers, that’s where I was working at the time, was writing a web application firewall rule, which effectively acted as a virtual patch. Whenever somebody tried to hit the endpoint or the URL where the file uploader file existed, you would simply block the request. And it did break functionality in some sense for Tim Thumb websites where they want to be able to use Tim Thumb’s internal uploader. But of course WordPress has its own internal upload tool. But more importantly is it protected the sites. Even though it reduced functionality, it protected the sites. It applied a virtual patch which didn’t change the code on the site itself, it just prevented the request from going through.

It’s important, but also important where you put it. So this can exist on a CDN, you would imagine like CloudFlare where you have to adjust DNS settings, putting it all in front of your website. It can exist on your website’s web server itself. And, like I said, it can exist within PHP itself, where PHP is aware of some interesting things and you can actually do blocks of requests from PHP itself.

Starting on your security journey as a developer

Rob: So true. As we get to wrapping this up, what would be the couple things you would say to a developer to help them in their journey with security? Because I think all of the developers, as we’ve talked about, don’t really understand that side. They say, “I write code.” Where would you suggest a developer start?

Robert: If I was talking to developers, excuse me, developers, you are learning to code and you’re learning a craft and a skill, and this is great, what you’re doing, but a whole aspect of this is doing it securely. In engineering, you don’t become an engineer because you can draw a picture of a building, you become a good engineer because you know the picture of the building you drew will continue to stand. That building is sound. The building is safe to use. Developers are really similar. You could build code that works and you could also learn the skills, the further skills, the security skills, to learn to build code that is secure.

A great way to do that is to simply embrace it. Attend information security conferences, find resources online that talk about how to find security bugs and how those security bugs work. Something I do every week is doing a podcast, Patchstack Weekly is what it’s called, it’s written and audio, where you guys can learn about whatever security topic I talk about this week. I just brush the surface, and if it’s something you’ve never heard of, I’ll give you the introduction, you can go further with it and find out how to apply it to your code.

I think once you know how security bugs work, then I’ll share the biggest core concept, never trust user input or never trust external inputs, always clean those things up and always make sure they are what you expected. You’ll start learning how to apply this through other methods of development, like defensive coding. PHB unit tests are something that I’ve been talking about for a while. You’re starting to see these things in the WordPress ecosystem, and I think that’s great, because unit tests are one of the easiest ways, well, to test if your function functions as you expect it to do, and what a great place to put in some security testing right there.

Rob: I think a lot of it is just trying to educate yourself and stay ahead of the curve as a developer. I mean, you got to continue to educate. The landscape or the milestone keeps moving every day, and I think if you try and learn a little more, it helps you write better code. And one of the things helping a code is good coding practices too. I mean, I’ve seen a lot of code in my time and a lot of developers actually write what I call really bad code, the code that we’ve all taught people not to write.

Robert: I know that. There’s a reason why I’m not actually a developer. I’ve developed code, I’m not particularly the best. I have high respects for the complex data structures that some developers and tools build out and function as, but it turns out I’m really good at the nuance of these specific security issues. And that’s why, like I said, I share this information with others, because I’d like everybody to be familiar with the nuances of security related issues. I’ve never found them scary or intimidating, and that’s probably because I didn’t write the code, so it was never an expression that I’m not a good developer in that sense.

But like I said, I know I’m not a good developer, but what I am good at is this little nuance thing, and I’d love to share that with other people. If they embrace the help that I give, then they’ll become better developers from the process.

Rob: So true. And it’s funny, you were talking about how Patchstack and you do another podcast. One of my favorite ones was you talked about the history of WordPress security recently, and I think people should go listen to that because I actually think, as a developer, the tools are out there so much, we’re in so much of a better place now than we were five years ago. Five years ago it was wild west and now there’s all kinds of tools out there to help you in your journey.

Robert: I’m actually glad you brought that up, because what I liked about when I wrote that it was how much has changed. The WordPress core project didn’t do everything in security right from the start, they’ve been around for, what is it, close to 19 years now, and they definitely have improved in the time. I basically said look, I liked it when the first patches for security patches, it was Matt Mullenweg himself saying, “You need to open this file and edit this line,” and how much better is it now that updates are automatic? You can just click update please, thank you, and it just works.

Rob: Thanks, Robert. If somebody wants to get a hold of you, or talk about Patchstack, or talk about anything you’re doing, how’s the best way these days?

Robert: Basically find me through Patchstack, either patchstack.com, I do those weeklys. You can find Patchstack app on Twitter. And I personally on Twitter is iamlei, I-A-M-L-E-I. But mostly just find me anywhere. You can always email me too. I’m pretty easy to find.

Rob: I’m Rob Cairns, find me @RobCairns on twitter or stunningdigitalmarketing.info will give you all the links that you need to get in contact, so reach out and I’m sure if Robert can help you, or if I can help you, we’d always be glad to. Thank you.

Robert: Absolutely.

Sponsors
Open Makers (archived)