Secure development

Building security into AI-powered advertising systems

Release boundary: code, package, server arranged to illustrate building security into ai-powered advertising systems.

Building security into AI-powered advertising systems connects a security requirement to the behaviour of a real feature. The relevant controls need to remain effective across custom code, integrations and the production configuration. Understanding security into AI-powered advertising systems helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Release security connects reviewed source and configuration to the software that reaches production. Build identities, dependencies, signing, artefact storage and deployment permissions all influence whether the delivered application matches the intended release.

Each section pairs the primary controls with a compact threat / evidence / runtime-signal table so a reviewer can trace each threat to how it is verified and monitored.

Running a personalization, targeting, ranking, or lookalike model on personal data is profiling under GDPR Art. 4(4). Contextual review that reads page content and no user data is outside that definition, so do not gate it on profiling consent. That exemption ends the moment its output is joined to a user identifier, so treat the join, not the review, as the point where consent attaches. Gate the identifier write and the model call separately. ePrivacy Art. 5(3) attaches consent to the storage or access itself, so the write needs consent even when no model runs, and the model call is the gate teams usually miss.

Why it matters

Consider a realistic failure: an advertising workflow exposes personal audience data through an AI integration that can also change campaign settings.

An attacker who changes a trusted build input or release artefact may reach many users or systems through a legitimate delivery channel. Broad credentials and weak separation can increase the effect of one compromised job or account.

Implementation guidance should be applied to a real feature and its deployment. Framework defaults, custom handlers and integrated services all influence whether the intended protection remains effective.

How penetration testers check for it

Trace the relevant feature from its entry point to the data or operation it protects, including custom code and alternate paths.

  • Trace source changes through build, signing and deployment.
  • Review identity, permissions and secret exposure at each stage.
  • Inspect artefact provenance and integrity checks.
  • Compare development assumptions with actual release configuration.

How to fix it

Use the appropriate maintained mechanisms and verify the result in the actual production configuration.

  • Treat consent as an authorisation check, not a model feature.
  • Consent-scope the training corpus per IAB Europe TCF. TC strings are personal data (CJEU C-604/22).
  • Test for special-category inference from generic inputs (GDPR Art. 9, DSA Art. 26(3)).
  • Tag every training row and RAG chunk with a participant-provenance tag so scoped-rollback ("exclude every row from partner X during window Y") is answerable without re-hashing.
  • Control dependency and artefact changes.
  • Validate production outputs and retain a reliable recovery path.

Passing a build does not establish trustworthy provenance. Verification needs to cover who could alter the inputs and artefacts as well as whether the pipeline ran successfully.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss secure development and code review.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo