PHP developer in Rome

WordPress for businesses in Rome, delivered remotely by one developer.

PHP developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.

My WordPress.org profile

A PHP application delivered to an Italian public body can be accepted against a security reference that the supplier did not write: the AgID guidelines for secure software development. My name is Mariusz Szatkowski. I write custom PHP applications from Gdynia, remotely and in writing, and I either design the interface or build the one you bring. This page reads those guidelines for a Rome company that supplies PHP software to the public administration. It covers what the four annexes ask for, what the PHP chapter says, and where the 2020 text needs to be read against current PHP. I am not a lawyer, and the tender documents of each procedure decide what applies.

Panorama of Rome's rooftops and domes from the Gianicolo, with hills on the horizon

Rome from the Gianicolo. Photo: Krzysztof Golik, CC BY-SA 4.0, Wikimedia Commons.

#What are the AgID secure software guidelines?

The Agenzia per l’Italia Digitale (AgID), based at Via Liszt 21 in Rome, publishes the Linee guida per lo sviluppo del software sicuro in the CERT-AgID section of its site. The page says they belong to the ICT security guidelines for public administrations, whose purpose is to give measures for each component of the strategic model of the Piano Triennale, the three-year plan for IT in the public sector. The page was last updated on 6 May 2020 and lists four technical annexes, each dated 6 May 2020:

AnnexTitle (Italian)Subject
1Linee guida per l’adozione di un ciclo di sviluppo di software sicurosecure development lifecycle
2Linee guida per lo sviluppo sicuro di codicesecure coding, with chapters per language
3Linee guida per la configurazione per adeguare la sicurezza del software di basehardening of operating systems, web servers and other base software
4Linee guida per la modellazione delle minacce e individuazione delle azioni di mitigazione conformi ai principi del Secure/Privacy by Designthreat modelling and mitigation

An introduction, version 1.0 of 21 November 2017, frames the set.

#How do they reach a PHP supplier?

The introduction states plainly that the document applies to the public administration. Suppliers come in through the section on the application strategy:

  • the guidelines can serve as references for protection profiles that state, when the administration acquires applications, which security features it needs
  • when software management is outsourced, they can set the technical requirements and checks required before the software goes live
  • the administration provides precise rules for accepting systems and applications released by suppliers or developed internally, with obligations for the design, coding and maintenance phases

The same section says what the supplier of software, or the internal team, is then expected to do: address the security of the software according to the main industry standards described in the annexes, adopt best practice, fix vulnerabilities, keep to the contract terms for its staff and any subcontractors, protect information about known security problems and their documentation, and subject the source code to continuous security reviews throughout development, stating the standards, policies and practices it adopted.

The introduction names the people inside the administration who use the guidelines. One of them is the RUP, the official responsible for the tender procedure, who within a procurement procedure must require the supplier of each application to adopt specific standards for releasing secure software. AgID says it will monitor application through an annual questionnaire on the tools adopted and the results achieved.

For a Rome PHP supplier the guidelines show up as clauses in a capitolato, as acceptance criteria, or as a request to describe your secure development process in an offer. Reading the tender documents comes first; the annexes tell you what is behind the words.

#Annex 1: the secure development lifecycle

Annex 1 sets out to guide a secure development process across all phases of the software development lifecycle. Its chapter on security in every phase walks through:

  1. risk assessment
  2. requirements
  3. design
  4. implementation
  5. verification
  6. validation
  7. support

It surveys international initiatives (OWASP, Common Criteria, ISO, SAFECode, CERT Secure Coding, CWE, CAPEC and others) and maturity models such as SAMM and BSIMM. Its reference list starts with the GDPR, ISO/IEC 12207 on software lifecycle processes and the ENISA report on privacy by design. For a PHP project the annex does not prescribe a tool chain. It asks that each phase has a security activity and that someone can show it happened, which is the same evidence an acceptance check looks for.

#Annex 2: what the PHP chapter says

Annex 2 is 156 pages of secure coding guidance, with general rules first and then chapters per language. Section 7.9 is the PHP chapter. It covers twelve vulnerability classes, each with how to recognise it, how to defend against it and an example:

SectionVulnerabilityCountermeasure in the annex
7.9.1Cross-site scriptingvalidate input against a whitelist, encode output by context, HTTPOnly session cookie, explicit charset
7.9.2Code injectionno dynamic evaluation of input, a whitelist of allowed functions
7.9.3Command injectionavoid shell calls, static strings, escapeshellarg() where a shell is unavoidable
7.9.4File disclosurea fixed list of readable files, or one folder and basename() on the user’s value
7.9.5Remote file inclusionnever load libraries from user input, whitelist the names
7.9.6File manipulationrestrict writes to one folder and sanitise file names
7.9.7LDAP injectionwhitelist validation of input used in LDAP filters
7.9.8Reflected injectionavoid reflection driven by input, whitelist the callable names
7.9.9SQL injectionparameterised queries with PDO prepared statements, least privilege
7.9.10XPath injectionkeep user data out of the query or encode it
7.9.11XML external entitiesdisable DTD entity loading and validate XML against a strict schema
7.9.12Unsafe deserializationavoid unserialize() on external data, use JSON

Most sections repeat the same instruction to validate all input, whatever its source, against a whitelist of type, size, range, format and expected values. The code, command and SQL injection sections add the principle of least privilege for the account the code runs under.

#Where the 2020 PHP text needs current PHP

Some examples in section 7.9 were written for older PHP versions. A supplier who copies them into an offer or a code review checklist should read them against the PHP manual:

  • SQL injection example: The vulnerable code uses mysql_query(). php.net states that the extension was deprecated in PHP 5.5.0 and removed in PHP 7.0.0, with MySQLi or PDO_MySQL as replacements. The safe example in the annex already uses PDO prepared statements, which is the part to keep.
  • XML external entities: The annex recommends libxml_disable_entity_loader(true). php.net marks the function deprecated as of PHP 8.0.0, with the note that external entity loading is disabled by default, and says relying on it is highly discouraged. On PHP 8 the risk lies in code that turns entity loading back on, so a review should search for options that do that.
  • Output encoding: The annex lists htmlspecialchars(), htmlentities(), strip_tags() and an add_slashes() function for JavaScript. PHP’s function is called addslashes(), and php.net describes it as escaping quotes, backslash and NUL for strings evaluated by PHP, and warns that it is sometimes wrongly used against SQL injection. It is not a JavaScript encoder. For htmlspecialchars(), php.net records that PHP 8.1.0 changed the default flags from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, so single quotes are now encoded by default.
  • Deserialization example: The example reads $HTTP_RAW_POST_DATA. The PHP 7.0 migration notes say it was removed and that php://input should be used instead. The advice itself stands: php.net warns not to pass untrusted user input to unserialize() regardless of the allowed_classes option.
  • Remote file inclusion: The example in section 7.9.5 is written in Node.js, not PHP. The PHP side is configuration: php.net lists allow_url_include with a default of 0 and marks the directive deprecated as of PHP 7.4.0.

The same examples, written for PHP 8:

<?php
// 7.9.9 SQL injection: PDO prepared statement, without mysql_query()
$stmt = $pdo->prepare('SELECT id, name FROM tabella WHERE name = :name');
$stmt->execute(['name' => $name]);

// 7.9.12 deserialization: php://input and JSON, no $HTTP_RAW_POST_DATA, no unserialize()
$params = json_decode(file_get_contents('php://input'), true, 512, JSON_THROW_ON_ERROR);
$user = new User((string) $params['name'], (string) $params['email']);

// 7.9.1 XSS: the flags PHP 8.1 and later use by default, written out
echo htmlspecialchars($name, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');

JSON_THROW_ON_ERROR was added in PHP 7.3.0, according to the json_decode() changelog, so invalid JSON stops the request instead of returning null.

#Annexes 3 and 4: hardening and threat models

Annex 3 deals with base software: operating systems, browsers, workstations, web application servers, database servers, mail servers, service buses and office suites. Its Linux list includes hardening of the installed PHP, and its web platform section asks to remove response headers that reveal the server and to disable the HTTP TRACE method. On the PHP side, php.net documents expose_php, which adds the PHP version to the X-Powered-By header, has a default of 1 and can be changed in php.ini only; switching it off is the PHP part of that header rule.

Annex 4 covers secure and privacy by design. It describes STRIDE applied to each element of a data flow diagram, DREAD to rate the risk of the threats found, and LINDDUN for privacy threats, with chapters on secure design for web applications, cloud, serverless and distributed ledgers. For a PHP application sold to a public body, a data flow diagram with a STRIDE table per element is a document that fits an offer and survives an acceptance review.

#Checklist for a PHP supplier to a public body

  • Read the capitolato and acceptance rules first, and list where they cite AgID guidelines.
  • Describe your lifecycle in the seven phases of annex 1, with the security activity of each.
  • Run every PHP example you reuse from annex 2 against the current PHP manual.
  • Use prepared statements for all queries and JSON for data exchange, never unserialize() on input.
  • Encode output by context, with explicit htmlspecialchars() flags in shared templates.
  • Set expose_php off and remove version headers on the web server.
  • Produce a data flow diagram with a STRIDE table for the application.
  • Keep evidence of code reviews, because the introduction asks for continuous security reviews of source code.

#How does a project run?

  1. You send the tender documents or the requirements, the PHP version, the framework and the deadline. Expect my emailed answer within 24 hours on working days.
  2. I map the security requirements to the code and write down scope and assumptions.
  3. Work runs on a staging copy, with the review evidence the contract asks for.
  4. You accept in writing, and the release follows.

General information on my PHP work is on the PHP developer page.

#Send me the tender or the application

If your Rome company supplies PHP software to public bodies, send me the tender documents or requirements, the PHP version, the framework and your deadline through the contact page. There is no charge for the first written estimate. The legal reading of a tender stays with your lawyer.

Need this service: PHP developer in Rome?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Latest PHP developer articles

Dec 2, 2026

Laravel Rust: what does it mean for PHP apps?

On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.

Explore other WordPress services and knowledge base