Monthly Archives: April 2026

IT Security for Dummies

Recently there have been multiple very serious supply chain exploits that have yet to cease causing problems. Security folks laugh and say “least privilege”, “patch hygiene” and shrug at us mere mortals just trying to go about our days in peace.

They are of course right, us normals are way too comfortable downloading random libraries from the internet, some smaller firms do not have the manpower to manually vet every patch before they are applied, but best case pick a slower update ring to have a chance that others discover problems before they get to them.

In some less competent organisations, security is retrofitted – i.e. every environment is locked down with no regard to working processes, meaning productivity grinds to zero.

Just like you can’t apply marinade after the fact, security – and quality – must be built in from the beginning. Everybody knows that – if you can believe it – but it is very hard to find concrete guidance on the public internet on what to do as a developer. This isn’t it either, by the way. If you were hoping for the professional developer’s guide to hardened development environments, this is definitely not it. I’m just some guy on the internet. At work I have highly qualified coworkers that help me whose secrets I cannot spill.

However, I will try to explain what is going on, and give some basic suggestions that improve your security if you are literally at zero right now.

I will only focus on things that are relevant to a developer machine, so things like OAuth hygiene (not allowing random apps access to your apps or your infrastructure) or what exactly secure code looks like are out of scope here.

I keep this stuff vague for the sake of broader applicability, but hopefully the terms I use are easy enough to google for your platform / stack.

What is happening?

A supply chain attack means that instead of bothering with attacking a company directly, the tools that companies use are attacked and have critical data stolen. Once the data looks relevant (crypto wallet keys, AWS keys, OpenAI credentials, signing keys for popular open source libraries et c) they either sell the information off to other criminals, or go on and attack further organisations. This means we have no idea what the total blast radius will become from an attack that first happened in February. Sometimes data hangs around even longer before further exploits can happen.

Far too many attacks are exploiting system administrators and developers. Sadly AI have made these exploits far easier. Even if the user has properly locked down credentials, the malware can still do everything you can do, so you can get a malware to calmly enumerate all of your secrets, your session configuration files, anything in the filesystem you can read that looks like a relevant password or key and upload it. It didn’t hack anything, you just ran a program that did what programs do, and it could still be enough to bring down a whole company. Once on the computer it can sometimes tell the operating system to load malware as part of the process of starting other programs, and transparently investigate any programs you run on your computer to see what other things you offer up.

What is happening? Well, many things, but one avenue of attack is adding code that runs as soon as a python library is imported. If you ask cursor to solve a problem, it will create a requirements.txt file and if you just import it and aren’t aware of specific versions, you can be owned right there. Other package managers of various forms have similar initialisation code that can be exploited. For operating system packages you need to elevate before it gets to do anything, but today’s bad guys do not need elevated privileges, they do harm with your information alone.

But I am using a Mac, that means it’s secure, right?

Yes and no. The security culture on a Mac is far better than it has historically been on Windows. You have to elevate to do administrative things, the normal user has limited access to make system wide attacks, it’s harder to cryptolock your computer than an old Windows computer on a dodgy network.

But the problem with the latest attacks is that they do not ransom you directly, they just silently steal thing things you may rely on in your daily work.

Also, olden day security culture meant things like having a “secure” folder called ~/.ssh where you kept keys that let you remote access into other computers or push commits to GitHub. It’s chmod:ed 600, meaning only you – but unfortunately also any malware that runs under your account – can read or write it. This was considered secure when the big threat was your colleagues logged in to the same machine would steal your credentials by accessing the files directly. Today the threat is using your credentials, so anything you can read, the bad guy can read.

The benefit of a UNIX-like environment is that it is relatively easy to create a separate user account that can keep any elevated credentials, meaning you can ensure that your daily driver OS user has nothing seriously dangerous on it that can get stolen whilst browsing the internet. The recommendation is the same on Windows, but it is a lot more cumbersome to use.

What to do then?

Basically, you cannot have anything written down on your account that is sensitive. Unfortunately, we need to get work done, and just like it is unhelpful to yell at people for downloading attachments from email and clicking on them, when their literal job is to download attachments from email and clicking on them, we need to figure out other ways of working.

What about a VM? Sure – if you have the compute horsepower or the money, a developer virtual machine that has no credentials at all on it is helpful. Use command line tools that let you log in via a browser to get temporary credentials when pushing code.

Another option is using dev containers. At some point you will need to give credentials to pull or push code to some remote git repository, and you can write scripts that use docker exec to pass single use credentials into the container for that specific execution. If you need access to cloud resources, either proxy via another container running on your computer or command line tools that temporarily give you specific rights. What is the easiest is up to you. Devcontainers are natively supported by VS Code and Cursor, so a lot of the faff is hidden.

To avoid CI tools automatically upgrading your libraries on the server when you build, you can pin versions of your dependencies and commit those version specifications to the repository. Combine that with some tool like snyk, dependabot and npm audit or similar tools to make sure you get a heads-up when vulnerable versions are out there, you can make conscious decisions to upgrade rather than automatically get pwn3d by a nightly build that accidentally pulled down an exploited 3rd party dependency.

