Skip to main content

Examples of Applying Security Requirements

This annex illustrates, in practical terms, how to apply security requirements throughout the lifecycle of a new feature, based on the application's risk classification.

ℹ️ This document presents a complete practical example of applying the security requirements defined in Chapter 2, showing how to apply them to a new feature throughout the development lifecycle.
It is not a prescriptive document but a reusable case study that follows the logic:
classification → selection → traceability → validation.
It can be adapted and replicated in other contexts, keeping the principles of proportionality and traceability.

Scenario: New document upload feature in a B2B web application​

🧩 1. Context​

  • Application: Contract management web portal
  • Type: Web application with federated authentication
  • Data: Contractual and personal (some sensitive)
  • Classification: Level 2 (medium risk), as per Chapter 1
  • New feature: Allow authenticated users to upload PDF documents

🔎 2. Review of the risk classification​

Before defining requirements, the team reviews the application's classification in the light of the new feature:

FactorChange with the new feature
Exposure surface↑ Direct upload by end users
Data sensitivity↔ Unchanged (data was already sensitive)
Third-party dependency↔ No changes

Decision: Remains at Level 2, but exposure increases.


📝 3. Identification of the relevant requirements​

Based on the catalogue themes (Ch. 2) and the domains affected by the feature (input, files, authentication, logs), the following requirements are selected:

IDDescriptionTheme
REQ-003Sessions with a 15-minute inactivity timeoutSessions and State
EX-REQ-010Validation of type, extension and size on file uploadInput and Output Validation
EX-REQ-011Malware analysis before file storageAntivirus and Malware
EX-REQ-015Logging of upload attempts and associated errorsLogging and Auditing
EX-REQ-018Creation of automated tests for malformed inputs on the API endpointSecurity Testing

Illustrative identifiers (EX-…); they do not correspond to the Requirements Catalogue of Ch. 02.


🔗 4. Traceability (risk → requirement → control → validation)​

Identified riskRequirementControl implementedValidation
Upload of malicious filesEX-REQ-011Antivirus integration in the pipelineCI/CD with automatic scan
Abuse of the endpoint with large filesEX-REQ-01010 MB limit + MIME type checkFunctional test + logs
Abusively long sessionsREQ-00315-minute timeout with re-authenticationUI test + Selenium script
Lack of visibility over critical actionsEX-REQ-015Logging with alert level and centralisationLog review + alerts

Illustrative identifiers (EX-…); they do not correspond to the Requirements Catalogue of Ch. 02.


👥 5. Roles involved​

RoleContribution
Dev TeamIntegration of the controls in the endpoints/API
QA/TestingWriting the automated tests
Security (AppSec)Validation of requirements and traceability
Product OwnerInclusion of the criteria in the backlog and user stories

📆 6. Checkpoint in the lifecycle​

  • The requirements were included in the user stories
  • The acceptance criteria were defined in Gherkin
  • The tests were validated in the continuous integration (CI) phase
  • Traceability validation was carried out during the sprint review with support from security

Conclusion​

This example demonstrates the practical application of security requirements from risk identification through to technical validation, ensuring traceability, proportionality and integration with agile development processes.

This same process can be reused in other cases with minimal adaptation, as long as the logic is kept: classification → selection → traceability → validation.