AI pentesting guides / By industry

Government and councils

Public sector application testing that stays inside your boundary

Public sector application testing is the security testing of citizen-facing services, case-management systems and the APIs that connect government departments, usually under tighter rules than private companies face on where data may go, who may test and how results are recorded. The common requirement is evidence: an auditable record that the right systems were tested, by approved means, with findings tracked to closure.

Government services also tend to have long-lived systems sitting next to new digital services, many integrations, and limited security staff. Automated testing that can run inside the organisation's own environment, without sending data to outside services, fits these constraints better than tools that only work as cloud SaaS.

What makes the public sector different

  • Data residency and classification rules that limit which external services can see traffic or findings.
  • Procurement frameworks and approved-supplier lists for formal testing.
  • National assurance schemes, such as accredited testers for some government work, that formal tests must follow.
  • Mixed estates of legacy systems and modern APIs maintained by different suppliers.
  • Public accountability, so every test needs a clear authorisation and audit record.

Citizen-facing services and APIs

Benefits, tax, licensing and booking services handle identity documents, financial details and sensitive personal data. The riskiest flaws are access-control failures that expose another citizen's case, weak identity verification, and APIs shared between agencies that trust each other too much. Test each service with several citizen and staff accounts, and test inter-agency APIs as if the calling system were compromised.

Supplier-built systems

Many services are built and run by contractors. Make testing rights and remediation timelines part of contracts, and test supplier releases before they go live rather than relying solely on the supplier's own assurance.

Open source and auditability

Open-source testing tools let security teams inspect exactly what will be sent to a system before it runs, which helps with change-control boards and risk owners who need to approve testing on live services.

With Pentest-Swarm

How Pentest-Swarm fits public-sector constraints

Pentest-Swarm is open source and self-hosted, so testing can run entirely inside a department's own environment with a reviewable code base.

  • Run fully local models through Ollama or LM Studio so no data leaves the machine, including on networks without internet access.
  • Scope is enforced in code and fails closed, an egress guard limits outbound traffic, and every action is recorded in an audit trail.
  • The AGPL-3.0 licence means your team can read and review the code that tests your systems.
  • API security, OWASP Top 10 and internal network range playbooks cover citizen services and back-office systems.

Where it falls short

Pentest-Swarm is alpha software and is not an accredited or government-approved testing service. Where a national scheme or authorising official requires an accredited tester, use one. Armur's managed service is not FedRAMP authorised or government-certified, so self-hosting is the relevant option for classified or restricted environments.

Questions

Can government agencies use AI pentesting tools?

Many can, subject to their own policies on data handling and AI use. Self-hosted tools that run on local models avoid sending data to external AI providers.

Does public sector testing require accredited testers?

Formal assurance tests often do, depending on the country and system. Internal continuous testing can usually be performed by the organisation's own security team under its own policies.

How do you test legacy government systems safely?

Agree scope and timing with system owners, start with non-intrusive discovery, test in pre-production where possible, and keep a full audit record of every action.