There are local secrets managers you can run rather than have your app read configuration files locally. Even if you use Microsoft’s user secrets for local dotnet development, the secrets are still user readable – obviously – so you are vulnerable to those secrets being read anyway. You would think that cool hacker types would be unaware of how .NET programmers store their secrets on developer machines, but in the day of AI, they will not have to know, they will be told by the AI.

What about when your CI authenticates with *aaS providers or external artefact repositories? General advice is – use short-lived keys that aren’t persisted anywhere, i.e. use OAuth to grant access where possible. When the apps you grant access to are exploited – as some have been in the recent spate of attacks – they will have access to do what its token allowed the app to do when you granted access, so make sure to use whatever tooling helps you reduce scope on the access you give. Yes, the cool security types are right about least privilege as well. On the positive side – tooling has improved so the faff is less overpoweringly tedious. AWS for instance are very good about documenting the least access you need to give when creating IAM roles, which is very useful.

Conclusion

No SSH keys on your machine, don’t casually keep static root cloud credentials around on your computer. The passwords in your cloud based password manager can get stolen either in your browser or via direct attack leveraging an insecure development environment (*cough* *cough* LastPass, Bitwarden), so use tooling to assume roles with temporary credentials whenever you need to do something cloudy.

If you do adminy things that need extraordinary powers, feel free to do so from a separate user account, as there is no need for superpowers whilst browsing programmer blogs. On Linux and Mac that is so easy to set up and use.

Your computer will be exploited. Make sure there is nothing on it that can destroy your life or your livelihood when it gets on the internet. It’s a little bit like the old adage about email, “email like you will one day read it out in a court of law”.

Open Source

Maslow and Evil Corporations

Boomers gave us the internet. Gen X would like to claim we were the only ones to know an online world and a “real world”. We got our mobile phones as adults, basically. Millennials now claim to be the first online people, giving younger generations a lot of snark. I think Gen X and Millennials will be like drivers from the 1970s, sure you can drive, but you can also adjust a carburettor and replace points in the distributor at a push – because you needed to be able to just to get to work back in the day. Same thing with Gen X and Millennials, we will like someone said – be the only generations that can rotate a PDF. Sorry for the digression – but the points is boomers gave us the Internet. Sure, Tim Berners-Lee gave us the web, but the internet of today is largely the product of some geniuses working for the US military or Big Telephone in the US, some honest-to-goodness hippies at UC Berkeley, a guy from Finland (Swedish speaking minority, mind you) and of course, that British guy from CERN, the aforementioned father-of-the-web – Tim Berners-Lee.

Now, a lot of the innovation that came from American academia came from a group of people that could afford to buy a house, that were tenured professors and otherwise never had to worry about money. They were all way up on the Maslow hierarchy of needs.

Their main concern was evil corporations writing sinister things in code and taking people’s freedoms away by stealth. Much better to make the source free for everyone to see, because now that Big Telephone has invented the high level language C, everybody can read code, right? I mean, history has proved their point about evil corporations – and evil government bodies – 100% correct, so – well, fair play.

Freedom versus Trade Secrets

Meanwhile, a lot of software development started happening in various companies around the world. People doing clever things in computer games or in business, where they wanted the algorithm itself to be kept as a trade secret.

Like everywhere else in life, a religious struggle ensued.

The gilded elites in California proclaimed that software should be free. People heard free-as-in-beer, but the gilded elites meant free-as-in-speech.

The free-as-in-speech crowd wants there to exist a corpus of free software that you can use, but not abuse. You are free to use it in any way you like, but you need to contribute back and you cannot distribute it as your own – roughly – there are a couple of different licenses.

The free-as-in-beer crowd heard “free” and thought it was a great idea to use free software to then make money on top of by creating products. Of course this strikes against the core ideal of the free-as-in-speech crowd, so that led to the creation of Open Source, which is more freely available to be exploited commercially – also driving the creation of additional popular licenses.

Then there is of course the third “I just need to pay rent” crowd that writes whatever code the employer asks for, that shamelessly exploit the work that the either free software crowd put out there, only of course abiding by the license agreement, since even SMEs have a legal department.

I am part of the third group obviously, so my description will not be entirely accurate, but this is my blog, roast me in the comments.

The toll

Now – contributing to open source or free software projects require a lot of guts. You submit your code for review by people that probably aren’t peers, but rather your elders. All dynamics that come into play when humans interact over limited bandwidth – i.e. usually text only – come into play, and the amount of toxicity that appear in free software and open source communities is staggering. Also, the more “core” a project is, the more edge cases you have to think about, especially since a lot of older libraries maintain compatibility with obsolete hardware. As far as I can tell best case the vibes are like in a Stack Overflow thread.

Now – with the advent of package managers on various platforms it has become super easy to take on a dependency on a clever piece of code you find on the internet. All of a sudden some student that wrote something over summer gets pinged with Github issues in the middle of the night because some bank’s deployments are failing and a couple of people are afraid of getting fired. No compensation to the maintainer of course.

The maintainer’s job is thankless and never-ending.

