Digital Payments in Iraq: A Security Checklist
How to accept wallet, QR, card and online payments in Iraq safely: server-side confirmation, webhook checks, reconciliation and account protection.
A practical guide for PHP and Laravel teams to enable Composer's malware blocking, cooldown and advisory policies, and fix the habits attackers exploit.

For years, PHP teams treated composer update as routine housekeeping. In 2026 that stopped being safe. The self-spreading supply-chain worms that had already hit npm and PyPI reached Packagist, and Composer answered with new protections in versions 2.10 and 2.11. In my view, Composer supply chain security is now a configuration job that every PHP and Laravel team should finish soon, and most have not started it yet.
This article explains what changed, how to switch the new policies on, and which habits around them matter just as much.
On 30 April 2026, attackers took over intercom/intercom-php version 5.0.2. They overwrote the existing version with code that turned the package into a Composer plugin. According to Semgrep's analysis, the plugin ran during installation, downloaded the Bun runtime and launched an obfuscated credential stealer. You did not need to call the package from your code. Installing it was enough.
The same analysis points out a structural weakness. Packagist does not store uploaded files. It indexes tags from a registered Git repository, so if a maintainer's GitHub account is compromised and a malicious tag is pushed, Packagist can serve that version within minutes.
In May, Socket reported eight Packagist packages with malicious code hidden in package.json rather than composer.json. These targeted PHP projects that also ship JavaScript build tooling. Teams that scan only Composer metadata would have missed them.
Composer's lead maintainer, Nils Adermann, has made the point plainly in a recent talk: one compromised GitHub account, or one badly secured GitHub Action, is now enough to reach a widely used PHP package, and the number of attacks keeps rising.
Since March 2026, Packagist.org has imported malware detection results from Aikido. Flagged versions are marked on the website and in the package data Composer reads. Packagist also added delisting of confirmed malware for older Composer clients, package freezing during active account takeovers, and organisation-level package ownership to replace shared company accounts. All of this is described in Packagist's supply chain security update.
Composer 2.10 introduced native malware filtering and a single config.policy object that covers security advisories, abandoned packages and malware. As Private Packagist explains, flagged versions:
update, require and create-project runcomposer install, even if they are already in your lock filecomposer auditThere are two limits. A project can switch malware blocking off in its own composer.json, and Composer versions older than 2.10 have no policies at all, so they keep installing flagged versions.
The 2.10 release also moved older settings into the new object: audit.block-insecure became policy.advisories.block, and audit.ignore-severity became policy.advisories.ignore-severity. The 2.10.0 release also fixed several security issues: less token leakage in URL output, a fixed https-enforcement bypass, and git credentials no longer left in mirror configuration.
Composer 2.11 adds a cooldown policy that holds back newly published versions for a period you choose. Packagist's reasoning is simple. Malicious versions are usually pulled or detected within hours of publication, so a short waiting period gives detection time to work before a new version reaches your builds.
Here is an example project configuration. These options are new, so check the exact key names against the official Composer documentation for the version you run.
{
"config": {
"policy": {
"advisories": { "block": true },
"malware": { "block": true },
"cooldown": { "period": "7 days" }
}
}
}
You can also set the cooldown globally on a build machine:
composer --version
composer config --global policy.cooldown.period "7 days"
composer audit
A few practical notes:
"block": false under the malware policy. If you genuinely need an exception, scope it to a single package and record the reason in the pull request.Policies help, but in my view ordinary habits matter just as much.
Use the lock file properly. Commit composer.lock. Run composer install, never update, in CI and production. Review lock-file changes in pull requests the way you review code. A new transitive dependency deserves a question.
Check the JavaScript side. A Laravel app with Vite or other npm tooling is a JavaScript project too. It is exposed to npm worms and to package.json hooks inside Composer packages. Use npm ci, consider --ignore-scripts where your build allows it, and apply a minimum release age to npm as well.
Protect secrets. GitGuardian found more than 10,000 unique Laravel APP_KEYs on GitHub, confirmed 400 still worked, and found 4 production applications exposed to remote code execution. Never commit .env. Turn on secret scanning. If APP_KEY or any credential reaches a repository, rotate it. If a compromised package was ever installed, follow the advice of Singapore's Cyber Security Agency in its 2026 advisory on the Shai-Hulud family: treat every credential the affected machine could reach as potentially compromised, and rotate it.
If your team publishes packages, internal or public, you are part of someone else's supply chain. The basics:
pull_request_target triggers and shared cachesDon't rely on signing alone. One of the large npm worms of 2026 shipped malware with valid signed provenance, because the attackers abused the build pipeline itself.
AI coding agents add a newer risk. Private Packagist warns that an agent may install a package "on a whim". The answer is to enforce Composer and npm policy centrally, on build machines or through a private repository, so no tool or agent can quietly bypass it. Review AI-generated code with the same care as a junior developer's, using the OWASP Top 10 as your baseline.
PHP and Laravel are the main web stack for many software houses and institutional IT teams here. The weak points I tend to notice are ordinary ones: old Docker or CI images that have not been rebuilt for a long time, and shared deployment accounts.
A one-day "dependency hygiene" sprint is a realistic first step. Rebuild your base images with a current Composer, add composer audit to CI, and move each package and deployment to named accounts with two-factor authentication.
Institutions that buy software can help too. When a contractor delivers a government or university system, ask for the composer.lock file, the composer audit output and the Composer version used. It costs the contractor almost nothing and tells you a lot.
If you would like an outside review of your build pipeline and hosting, my company, Standing, provides IT services, security and hosting, and can help with this kind of review.
| Setting | Recommended value | Why |
|---|---|---|
| Composer version | 2.11 or later everywhere | Below 2.10 there is no malware blocking; below 2.11 there is no cooldown |
policy.malware.block |
true (never disabled project-wide) |
Blocks flagged versions, even ones already in the lock file |
policy.cooldown.period |
3–7 days | Malicious versions are usually pulled or detected within hours |
| Cooldown exemptions | Per package, short-lived | Security patches should not wait |
policy.advisories.block |
true |
Stops known-vulnerable versions being installed |
| CI install command | composer install and npm ci |
Reproducible builds from reviewed lock files |
composer audit |
Required CI step | Reports advisories and flagged malware |
10-minute checklist
composer --version on laptops, CI images and build servers.false.composer audit a required CI step.composer.lock is committed and CI never runs update.npm ci and review install scripts..env is in .gitignore and secret scanning is on.Composer now does much of the defensive work for you, but only if you run a current version and leave the protections switched on. Upgrade Composer everywhere this week, set a cooldown, and treat your lock file as code. That small effort closes many of the doors this year's attacks walked through.
🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.