Advanced Practices in Security Requirements
This annex presents non-mandatory advanced practices that may be adopted by organisations with greater maturity, normative demands (e.g. PCI-DSS, ISO 26262, IEC 62443), or a need for formal traceability and audit.
These recommendations do not replace the requirements of the SbD-ToE catalogue, nor are they considered in the calculation of maturity or threat mitigation.
They serve as an optional extension for critical contexts, and contribute to alignment with models such as DSOMM (Design & Development).
🔀 1. Automated Traceability
Objective: Enable continuous traceability between requirements, code, tests and validations.
- Use an ALM with traceability support (e.g. Codebeamer, Jama, Polarion, Jira + plugins)
- Create bidirectional links between requirements and artefacts
- Automate the extraction of coverage per requirement (e.g. CI validates that each requirement is covered)
🧪 2. Acceptance Criteria in BDD / Formal Language
Objective: Make requirements testable and machine-verifiable.
- Use Gherkin (Given–When–Then) or equivalent formats
- For critical environments, consider languages such as OCL, TLA⁺ or EARS models
- Example in Gherkin:
Feature: Autenticação multifator
Scenario: Acesso por utilizador administrativo
Given o utilizador possui privilégios de administrador
When efetua login com credenciais válidas
Then é solicitado a fornecer segundo fator de autenticação
📦 3. Internal Catalogues and Requirement Profiles
Objective: Reuse and standardise common requirements by application type.
- Create profiles by domain (e.g. internal API, mobile app)
- Keep versioned templates with REQ-IDs and criteria by type
- Validate the profiles with technical and architecture teams
📄 4. Integration with Threat Modelling
Objective: Align requirements with real modelled threats.
- Link REQ-IDs to threats (e.g.
VAL-002mitigates [STRIDE] Input Validation) - Justify requirements with model outputs (e.g. DFDs, IriusRisk)
- Use automated annotations with tools such as ThreatSpec or Diagrams as Code
📊 5. Coverage Measurement and Management
Objective: Monitor the definition, application and validation of requirements.
-
Useful metrics:
- % with defined criteria
- % with automated tests
- % validated in QA
- % traceable in the backlog
-
Generate reports per release or pipeline with the coverage status
🔐 6. Integration with Regulatory Compliance
Objective: Guarantee that the requirements cover mandatory normative controls.
- Maintain a mapping with:
- PCI-DSS v4.0
- ISO/IEC 27001 + 27002
- NIST 800-53, 800-171
- HIPAA, GDPR, ENS, etc.
- Create layers of regulatory requirements with tags (e.g.
#PCI-REQ-8.3)
🧠 7. Examples of High Maturity
| Practice | Added value | Suggested tools |
|---|---|---|
| Automated link between REQ-ID and code | Auditability and compliance | Semgrep, GitHub Adv. Security |
| Criteria in Gherkin | Testability and continuous validation | Cucumber, Behave |
| Bidirectional traceability | Support for regulated audits | Jama, Jira Traceability Matrix |
| Requirements coverage metrics | Visibility and continuous improvement | TestRail, customised dashboards |
| Internal requirement profiles | Scalability and standardisation | Versioned internal catalogue |
✅ Final Considerations
These practices are not mandatory, but are recommended when:
- The organisation is subject to formal certifications
- Criticality demands full traceability
- There are large, multidisciplinary teams
- Third-party audits need to be supported
📌 This annex may be extended with real examples and automatic traceability scripts.
🤖 8. Requirements as Code (Policy as Code)
Objective: Represent requirements in a structured, automatically enforceable format.
- Use YAML, Rego (OPA), JSON Schema,
.policy - Integrate with pipelines for automatic validation
- Example in Rego:
# Identificadores ilustrativos (EX-…); não correspondem ao Catálogo de Requisitos do Cap. 02.
package security.requisitos
default permitir = false
permitir {
input.req_id == "EX-AUT-001"
input.mfa_ativo == true
}
📍 This practice responds directly to DSOMM - Policy as Code.
🧰 9. Requirements Derived from Secure Design Principles
Objective: Translate architecture principles into verifiable requirements.
- Map REQ-IDs to principles such as Least Privilege, Fail Safe Defaults
- Create "Design Guidelines to REQ" mappings
- Ensure that architecture decisions result in traceable requirements
🧐 This practice reinforces alignment with DSOMM - Design & Development.