At some point a popular open source project will negatively affect the maintainer’s life, and they need to start making hard choices about whether or not to continue. If they dare to choose to segregate their library into free versus paid versions, i.e. partially closing the source, all three groups of people rage in protest.

By the way – citing Linus Torvalds as a success story to counter the greater narrative is like saying buying lottery tickets is a valid strategy to put food on the table because a few people do win.

The maintainer of core-js had to move home to Russia to afford to live. The whole internet hinged upon his package, but he had such a small income he had to take his chances getting drafted into a war, because if he wanted to generate enough money to afford to eat in a Western country the whole internet told him to do one.

Because of the interpersonal dynamics that sometimes crop up in these communities, a lot of effort is spent making welcoming spaces for beginners, such as creating issues that are classified as “great for beginners” because the interdependencies are contained and thus the blast radius is small, so you can allow a beginner to get their feet wet, open a dodgy PR and be guided through making it perfect. Obviously this mentorship time also comes out of the maintainer’s limited actual hours of life, so this is yet another thing that burdens the maintainers.

Maybe you saw the story of an AI agent that supposedly autonomously grabbed a ticket from an open source project tagged “great for beginners”, implemented and submitted a PR and then wrote a slanderous blog post roasting the maintainer by name when the ticket was rejected specifically because the ticket was there for humans to learn and contribute. I doubt the story is that clear-cut and there was no human in the loop there, but if not- the AI has fully adopted the toxicity of an entitled user of open source software. Yay, I guess.

The problematic volume of entitled users that the introduction of package managers generated seems to have been multiplied yet again, when open source projects that could rely on support contracts to pay employees to maintain the open codebase all of a sudden are starved of their income as AI agents steal their lunch. If your framework becomes the favourite framework proposed by Open AI or Anthropic and the various agents that use their models, you will get a gigantic user base over night, but no revenue. If you put a price on your framework, you lose the entire user base. Fundamentally – pick your poison.

The proposal

Just like when websites started to put ads everywhere in ever more elaborate configurations so that they could pay “journalists” to create listicles – I started thinking… There must be a better way. Surely, we should be able to create conditions where journalists can eat without infecting my computer with malware.

Yes, I am pro paywall. If a “newspaper” produce great writing, I pay a subscription – like in the olden days, hoping that there is collectively enough money for them to avoid chasing clicks Buzzfeed-style.

I therefore think, that conversely, we need to figure out a way where there are some coins falling into the developer’s wallet when they publish some code that others end up using. Perhaps a subscription to an entire catalog of libraries like photo library subscriptions or the music libraries YouTubers use to safely put music in videos. Subscription based on allowance of access (so that a giant company pays more than one dude in his attic), like an app store.

That way, if your AI agent starts loving a certain library, that maintainer will be able to take days off work to review PRs, or sell it to someone who has the time (because the expected revenue is possible to estimate, and it is greater than 0) – and the liability for any rogue takeovers (like the axios hack) can stay with the app store, their “cut” can pay the necessary liability insurance.

Second Law of Thermodynamics

Time’s Arrow. Energy can only change phase in one direction without needing physical work. I.e a cup of coffee cools down when left in room temperature. You will need to actually heat it up, perform work, for the cup to be hotter. A tidy room left alone will get messy until you apply work to organise it, et cetera.

I think we see the same thing happening more broadly in society. Like the iPhone killing the luxury phone market. Perhaps you do not recall it, but there briefly existed niche providers selling phones and laptops covered in gold and diamonds, aimed at the Gucci customer base to ostentatiously signal wealth, but that market is dead, and the flashiest you can get is an iPhone Pro Max Mega Ultra or whatever the latest is – which are far cheaper than those old blinged-out flip phones were.

Music was immensely valuable back in the day, and of course – a proper experience like being in the room with a chamber orchestra is pretty full on, no CD or MP3 can ever compete. Even the much less refined form of music, getting a couple of lads in a room and attempting to play an old song at roughly the same time is an incredibly rewarding experience.

Now people stream all kinds of music with ease. You start getting things like “functional” music for concentration, workouts or relaxation. Music that people don’t really care about, it’s like morning TV was, just a bit of pleasant noise in the background that fulfils a specific purpose.

Just like with the iPhone 1 – it being “good enough” for a lot of people, destroyed an entire market – I think this is what is happening with music, video, and software with the advent of AI.

Why get a tool for something when you can just tell Cursor to sort you out? It’ll push back and argue cost of maintenance versus a more high-level script, but it’ll write things for you. Python, Rust or something else? You decide. Whatever you say, the sycophantic AI will tell you it was a brilliant choice. If you have a well defined problem space and clear acceptance criteria, you can create code you only have passive knowledge of – i.e. can read and understand, but not a solid awareness of how to construct idiomatic code in it – without the perhaps hundreds of hours of googling for documentation you used to have to go through. For a singular problem ( e.g. “I need to test a development website for 123 specific scenarios listed in an excel file…”) it makes perfect sense, and after you’ve validated your results, you can keep the evidence and throw the code away.

Entropy.

Things devalue as tooling becomes more competent. Like people don’t need to know how to adjust carburettors anymore just to own a car.

The lowest bar gets higher, but also the highest bar gets lower.