Skip to main content

Traceability and Audit Policy

1. Objective​

This policy defines the cross-cutting traceability and audit requirements that must be met throughout the entire lifecycle of each application.

Traceability is the ability to reconstruct, at any moment, the chain of decisions, evidence and artefacts that support an application's security posture - from the defined requirements to the code in production, including the validations executed, the exceptions approved and the operational events recorded.

Without effective traceability:

  • Security audits become exercises in speculative reconstruction
  • Incident investigation loses rigour and reach
  • Regulatory compliance cannot be demonstrated objectively
  • Risk decisions are left without associated evidence

This policy is cross-cutting - it applies to all domains of the SbD-ToE Manual in which evidence, approvals, artefacts or auditable events are produced.


2. Scope​

This policy covers the following dimensions of traceability:

DimensionDescriptionChapters
RequirementsTraceability between security requirements, backlog work and validation evidenceCh. 02
Code and pipelineTraceability commit → build → pipeline → release → deployCh. 07
ArtefactsProvenance and integrity of build artefacts (SBOM, signatures, SCA)Ch. 05, 07, 09
InfrastructureTraceability IaC file → resource → environmentCh. 08
Validation evidenceArchive of SAST, DAST, fuzzing and SCA reports and exceptionsCh. 06, 10
Operational eventsStructured logs with guaranteed integrity, correlatable with incidentsCh. 12
Security decisionsApprovals, exceptions, risk acceptances, threat modelling resultsCh. 01, 03, 14
Regulatory complianceMapping between technical controls and normative requirementsCh. 12, 14

3. Fundamental principles​

  • Bidirectional traceability - it must be possible to navigate from the requirement to the code and from the code to the requirement
  • Executable evidence - reports produced by real execution, never by manual declaration without technical support
  • Immutability - audit evidence must not be alterable after it is produced; WORM storage recommended at L2/L3
  • Correlation - events from different sources (commit, pipeline, log, incident) must be correlatable through common identifiers
  • Proportionality - the level of detail and formality scales with the application's criticality level

4. Requirements traceability (Ch. 02)​

4.1 Requirements by level​

PracticeL1L2L3
Security requirements in the backlog with tagsRecommendedMandatoryMandatory
Cross-reference requirement → validationRecommendedMandatoryMandatory
Exportable traceability reportOptionalRecommendedMandatory
Independent traceability reviewNot applicableRecommendedMandatory

4.2 Minimum requirements​

  • All applicable security requirements identified with a traceable taxonomy (e.g. SEC-L2-AUT-001)
  • Each requirement linked to at least one backlog item, PR or technical task
  • Validation evidence (test, review, report) associated with each applied requirement
  • Exceptions to requirements formally recorded with a reference to the requirement under exception

5. Code and pipeline traceability (Ch. 07)​

5.1 Mandatory chain​

Traceability must cover the complete chain:

commit SHA → execução de pipeline → artefacto produzido → release tag → deployment

5.2 Requirements by level​

ElementL1L2L3
Commit SHA associated with the artefactRecommendedMandatoryMandatory
Pipeline logs retainedBasicMandatory (90 days)Mandatory (1 year)
Scanner results correlated with the commitOptionalMandatoryMandatory
Immutable export of pipeline logsNot applicableRecommendedMandatory
Non-repudiation of irreversible promotionsNot applicableRecommendedMandatory

5.3 Minimum requirements​

  • Unique correlation ID per pipeline execution
  • Security reports (SAST, DAST, SCA) archived as pipeline artefacts with a reference to the commit
  • Pipeline logs retained as per the table above
  • Promotions to production associated with traceable human approval (name, timestamp, context)

6. Artefact traceability (Ch. 05, 07, 09)​

6.1 Requirements by level​

ElementL1L2L3
SBOM generated per buildRecommendedMandatoryMandatory
Artefact signingNot applicableMandatoryMandatory
Recorded provenance (who/when/how)Not applicableMandatoryMandatory
Signature verification at deployNot applicableMandatoryMandatory
Digest-only for container imagesRecommendedMandatoryMandatory

6.2 Minimum requirements​

  • SBOM in CycloneDX or SPDX format, generated automatically per build and archived
  • Release artefacts signed with a managed key that is rotated periodically
  • Provenance metadata (who built it, when, from which commit) associated with the artefact

7. Infrastructure traceability (Ch. 08)​

7.1 Minimum requirements​

  • Each IaC file traceable to the resource it provisions and to the environment in which it was applied
  • plan and apply history retained and auditable
  • Infrastructure changes associated with a PR with a documented review
  • Drift detected and recorded with a reference to the expected state

8. Archive of validation evidence (Ch. 06, 10)​

8.1 Requirements by level​

EvidenceL1L2L3
SAST reports archivedRecommendedMandatoryMandatory
DAST reports archivedOptionalMandatoryMandatory
SCA reports archivedRecommendedMandatoryMandatory
Fuzzing reports archivedOptionalMandatoryMandatory
WORM storage or equivalentNot applicableRecommendedMandatory
Evidence index per application/releaseOptionalRecommendedMandatory

8.2 Minimum requirements​

  • Evidence repository defined, with appropriate access control
  • Automatic export per build/release to the evidence repository
  • Evidence retained in line with the defined retention periods (see section 10)
  • Evidence not alterable after archiving (WORM or equivalent at L2/L3)

9. Operational event traceability (Ch. 12)​

9.1 Minimum requirements​

  • Logs in a structured format (JSON or equivalent) with minimum fields: timestamp, level, event, origin, context
  • Correlation identifier (request_id or equivalent) propagated across all logs of the same flow
  • Logs sent to a centralised system (L2/L3)
  • Access to logs restricted and audited - no direct access by production functions
  • Verifiable log integrity (hash or signature) at L2/L3
  • WORM retention enabled in storage at L3

10. Minimum retention periods​

Type of evidenceL1L2L3
Application logs30 days90 days1 year
Security logs (authentication, authorisation, changes)90 days1 year2 years
Audit logs (administrative operations, access to sensitive data)1 year1 year3 years
CI/CD pipeline logs30 days90 days1 year
Security reports per run (SAST/DAST/SCA, fuzzing, image scanning, IaC)30 days90 days1 year
Validation evidence package per release (index + signed export)1 year2 years3 years
Build artefacts and SBOMPer release1 year2 years
Approval records1 year2 years3 years
Records of exceptions and risk acceptances (including expired ones), with approvals and reassessments1 year after closure or expiry2 years after closure or expiry3 years after closure or expiry
Incident records (timeline, post-mortem, notifications)1 year1 year3 years
Classification and reassessment records2 years3 years5 years
note

The periods in this table are the minimum recommended by the Manual (the Manual's choice). The most demanding of EU law, national legislation, supervisory guidance and normal sector expectations prevails, always within the GDPR limit where personal data are involved — see the precedence clause of Policy 29 §7; the value adopted is recorded in the organisation's retention map. For products within the scope of the CRA, the evidence package and the SBOM that form part of the technical documentation are kept available for at least 10 years after placing on the market or for the support period, whichever is longer (CRA, Article 13(13)), regardless of level. For high-risk AI systems, the provider keeps the technical documentation and the artefacts that feed it for 10 years after placing on the market or putting into service (AI Act, Article 18(1)), also regardless of level.


11. Traceability of security decisions​

The following decisions must always be recorded with complete traceability:

DecisionMinimum elements of the record
Exception approvalWho approved, when, for which control, with what deadline
Residual risk acceptanceWho approved, severity, mitigation, TTL
Pipeline gate overrideWho authorised, context, timestamp
Change of classification levelWho decided, justification, date
Release approvalWho approved, checklist executed, open findings
Threat modelling resultThreats identified, mitigation or acceptance decisions, approval

12. Responsibilities​

RoleResponsibility
Developer / Tech LeadEnsure traceability tags in the backlog and PRs; produce validation evidence
DevOps / SREConfigure automatic archiving of artefacts and logs; ensure retention and immutability
AppSec EngineerVerify the completeness of traceability in security reviews and audits
GRC / ComplianceMaintain the centralised evidence index; issue compliance reports
CISOOversee the traceability programme; ensure alignment with regulatory requirements

13. Review and audit of this policy​

This policy must be reviewed annually or after any of the following events:

  • Incident in which the lack of traceability hindered the investigation
  • Regulatory change with an impact on retention periods or evidence requirements
  • Significant change to the pipeline or logging architecture

The evidence index and the audit logs must be made available in full in internal and external audits.


14. Normative and technical references​

ReferenceRelevance
SbD-ToE Ch. 02 - Security RequirementsTraceability requirement → control → validation
SbD-ToE Ch. 06 - Secure DevelopmentCentral archive of validation evidence
SbD-ToE Ch. 07 - Secure CI/CDTraceability commit → pipeline → release
SbD-ToE Ch. 08 - IaC and InfrastructureTraceability file → resource → environment
SbD-ToE Ch. 09 - Containers and ImagesProvenance and signing of images
SbD-ToE Ch. 12 - Monitoring and OperationsLog integrity and retention
SbD-ToE Ch. 14 - Governance and ContractingOrganisational traceability and compliance
ISO/IEC 27001 - Clause 9.1Monitoring, measurement, analysis and evaluation
NIST SP 800-92Guide to Computer Security Log Management
SSDF PW.8Archive and protect each software release
NIS2 - Articles 21 and 23Risk-management measures and reporting obligations
DORA - Article 10Traceability of events and logs